Beispiel #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Start_Window = ((Tetris.StartScreen)(target));

            #line 8 "..\..\StartScreen.xaml"
                this.Start_Window.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Start_Window_MouseDown);

            #line default
            #line hidden
                return;

            case 2:
                this.startButton = ((System.Windows.Controls.Button)(target));

            #line 13 "..\..\StartScreen.xaml"
                this.startButton.Click += new System.Windows.RoutedEventHandler(this.button_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.quitButton = ((System.Windows.Controls.Button)(target));

            #line 14 "..\..\StartScreen.xaml"
                this.quitButton.Click += new System.Windows.RoutedEventHandler(this.quitButton_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.aboutButton = ((System.Windows.Controls.Button)(target));

            #line 15 "..\..\StartScreen.xaml"
                this.aboutButton.Click += new System.Windows.RoutedEventHandler(this.aboutButton_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.scoresButton = ((System.Windows.Controls.Button)(target));

            #line 16 "..\..\StartScreen.xaml"
                this.scoresButton.Click += new System.Windows.RoutedEventHandler(this.scoresButton_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.label = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #2
0
        private void btnStartScreen_Click(object sender, EventArgs e)
        {
            StartScreen startScreen = new StartScreen();

            Hide();
            startScreen.Show();
        }
        /// <summary>
        /// Back button Click
        /// </summary>
        /// <param name="sender">going back</param>
        /// <param name="e">mouse click event</param>
        private void BackButton_Click(object sender, RoutedEventArgs e)
        {
            StartScreen start = new StartScreen();

            start.ShowDialog();
            this.Close();
        }
Beispiel #4
0
        private void btnStartScreen_Click(object sender, EventArgs e)
        {
            Shapes.level = 0;
            Shapes.score = 0;
            Shapes.savedCubes.Clear();
            Shapes.clearedRows = 0;

            StartScreen startScreen = new StartScreen();

            Hide();
            startScreen.Show();
        }
Beispiel #5
0
        public SinglePlayer(StartScreen startScreen)
        {
            InitializeComponent();
            this.startScreen = startScreen;
            startPosition    = new Point(gridTop.X, gridTop.Y + Shapes.gridSize);



            for (int i = 0; i < nextShape.Length; i++)
            {
                nextShape[i] = random.Next(7);
            }
            NewShape(out activeShape, startPosition, nextShape[0]);
            NewNextShape();
            UpdateGhostShape();
            DoubleBuffered = true;
        }
Beispiel #6
0
 public Multiplayer(TcpClient client, StartScreen startScreen)
 {
     InitializeComponent();
     startPosition = new Point(gridTop.X, gridTop.Y + Shapes.gridSize);
     //player.Play();
     this.client = client;
     for (int i = 0; i < nextFigure.Length; i++)
     {
         nextFigure[i] = random.Next(7);
     }
     NewSymbol(out activeShape, startPosition, nextFigure[0]);
     UpdateNext();
     UpdateGhostShape();
     DoubleBuffered = true;
     allCubes.AddRange(activeShape.activeCubes);
     SendCubes();
     RecieveData();
     this.startScreen = startScreen;
 }
Beispiel #7
0
 public ChooseOpponent(StartScreen startScreen)
 {
     InitializeComponent();
     this.startScreen = startScreen;
     ConnectToServer();
 }