public AccountEditorPage()
 {
     this.InitializeComponent();
     this.accountViewModel = ViewModelLocator.AccountViewModel;
     TiltEffect.SetIsTiltEnabled(this, true);
     this.AccountCategory.ItemsSource = AccountCategoryHelper.AccountCategories;
     this.AccountCategory.ItemCountThreshold = 7;
     this.CurrencyType.ItemsSource = CurrencyHelper.CurrencyTable;
     this.LoadContent();
 }
 public AccountInfoViewer()
 {
     this.InitializeComponent();
     TiltEffect.SetIsTiltEnabled(this, true);
     this.InitializeApplicationBars();
     base.DataContext = this;
     this.vm = ViewModelLocator.AccountViewModel;
     this.RelatedItems = new ObservableCollection<GroupByCreateTimeAccountItemViewModel>();
     if (this.vm.SearchingConditionAssociatedItemsForCurrentViewAccount == null)
     {
         this.vm.SearchingConditionAssociatedItemsForCurrentViewAccount = new AssociatedItemsSelectorOption();
     }
 }
 private void AccountManager_Loaded(object sender, RoutedEventArgs e)
 {
     if (!this.hasLoaded)
     {
         this.hasLoaded = true;
         this.accountViewModel = ViewModelLocator.AccountViewModel;
         base.DataContext = this.accountViewModel;
         this.transferingHistoryViewModel = ViewModelLocator.TransferingHistoryViewModel;
         this.HistoryPivotItem.DataContext = this.transferingHistoryViewModel;
     }
     if (!ViewModelLocator.AccountViewModel.IsDataLoaded)
     {
         ViewModelLocator.AccountViewModel.LoadData();
     }
 }
        private void recoveryWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            System.Collections.Generic.List<String> files = this.GetAllScheduledDataResult().ToList<string>();
            if (files.Count > 0)
            {
                GlobalIndicator.Instance.BusyForWork(AppResources.ScheduleManager_RecoveryingRecordsMessage, new object[0]);
                AccountViewModel model = new AccountViewModel();
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    int counts = this.ScheduleManager.RecoverDataToDatabase(files, model.HandleAccountItemAddingForTask, model.Transfer);

                    if (counts > 0)
                    {
                        ViewModelLocator.MainPageViewModel.IsSummaryListLoaded = false;
                        CommonExtensions.AlertNotification(null, AppResources.TaskCompletedMessageFormatter.FormatWith(new object[] { counts }), null);
                    }
                    else
                    {
                        CommonExtensions.AlertNotification(null, AppResources.OperationSuccessfullyMessage, null);
                    }
                    GlobalIndicator.Instance.WorkDone();
                });
            }
        }