示例#1
0
        public void Back_Click1(object sender, RoutedEventArgs e)
        {
            var SelectScherm = new MainMenuWindow(); //create your new form.

            SelectScherm.Show();                     //show the new form.
            window.Close();
        }
示例#2
0
        private void Back_Click(object sender, RoutedEventArgs e)
        {                                            // functie om weer terug te gaan naar het vorige window
            var SelectScherm = new MainMenuWindow(); //create your new form.

            SelectScherm.Show();                     //show the new form.
            window.Close();
        }
示例#3
0
        /// <summary>
        /// Dit slaat het spel op in een text bestand.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void SaveGame_Click(Object sender, RoutedEventArgs e)
        {
            string pathing;
            string path2;

            pathing = System.AppDomain.CurrentDomain.BaseDirectory;
            path2   = pathing.Replace("bin", "Textdocs");
            path2   = path2.Replace("Debug", "SavedGames");
            if (newofloadteller == 1)
            {
                plaatjesvolgorde.Add(Convert.ToString(MainClass.aantalSpelers));
            }
            else
            {
                plaatjesvolgorde.Add(File.ReadLines(padnaarsave).Skip(16).Take(1).First());
            }

            plaatjesvolgorde.Add(Player1Name);
            plaatjesvolgorde.Add(Player2Name);
            plaatjesvolgorde.Add(Convert.ToString(aandebeurt));
            plaatjesvolgorde.Add(Convert.ToString(P1Points));
            plaatjesvolgorde.Add(Convert.ToString(P2Points));
            plaatjesvolgorde.Add(Convert.ToString(pairs));

            if (newofloadteller == 2)
            {
                File.Delete(padnaarsave);
            }

            System.IO.File.WriteAllLines(path3 + (fileCount + 1) + " " + themanaamsave + Player1Name + " vs " + Player2Name + ".sav", plaatjesvolgorde);
            var SelectScherm = new MainMenuWindow(); //create your new form.

            SelectScherm.Show();                     //show the new form.
            window.Close();
        }
示例#4
0
        /// <summary>
        /// Het hoofdgrid.
        /// </summary>
        /// <param name="grid"></param>
        public MainClass(MainMenuWindow window, Grid grid)
        {  //settings//
            if (MainClass.windowstyle == 2)
            {
                window.WindowStyle = WindowStyle.None;
            }
            else
            {
                window.WindowStyle = WindowStyle.SingleBorderWindow;
            }
            if (MainClass.windowstate == 2)
            {
                window.WindowState = WindowState.Maximized;
            }
            else
            {
                window.WindowState = WindowState.Normal;
            }
            //end//
            this.window = window;
            this.grid   = grid;

            int kolommen = 6;
            int rijen    = 20;

            InitializeMain(kolommen, rijen);

            AddTitle();
            AddNewGame();
            AddLoadGame();
            AddHighScores();
            AddSettings();
            AddQuit();
        }