end of day2 #51

This commit is contained in:
stubbfel
2013-06-21 13:02:13 +02:00
parent 811ad35fa9
commit 709f7fc289
4 changed files with 34 additions and 1 deletions

View File

@@ -98,6 +98,7 @@
</Compile>
<Compile Include="LocalizedStrings.cs" />
<Compile Include="Model\Campusmap\MapModel.cs" />
<Compile Include="Model\Campusmap\MapPinModel.cs" />
<Compile Include="Model\Departments\ChairModel.cs" />
<Compile Include="Model\Departments\DepartmentModel.cs" />
<Compile Include="Model\Departments\DepartmentViewModel.cs" />

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace CampusAppWP8.Model.Campusmap
{
public class MapPinModel
{
public MapPinModel()
{
}
public string ImageSource { get; set; }
public double ImageWidth { get; set; }
public double ImageHeight { get; set; }
public double MapOffsetX { get; set; }
public double MapOffsetY { get; set; }
public Point Position { get; set; }
}
}

View File

@@ -57,7 +57,7 @@
</Canvas.Background>
<Image Name="bla" Source="/Assets/icons/search_159_light.png" Width="60" Canvas.ZIndex="1" Canvas.Top="976" Canvas.Left="976"/>
<Image Name="bla" Source="/Assets/icons/search_159_light.png" Width="60" Canvas.Top="976" Canvas.Left="976"/>
</Canvas>
</ScrollViewer>
</Grid>

View File

@@ -9,6 +9,7 @@ using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Windows.Media;
using CampusAppWP8.Model.Campusmap;
using System.Windows.Media.Imaging;
namespace CampusAppWP8.Pages.Campusmap
{
@@ -19,7 +20,13 @@ namespace CampusAppWP8.Pages.Campusmap
{
InitializeComponent();
this.map = new MapModel() { ImageSource = "/Assets/testmap.png", ImageWidth = 2000, ImageHeight = 2000, MapOffsetX = -228, MapOffsetY = -300, RefPoint = new Point(1000, 1000) };
MapPinModel pin = new MapPinModel() { ImageSource = "/Assets/icons/search_159_light.png", ImageWidth = 60, ImageHeight = 60, MapOffsetX = -24, MapOffsetY = -24, Position = new Point(1000, 1000) };
Image pinImg =new Image() { Source = new BitmapImage((new Uri(pin.ImageSource,UriKind.Relative))), Width = pin.ImageWidth};
// this.MapCanvas.SetLeft(pinImg,500);
this.MapCanvas.DataContext = map;
MapCanvas.Children.Add(pinImg);
Image img = new Image();
}
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)