protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            ChromeSystemTray.SetSystemTrayToChrome();

            Categories = DataManager.Current.Load <Model.Categories>(new LoadContext("cats"));

            DataContext = this;

            object o;

            if (State.TryGetValue("categoryId", out o))
            {
                _category.Tag = (string)o;
            }
            if (State.TryGetValue("categoryName", out o))
            {
                _category.Content = (string)o;
            }

            // User has finished picking a category now.
            if (!string.IsNullOrEmpty(CategoryPickerPage.SelectedCategoryId))
            {
                _category.Tag     = CategoryPickerPage.SelectedCategoryId;
                _category.Content = CategoryPickerPage.SelectedCategoryName;

                CategoryPickerPage.SelectedCategoryId   = null;
                CategoryPickerPage.SelectedCategoryName = null;
            }

            _map.PointOfInterest = LocationAssistant.Instance.LastKnownLocation;

            string s;

            if (NavigationContext.QueryString.TryGetValue("name", out s))
            {
                PlaceName = s;
            }

            if (State.TryGetValue("theName", out o))
            {
                PlaceName = (string)o;
            }

            // City, State should be filled out using the geocode...
        }
Exemplo n.º 2
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            ChromeSystemTray.SetSystemTrayToChrome();

            Categories = DataManager.Current.Load<Model.Categories>(new LoadContext("cats"));

            DataContext = this;

            object o;
            if (State.TryGetValue("categoryId", out o))
            {
                _category.Tag = (string) o;
            }
            if (State.TryGetValue("categoryName", out o))
            {
                _category.Content = (string) o;
            }

            // User has finished picking a category now.
            if (!string.IsNullOrEmpty(CategoryPickerPage.SelectedCategoryId))
            {
                _category.Tag = CategoryPickerPage.SelectedCategoryId;
                _category.Content = CategoryPickerPage.SelectedCategoryName;

                CategoryPickerPage.SelectedCategoryId = null;
                CategoryPickerPage.SelectedCategoryName = null;
            }

            _map.PointOfInterest = LocationAssistant.Instance.LastKnownLocation;

            string s;
            if (NavigationContext.QueryString.TryGetValue("name", out s))
            {
                PlaceName = s;
            }

            if (State.TryGetValue("theName", out o))
            {
                PlaceName = (string)o;
            }

            // City, State should be filled out using the geocode...
        }
Exemplo n.º 3
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (SelectedCategoryId != null)
            {
                Opacity = 0;
                Dispatcher.BeginInvoke(() => NavigationService.GoBackWhenReady());
            }
            else
            {
                Opacity = 1;
            }

            NavigationContext.QueryString.TryGetValue("root", out _root);

            Categories = DataManager.Current.Load <Model.Categories>(new LoadContext("cats"), OnListReady, (error) => { });
        }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (SelectedCategoryId != null)
            {
                Opacity = 0;
                Dispatcher.BeginInvoke(() => NavigationService.GoBackWhenReady());
            }
            else
            {
                Opacity = 1;
            }

            NavigationContext.QueryString.TryGetValue("root", out _root);

            Categories = DataManager.Current.Load<Model.Categories>(new LoadContext("cats"), OnListReady, (error) => { });
        }
Exemplo n.º 5
0
 public Categories(Model.Categories categories)
 {
     model_categories = categories;
     CopyFromModel();
 }