protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode != NavigationMode.Back) { this.pageAction = this.GetNavigatingParameter("pageAction", null).ToEnum<PageActionType>(PageActionType.Add); this.CategoryClassType = this.GetNavigatingParameter("CategoryClassType", null).ToEnum<ItemType>(ItemType.Expense); string source = e.GetNavigatingParameter("id", null); if (this.pageAction == PageActionType.Edit) { this.LoadEditingObject(source.ToGuid()); } else { this.LoadAddingObject(source.ToGuid()); } } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode != NavigationMode.Back) { string id = e.GetNavigatingParameter("id", null); this.pageAction = e.GetNavigatingParameter("action", null).ToEnum<PageActionType>(); if (this.pageAction == PageActionType.Add) { this.Current = new Account(); this.CategoryManagementPageTitle.Text = LocalizedStrings.GetCombinedText(AppResources.Create, AppResources.AccountName, false).ToUpperInvariant(); } else { this.Current = this.accountViewModel.Accounts.FirstOrDefault<Account>(p => p.Id == id.ToGuid()); this.CategoryManagementPageTitle.Text = LocalizedStrings.GetCombinedText(AppResources.Edit, AppResources.AccountInfo, false).ToUpperInvariant(); this.LoadEditing(); } this.DataContext = this; } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode != NavigationMode.Back) { int num = e.GetNavigatingParameter("goto", null).ToInt32(); this.MainPivot.SelectedIndex = num; } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode != NavigationMode.Back) { this._loaningTpyeToSearch = e.GetNavigatingParameter("type").ToInt32().ToEnum<LeanType>(); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { this.EnsureEnablePinToStart(); MainPage.ShowOpactityZeroTrayBlack(); base.OnNavigatedTo(e); if (!this.isDataNavigated) { this.totalDaysOfThisMonth = System.DateTime.Now.GetCountDaysOfMonth(); this.SetControlLocalizedString(); this.AccountName.ItemsSource = ViewModelLocator.AccountViewModel.Accounts; if (base.NavigationContext.QueryString.ContainsKey("action")) { string str = base.NavigationContext.QueryString["action"]; if (!ViewModelLocator.AccountViewModel.IsDataLoaded) { ViewModelLocator.AccountViewModel.QuickLoadData(); } if (!this.hasNavied) { if ((str == "Edit") || (IsSelectionMode && (accountItemForSchedule != null))) { this.actionType = PageActionType.Edit; this.CategoryType.BorderThickness = new Thickness(0.0, 0.0, 0.0, 0.0); this.initializeEditingMode(); base.DataContext = currentEditObject; } else { if (base.NavigationContext.QueryString.ContainsKey("categoryType")) { int num = int.Parse(base.NavigationContext.QueryString["categoryType"]); this.CategoryType.SelectedIndex = num; } this.actionType = PageActionType.Add; if (str != "preEdit") { currentEditObject = new AccountItem(); } base.DataContext = currentEditObject; this.InitializeAddData(); if (str == "preEdit") { this.BindData(currentEditObject); } } if (str == "selection") { string source = e.GetNavigatingParameter("title", null); this.NewOrEditPage.Text = source.IsNullOrEmpty() ? AppResources.CreateAccountItemForSchedule.ToUpperInvariant() : source; } this.SetControls(); this.hasNavied = true; } } this.isFromList = this.GetNavigatingParameter("isFromList", null).ToBoolean(false); this.fromMainPage = this.GetNavigatingParameter("FromMainPlus", null).ToBoolean(false); if (this.FromStartScreen) { ApplicationBarMenuItem item = new ApplicationBarMenuItem { Text = LocalizedStrings.GetLanguageInfoByKey("GoToMainPage") }; this.toMainPageButton = item; this.toMainPageButton.Click += new System.EventHandler(this.toMainPageButton_Click); base.ApplicationBar.MenuItems.Add(this.toMainPageButton); } } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (BudgetManager.Current.NeedUpdate) { ViewModelLocator.BudgetProjectViewModel.UpdateCurrentMonthBudgetSummary(); } if (e.NavigationMode != NavigationMode.Back) { this._toPivotIndex = e.GetNavigatingParameter("toIndex", 0) .ToInt32(); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode != NavigationMode.Back) { this.CurrencySymbol = e.GetNavigatingParameter("currency"); this.CurrentNotes = e.GetNavigatingParameter("currencyNotes"); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.NavigationMode != NavigationMode.Back) { this._id = e.GetNavigatingParameter("id").ToGuid(); this._action = e.GetNavigatingParameter("action").ToEnum<PageActionType>(); System.Threading.ThreadPool.QueueUserWorkItem((o) => { if (_action == PageActionType.Edit) { var item = ViewModelLocator.NotificationsViewModel.Notifications.FirstOrDefault(p => p.Id == _id); if (item != null) { Current = item; } } this.Dispatcher.BeginInvoke(() => { if (_action == PageActionType.Add) { Current = new TallySchedule(); Current.StartTime = DateTime.Now.AddSeconds(20); Current.EndTime = DateTime.Now.AddYears(1); } else { this.EnableAlarmNotification.IsEnabled = false; this.PageTitle.Text = AppResources.Edit.ToLower(); } this.DataContext = Current; }); }); } base.OnNavigatedTo(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { this.EnsureEnablePinToStart(); if (e.NavigationMode != NavigationMode.Back) { this._specifiedAccountId = e.GetNavigatingParameter("specifiedAccount") .ToGuid(); } base.OnNavigatedTo(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode != NavigationMode.Back) { this.pageAction = e.GetNavigatingParameter("action", null).ToEnum<PageActionType>(); if (this.pageAction == PageActionType.Add) { this.DataEditing = new TallySchedule(); } else if (EditingItemGetter != null) { this.DataEditing = EditingItemGetter(); this.associatedAccountItem = this.DataEditing.ReBuildAccountItem(); this.BindingDataToEdit(); } this.title = LocalizedStrings.GetCombinedText((this.pageAction == PageActionType.Add) ? AppResources.Create : AppResources.Edit, AppResources.TallyTemplate, false).ToLowerInvariant(); this.PageTitle.Text = this.title; } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode != NavigationMode.Back) { this._pageNextGoTo = e.GetNavigatingParameter("pageNextGoTo"); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode != NavigationMode.Back) { this.LoadTemplete(e.GetNavigatingParameter("id", null).ToGuid()); } }