public static void Go(PhoneApplicationPage fromPage, Category category)
        {
            SelectionHandler = new PageActionHandler<Category>();
            SelectionHandler.AfterSelected = delegate(Category item)
            {
                if ((item != null) && (item.Id != category.ParentCategoryId))
                {
                    if (category.ParentCategory != null)
                    {
                        category.ParentCategory.Childrens.Remove(category);
                    }

                    category.ParentCategory = item;
                    if (item.Childrens.Count(p => p.Name == category.Name) == 0)
                    {
                        // reset order.
                        category.Order = item.Childrens
                            .Select(p => (int)p.Order).ToList().Max(p => p) + 1;

                        item.Childrens.Add(category);
                    }

                    ((System.Collections.Generic.IEnumerable<AccountItem>)category.AccountItems).ForEach<AccountItem>(p =>
                    {
                        p.RaisePropertyChangd("NameInfo");
                    });
                    ViewModelLocator.CategoryViewModel.Update(category);
                }
            };
            fromPage.NavigateTo("/pages/CategoryManager/SelectParentCategoryPage.xaml?id={0}&currentName={1}&type={2}&childName={3}", new object[] { category.ParentCategoryId, category.ParentCategory == null ? "N/A" : category.ParentCategory.Name, category.CategoryType, category.Name });
        }
 public static void Go(PhoneApplicationPage fromPage, Category category)
 {
     SelectionHandler = new PageActionHandler<Category>();
     SelectionHandler.AfterSelected = delegate(Category item)
     {
         if ((item != null) && (item.Id != category.ParentCategoryId))
         {
             category.ParentCategory.Childrens.Remove(category);
             category.ParentCategory = item;
             if (!item.Childrens.Contains(category))
             {
                 item.Childrens.Add(category);
             }
             ((System.Collections.Generic.IEnumerable<AccountItem>)category.AccountItems).ForEach<AccountItem>(delegate(AccountItem p)
             {
                 p.RaisePropertyChangd("NameInfo");
             });
             ViewModelLocator.CategoryViewModel.Update(category);
         }
     };
     fromPage.NavigateTo("/pages/CategoryManager/SelectParentCategoryPage.xaml?id={0}&currentName={1}&type={2}&childName={3}", new object[] { category.ParentCategoryId, category.ParentCategory.Name, category.CategoryType, category.Name });
 }
 public static void Go(PhoneApplicationPage fromPage, Guid id, PageActionType action)
 {
     fromPage.NavigateTo("/Pages/NotificationCenter/NotificationEditor.xaml?id={0}&action={1}", id, action);
 }
 public static void Go(PhoneApplicationPage fromPage, PageActionHandler<Category> categorySelectorHandler, ItemType categoryType, bool selectionMode = false)
 {
     SelectionModeHandler = categorySelectorHandler;
     fromPage.NavigateTo("/Pages/CategoryManager/CategoryManagment.xaml?type={0}&selectionMode={1}", new object[] { categoryType, selectionMode });
 }
 public static void Go(System.Guid attachedId, PhoneApplicationPage fromPage)
 {
     fromPage.NavigateTo("/pages/AccountItemViews/AttachPeoplePage.xaml?id={0}", new object[] { attachedId });
 }
 public static void Go(PhoneApplicationPage fromPage, Category category, ItemType categoryType, PageActionType pageAction = PageActionType.Add)
 {
     System.Guid guid = (category == null) ? System.Guid.Empty : category.Id;
     fromPage.NavigateTo("/Pages/CategoryManager/CategoryInfoEditor.xaml?id={0}&pageAction={1}&CategoryClassType={2}", new object[] { guid, pageAction, categoryType });
 }
        /// <summary>
        /// Shows the specified item.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="SearchingCondition">The searching condition.</param>
        /// <param name="pageFrom">The page from.</param>
        public static void Show(SummaryDetails item, DetailsCondition SearchingCondition, PhoneApplicationPage pageFrom)
        {
            var queryForSeeMore = QueryDataBySearchingCondition(SearchingCondition);

            var summaryItem = item.Tag as AccountItem;

            Guid categoryID = summaryItem.CategoryId;

            Account account = summaryItem.Account;

            if (SearchingCondition.ChartGroupMode == ChartGroupMode.ByCategoryName)
            {
                if (SearchingCondition.GroupCategoryMode == CategorySortType.ByParentCategory)
                {
                    IEnumerable<Guid> ids = null;

                    if (summaryItem.Category.IsParent)
                    {
                        categoryID = summaryItem.Category.Id;
                        ids = ViewModelLocator.CategoryViewModel.AccountBookDataContext.Categories.Where(p => p.ParentCategoryId == categoryID)
                        .Select(p => p.Id).ToList();
                    }
                    else
                    {
                        categoryID = summaryItem.Category.ParentCategoryId;
                        ids = ViewModelLocator.CategoryViewModel.AccountBookDataContext.Categories.Where(p => p.ParentCategoryId == summaryItem.Category.ParentCategory.Id)
                        .Select(p => p.Id).ToList();
                    }

                    queryForSeeMore = queryForSeeMore.Where(p => ids.Contains(p.CategoryId));
                }
                else
                {
                    queryForSeeMore = queryForSeeMore.Where(i => i.CategoryId == categoryID);
                }
            }
            else
            {
                if (account != null)
                {
                    queryForSeeMore = queryForSeeMore.Where(p => p.AccountId == account.Id);
                }
            }

            StatsticSummaryItemsViewer.NeedReloadData = true;

            Pages.DialogBox.StatsticSummaryItemsViewer.DataSourceGetter = () => queryForSeeMore;

            pageFrom.NavigateTo("/Pages/DialogBox/StatsticSummaryItemsViewer.xaml");
        }
        /// <summary>
        /// Goes the specified repayment.
        /// </summary>
        /// <param name="repayment">The repayment.</param>
        public static void Go(Repayment repayment, PhoneApplicationPage pageFrom, PageActionType action)
        {
            var warpped = repayment;

            if (action == PageActionType.Add)
            {
                warpped = ViewModelLocator.BorrowLeanViewModel.CreateRepayOrReceieveEntry(repayment);
                warpped.RepayToOrGetBackFrom = repayment;
            }

            GetEditObject = () => warpped;

            pageFrom.NavigateTo("/Pages/BorrowAndLean/RepayOrReceiveEditorPage.xaml?action={0}", action);
        }
 public static void Go(PhoneApplicationPage fromPage)
 {
     fromPage.NavigateTo("/Pages/TransactionHistory.xaml");
 }
 /// <summary>
 /// Views the specified from page.
 /// </summary>
 /// <param name="fromPage">From page.</param>
 /// <param name="item">The item.</param>
 public static void View(PhoneApplicationPage fromPage, Repayment item)
 {
     if (item != null)
     {
         fromPage.NavigateTo("/Pages/BorrowAndLean/BorrowOrLoanRepayReceiveInfoViewerPage.xaml?id={0}", item.Id);
     }
 }
 public static void Go(PhoneApplicationPage fromPage, TallySchedule item)
 {
     System.Guid id = item.Id;
     fromPage.NavigateTo("/Pages/CustomizedTally/CustomizedTallyPage.xaml?id={0}", new object[] { id });
 }
 public static void Go(PhoneApplicationPage fromPage)
 {
     fromPage.NavigateTo("/Pages/AppSettingPage/AutoBackupingSettingPage.xaml");
 }
 /// <summary>
 /// Goes the specified from page.
 /// </summary>
 /// <param name="fromPage">From page.</param>
 public static void Go(PhoneApplicationPage fromPage, AccountItem accountItem)
 {
     currentObject = accountItem;
     fromPage.NavigateTo("/Pages/AccountItemViews/InstallmentsItemEditor.xaml");
 }
 internal static void View(System.Guid peopleId, PhoneApplicationPage fromPage, int? pivotIndexTo = 0)
 {
     fromPage.NavigateTo("/Pages/People/PeopleProfileViewerPage.xaml?id={0}&pivotTo={1}", peopleId, pivotIndexTo);
 }
 public static void Go(PageActionHandler<PeopleProfile> selectorHandler, PhoneApplicationPage fromPage)
 {
     PeopleSelectorHandler = selectorHandler;
     fromPage.NavigateTo("/pages/DialogBox/PeopleImporter.xaml");
 }
 /// <summary>
 /// Goes to this page from <para>fromPage</para>.
 /// </summary>
 /// <param name="fromPage">From page.</param>
 public static void GoTo(PhoneApplicationPage fromPage, string currencySymbol, string currencyNotes)
 {
     fromPage.NavigateTo("/Pages/DialogBox/MoneyBuildingPage.xaml?currency={0}&currencyNotes={1}", currencySymbol, currencyNotes);
 }
        public static void GoTo(PhoneApplicationPage fromPage, string pageNextGoTo, Action<string> afterFileChosenAndBeforeGoNext)
        {
            PageActionHandler = new PageActionHandler<string>();
            PageActionHandler.AfterSelected = afterFileChosenAndBeforeGoNext;

            fromPage.NavigateTo("/Pages/DialogBox/BackupDatabaseChooser.xaml?pageNextGoTo={0}", pageNextGoTo);
        }
 /// <summary>
 /// Goes the specified attached id.
 /// </summary>
 /// <param name="attachedId">The attached id.</param>
 /// <param name="fromPage">From page.</param>
 public static void Go(Guid attachedId, string tagName, PhoneApplicationPage fromPage)
 {
     fromPage.NavigateTo("/pages/DialogBox/PictureManager/PictureBrowser.xaml?id={0}&tagName={1}", attachedId, tagName);
 }
 public static void NavigateTo(PhoneApplicationPage fromPage, TallySchedule template, PageActionType pageAction)
 {
     EditingItemGetter = () => template;
     fromPage.NavigateTo("/Pages/CustomizedTally/CustomizedTallyItemEditorPage.xaml?action={0}", new object[] { pageAction });
 }
 /// <summary>
 /// Goes the specified from page.
 /// </summary>
 /// <param name="fromPage">From page.</param>
 public static void Go(PhoneApplicationPage fromPage)
 {
     fromPage.NavigateTo("/Pages/DialogBox/WelcomePages/QuickSettingPage.xaml");
 }
 internal static void View(System.Guid peopleId, PhoneApplicationPage fromPage)
 {
     fromPage.NavigateTo("/Pages/People/PeopleProfileViewerPage.xaml?id={0}", new object[] { peopleId });
 }
 public static void Go(System.Guid id, PhoneApplicationPage page)
 {
     page.NavigateTo("/pages/CategoryManager/CategoryInfoViewer.xaml?id={0}", new object[] { id });
 }
 /// <summary>
 /// Shows the welcome.
 /// </summary>
 /// <param name="startPos">The start pos.</param>
 internal static void ShowWelcome(PhoneApplicationPage startPos)
 {
     IsolatedAppSetingsHelper.ShowTipsByVerion(IsolatedAppSetingsHelper.HasShowUpdatedKey, () =>
     {
         startPos.NavigateTo("/Pages/DialogBox/WelcomePage.xaml");
     });
 }