public MainPage()
        {
            System.Action action = null;
            this.currentPanoramaItemName = string.Empty;
            this.passwordErrorMessage = string.Empty;
            this.image = string.Empty;
            this.margin12120000 = new Thickness(12.0, 12.0, 0.0, 0.0);
            base.Resources.Add("GlobalAppNameLower", AppSetting.Instance.AppName.ToLowerInvariant());
            this.InitializeComponent();
            if (action == null)
            {
                action = delegate
                {
                    this.NavigateTo("/Pages/DataSynchronizationPage.xaml");
                };
            }

            App.GoToRestoreBackupSdfPage = action;
            TiltEffect.SetIsTiltEnabled(this, true);
            backgroundImageSetter = new System.Action<Stream>(this.setBackgroundImage);
            IsolatedAppSetingsHelper.LoadLastMainPageIndex();
            this.mainPageViewModel = ViewModelLocator.MainPageViewModel;
            base.DataContext = this.mainPageViewModel;
            this.InitializeMenu();
            this.StartApp();
            base.Loaded += new RoutedEventHandler(this.MainPage_Loaded);
            base.BackKeyPress += new System.EventHandler<CancelEventArgs>(this.MainPage_BackKeyPress);
            System.DateTime? lastAccessTime = App.LastAccessTime;
            if (lastAccessTime.HasValue)
            {
                System.TimeSpan span = (System.TimeSpan)(System.DateTime.Now.Date - lastAccessTime.Value.Date);
                this.daysWithoutTally = span.Days;
                this.needShowNotificatioToDoTally = this.daysWithoutTally >= 7;
            }
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.needShowNotificatioToDoTally = true;
            }
            IsolatedAppSetingsHelper.LastMainPageIndexCache = (IsolatedAppSetingsHelper.LastMainPageIndexCache < 0) ? 0 : IsolatedAppSetingsHelper.LastMainPageIndexCache;

            if (UpdatingController.HasSomeThingToDoBeforeGoToMainPage(this))
            {
                IsolatedAppSetingsHelper.LastMainPageIndexCache = 0;
            }

            this.MainPanorama.DefaultItem = this.MainPanorama.Items[IsolatedAppSetingsHelper.LastMainPageIndexCache];
            TextBlock block = new TextBlock
            {
                Text = AppResources.Today.ToLowerInvariant(),
                FontSize = 48.0,
                Margin = new Thickness(0.0, 40.0, 0.0, 0.0)
            };
            this.RecentItemList.Header = block;
            Binding binding = new Binding("FavoritesPageVisibiable")
            {
                Source = AppSetting.Instance
            };
            this.RecentItemList.SetBinding(UIElement.VisibilityProperty, binding);
        }
 public ParticularsDetails()
 {
     this.InitializeComponent();
     this.particularsViewModel = ViewModelLocator.instanceLoader.LoadSingelton<ParticularsViewModel>("ParticularsViewModel");
     base.DataContext = this.particularsViewModel;
     this.InitailizeApplicationBar();
     this.mainPageSummaryViewModel = ViewModelLocator.MainPageViewModel;
     this.mainPageSummaryViewModel.ThisMonthSummary.IncomeSummaryEntry.ComparationInfo.Amount = -1M;
     this.mainPageSummaryViewModel.ThisMonthSummary.ExpenseSummaryEntry.ComparationInfo.Amount = -1M;
 }
        public ParticularsDetails()
        {
            this.InitializeComponent();
            this.particularsViewModel = ViewModelLocator.instanceLoader.LoadSingelton<ParticularsViewModel>("ParticularsViewModel");
            this.DataContext = this.particularsViewModel;
            this.InitailizeApplicationBar();
            this.mainPageSummaryViewModel = ViewModelLocator.MainPageViewModel;
            this.mainPageSummaryViewModel.ThisMonthSummary.IncomeSummaryEntry.ComparationInfo.Amount = -1M;
            this.mainPageSummaryViewModel.ThisMonthSummary.ExpenseSummaryEntry.ComparationInfo.Amount = -1M;

            this.NetAssetsSummary.DataContext = this;

            TiltEffect.SetIsTiltEnabled(this, true);
            this.Loaded += ParticularsDetails_Loaded;

            this.CategorySummaryPivot.DataContext = this;
        }