MainWindow
Inheritance: System.Windows.Window, System.Windows.Markup.IComponentConnector
Esempio n. 1
0
        private void pingBaidu()
        {
            try
            {

                Ping p = new Ping();
                PingReply pr = p.Send("www.baidu.com");
                if (pr.Status == IPStatus.Success||true)
                {
                    MainWindow mw = new MainWindow();
                    mw.Show();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("本程序需要网络连接,请先配置好当前网络环境");
                    return;
                }
            }
            catch (Exception)
            {
                MessageBox.Show("本程序需要网络连接,请先配置好当前网络环境");
                return;
            }
        }
 private void menuNuevoUsuario_Click(object sender, RoutedEventArgs e)
 {
     MainWindow _mw = new MainWindow();
     _mw.InitializeComponent();
     this.Close();
     _mw.Show();
 }
Esempio n. 3
0
 private void buttonLogin_Click(object sender, RoutedEventArgs e)
 {
     //Benutzername und Passwort überprüfen
     this.Hide();
     MainWindow mw = new MainWindow();
     mw.ShowDialog();
     this.Show();
 }
Esempio n. 4
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var mainViewModel = new MainViewModel();
            var mainWindow = new MainWindow {DataContext = mainViewModel };

            mainWindow.Show();
        }
 private void Label_MouseDown_2(object sender, MouseButtonEventArgs e)
 {
     MainWindow _mw = new MainWindow();
     _mw.InitializeComponent();
     this.Close();
     _mw.ShowDialog();
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mW = ((WpfApplication3.MainWindow)(target));
                return;

            case 2:
                this.gridMain = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.grdwhole = ((System.Windows.Controls.Grid)(target));
                return;

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

            #line 17 "..\..\..\View\MainWindow.xaml"
                this.btnRollDice.Click += new System.Windows.RoutedEventHandler(this.btnRollDice_Click);

            #line default
            #line hidden
                return;

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

            #line 19 "..\..\..\View\MainWindow.xaml"
                this.btnDisplayLog.Click += new System.Windows.RoutedEventHandler(this.btnDisplayLog_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.txtnop = ((System.Windows.Controls.TextBox)(target));

            #line 21 "..\..\..\View\MainWindow.xaml"
                this.txtnop.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtnop_TextChanged);

            #line default
            #line hidden
                return;

            case 7:
                this.btnSetPlayer = ((System.Windows.Controls.Button)(target));

            #line 22 "..\..\..\View\MainWindow.xaml"
                this.btnSetPlayer.Click += new System.Windows.RoutedEventHandler(this.btnSetPlayer_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.btnResetGame = ((System.Windows.Controls.Button)(target));

            #line 23 "..\..\..\View\MainWindow.xaml"
                this.btnResetGame.Click += new System.Windows.RoutedEventHandler(this.btnResetGame_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.lblPlayerText = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.lblDice = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.stkPnlPlayerList = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 12:
                this.dataGridScopre = ((System.Windows.Controls.DataGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }