예제 #1
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/HelpMate;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot           = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.AppTitle             = ((Microsoft.Phone.Controls.Panorama)(this.FindName("AppTitle")));
     this.SaveButton           = ((System.Windows.Controls.Button)(this.FindName("SaveButton")));
     this.NavigateButton       = ((System.Windows.Controls.Button)(this.FindName("NavigateButton")));
     this.DeletePin            = ((System.Windows.Controls.Button)(this.FindName("DeletePin")));
     this.ParkMateMap          = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("ParkMateMap")));
     this.FavoritesList        = ((Microsoft.Phone.Controls.LongListSelector)(this.FindName("FavoritesList")));
     this.Suggest              = ((System.Windows.Controls.Button)(this.FindName("Suggest")));
     this.RemindMe             = ((System.Windows.Controls.Button)(this.FindName("RemindMe")));
     this.LocList              = ((System.Windows.Controls.ListBox)(this.FindName("LocList")));
     this.FrequentLocationsMap = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("FrequentLocationsMap")));
     this.Locations            = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("Locations")));
     this.CreateLoc            = ((System.Windows.Controls.Button)(this.FindName("CreateLoc")));
     this.datePicker           = ((Microsoft.Phone.Controls.DatePicker)(this.FindName("datePicker")));
     this.timePicker           = ((Microsoft.Phone.Controls.TimePicker)(this.FindName("timePicker")));
     this.Notify = ((System.Windows.Controls.Button)(this.FindName("Notify")));
 }
예제 #2
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/GPSWithFriends;component/MapPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.Test = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("Test")));
 }
예제 #3
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneToolkitSample8;component/Samples/MapsSample.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.Map = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("Map")));
     this.RouteDirectionsPushPin = ((Microsoft.Phone.Maps.Toolkit.Pushpin)(this.FindName("RouteDirectionsPushPin")));
     this.StoresMapItemsControl = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("StoresMapItemsControl")));
     this.UserLocationMarker = ((Microsoft.Phone.Maps.Toolkit.UserLocationMarker)(this.FindName("UserLocationMarker")));
 }
예제 #4
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/GPSWithFriends;component/MapPage.xaml", System.UriKind.Relative));
     this.LayoutRoot   = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.Test         = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("Test")));
 }
예제 #5
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/BandsAround;component/MainPage.xaml", System.UriKind.Relative));
     this.Page         = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("Page")));
     this.LayoutRoot   = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.Map          = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("Map")));
     this.MapItems     = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("MapItems")));
 }
예제 #6
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/GPSWithFriends;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.MyMap = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("MyMap")));
     this.FriendsLocationMarkerList = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("FriendsLocationMarkerList")));
     this.MyLocationMarker = ((Microsoft.Phone.Maps.Toolkit.UserLocationMarker)(this.FindName("MyLocationMarker")));
     this.GPSLocationTextblock = ((System.Windows.Controls.TextBlock)(this.FindName("GPSLocationTextblock")));
     this.GroupNameTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("GroupNameTextBlock")));
     this.FriendsListBox = ((System.Windows.Controls.ListBox)(this.FindName("FriendsListBox")));
     this.InviteButton = ((System.Windows.Controls.Button)(this.FindName("InviteButton")));
     this.RequestsListBox = ((System.Windows.Controls.ListBox)(this.FindName("RequestsListBox")));
     this.FriendsManageListBox = ((System.Windows.Controls.ListBox)(this.FindName("FriendsManageListBox")));
 }
예제 #7
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Bands%20in%20Town;component/EventPage.xaml", System.UriKind.Relative));
     this.LayoutRoot   = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.city         = ((System.Windows.Controls.TextBlock)(this.FindName("city")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.Map          = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("Map")));
     this.MapItems     = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("MapItems")));
     this.title        = ((System.Windows.Controls.TextBlock)(this.FindName("title")));
     this.venue        = ((System.Windows.Controls.TextBlock)(this.FindName("venue")));
     this.price        = ((System.Windows.Controls.TextBlock)(this.FindName("price")));
     this.time         = ((System.Windows.Controls.TextBlock)(this.FindName("time")));
 }
예제 #8
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/GPSWithFriends;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.MyMap      = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("MyMap")));
     this.FriendsLocationMarkerList = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("FriendsLocationMarkerList")));
     this.MyLocationMarker          = ((Microsoft.Phone.Maps.Toolkit.UserLocationMarker)(this.FindName("MyLocationMarker")));
     this.GPSLocationTextblock      = ((System.Windows.Controls.TextBlock)(this.FindName("GPSLocationTextblock")));
     this.GroupNameTextBlock        = ((System.Windows.Controls.TextBlock)(this.FindName("GroupNameTextBlock")));
     this.FriendsListBox            = ((System.Windows.Controls.ListBox)(this.FindName("FriendsListBox")));
     this.InviteButton         = ((System.Windows.Controls.Button)(this.FindName("InviteButton")));
     this.RequestsListBox      = ((System.Windows.Controls.ListBox)(this.FindName("RequestsListBox")));
     this.FriendsManageListBox = ((System.Windows.Controls.ListBox)(this.FindName("FriendsManageListBox")));
 }
예제 #9
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/HelpMate;component/XAML/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot           = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.AppTitle             = ((Microsoft.Phone.Controls.Panorama)(this.FindName("AppTitle")));
     this.SaveButton           = ((System.Windows.Controls.Button)(this.FindName("SaveButton")));
     this.NavigateButton       = ((System.Windows.Controls.Button)(this.FindName("NavigateButton")));
     this.DeletePin            = ((System.Windows.Controls.Button)(this.FindName("DeletePin")));
     this.ParkMateMap          = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("ParkMateMap")));
     this.FavoritesList        = ((Microsoft.Phone.Controls.LongListSelector)(this.FindName("FavoritesList")));
     this.Map1                 = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("Map1")));
     this.Map2                 = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("Map2")));
     this.Map3                 = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("Map3")));
     this.FrequentLocationsMap = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("FrequentLocationsMap")));
     this.Locations            = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("Locations")));
 }
        private void PopulateMap(ItemViewModel pl)
        {
            pl.LastUpdate = "Updated: " + pl.UpdatedAt.ToString("f");
            pl.Icon = GetSource(pl);
            pl.Coordinate = new GeoCoordinate(pl.Latitude, pl.Longitude);

            List<ItemViewModel> places = new List<ItemViewModel>();
            places.Add(pl);
            ObservableCollection<DependencyObject> children = MapExtensions.GetChildren(myMap);
            MapItemsControl obj = new MapItemsControl();
            obj.Items.Clear();
            obj.ItemsSource = null;
            obj = children.FirstOrDefault(x => x is MapItemsControl) as MapItemsControl;

            if (obj != null && obj.Items.Count == 0)
            {
                obj.ItemsSource = places;
                TbkTitle.Text = pl.Title;
                TbkReport.Text = pl.Report;
                TbkUpdated.Text = "Updated: " + pl.UpdatedAt.ToString("f");
            }
        }