public MainWindow()
 {
     InitializeComponent();
     App.MainWindow = this;
     NavigationServiceSingleton.CreateNavigationService(MainFrame);
     NavigationServiceSingleton.GetNavigationService().NavigateToPage(new GamePage());
 }
 private void btnShowList_Click(object sender, RoutedEventArgs e)
 {
     if (lViewLists.SelectedIndex != -1)
     {
         var itemsList = itemsLists[lViewLists.SelectedIndex];
         NavigationServiceSingleton.GetNavigationService().NavigateToPage(new ListPage(itemsList));
     }
 }
        private void btnCreateList_Click(object sender, RoutedEventArgs e)
        {
            ItemsList newItemsList = new ItemsList();

            newItemsList.Name = txtListName.Text;
            newItemsList.Type = 0;

            if (App.Database.SaveItemsListSync(newItemsList) != 0)
            {
                newItemsList = App.Database.GetAllItemsLists().Last();
            }

            NavigationServiceSingleton.GetNavigationService().NavigateToPage(new ListPage(newItemsList));

            ResetElements();
        }
示例#4
0
        private void SetDifficulty_Click(object sender, RoutedEventArgs e)
        {
            Button button = ((Button)sender);

            switch (button.Tag)
            {
            case "0":
                NavigationServiceSingleton.GetNavigationService().NavigateToPage(new GamePage());
                break;

            case "1":
                NavigationServiceSingleton.GetNavigationService().NavigateToPage(new GamePage(16, 16, 40, int.Parse(button.Tag.ToString())));
                break;

            case "2":
                NavigationServiceSingleton.GetNavigationService().NavigateToPage(new GamePage(16, 30, 99, int.Parse(button.Tag.ToString())));
                break;
            }
        }
示例#5
0
 public MainPage()
 {
     InitializeComponent();
     this.DataContext = new MainPageViewModel();
     NavigationServiceSingleton.GetNavigationService().SetCurrentPage(this);
 }
示例#6
0
 public void ShowSpendsLists()
 {
     NavigationServiceSingleton.GetNavigationService().NavigateToPage(new AllSpendsPage());
 }
示例#7
0
 public void ShowDebtsLists()
 {
     NavigationServiceSingleton.GetNavigationService().NavigateToPage(new AllDebtsPage());
 }
 private void GoBack()
 {
     NavigationServiceSingleton.GetNavigationService().NavigateBack();
 }
 private void EditPerson()
 {
     Debug.WriteLine(SelectedPerson.Firstname);
     NavigationServiceSingleton.GetNavigationService().NavigateToPage(new EditPage(SelectedPerson, PersonsList));
 }
 private void AddPerson()
 {
     NavigationServiceSingleton.GetNavigationService().NavigateToPage(new AddPage(PersonsList));
 }
示例#11
0
 private void btnGoBack_Click(object sender, RoutedEventArgs e)
 {
     NavigationServiceSingleton.GetNavigationService().NavigateBack();
 }