void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainWindow = ((Snake.MainWindow)(target)); #line 1 "..\..\MainWindow.xaml" this.mainWindow.KeyDown += new System.Windows.Input.KeyEventHandler(this.RectKeyDown); #line default #line hidden return; case 2: this.myBase = ((System.Windows.Controls.Canvas)(target)); return; case 3: this.gameAreaBorder = ((System.Windows.Controls.Border)(target)); return; case 4: this.gameArea = ((System.Windows.Controls.Canvas)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MainWindow1 = ((Snake.MainWindow)(target)); return; case 2: this.PlayButton = ((System.Windows.Controls.Button)(target)); #line 18 "..\..\MainWindow.xaml" this.PlayButton.Click += new System.Windows.RoutedEventHandler(this.PlayButton_Click); #line default #line hidden return; case 3: this.ExitButton = ((System.Windows.Controls.Button)(target)); #line 19 "..\..\MainWindow.xaml" this.ExitButton.Click += new System.Windows.RoutedEventHandler(this.ExitButton_Click); #line default #line hidden return; } this._contentLoaded = true; }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); MainWindow mainWindow = new MainWindow(); Dane.border = mainWindow.BaseBorder; MainViewModel mainViewModel = new MainViewModel(); mainWindow.KeyDown += mainViewModel.KeyDown; mainWindow.DataContext = mainViewModel; mainWindow.Show(); }
public void StartGui() { Gui = new MainWindow(); Application.Run(Gui); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.window = ((Snake.MainWindow)(target)); #line 10 "..\..\MainWindow.xaml" this.window.ContentRendered += new System.EventHandler(this.Window_ContentRendered); #line default #line hidden #line 10 "..\..\MainWindow.xaml" this.window.KeyUp += new System.Windows.Input.KeyEventHandler(this.Window_KeyUp); #line default #line hidden #line 11 "..\..\MainWindow.xaml" this.window.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseDown); #line default #line hidden return; case 2: this.pnlTitleBar = ((System.Windows.Controls.Grid)(target)); return; case 3: this.tbStatusScore = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.tbStatusSpeed = ((System.Windows.Controls.TextBlock)(target)); return; case 5: this.btnClose = ((System.Windows.Controls.Button)(target)); #line 46 "..\..\MainWindow.xaml" this.btnClose.Click += new System.Windows.RoutedEventHandler(this.BtnClose_Click); #line default #line hidden return; case 6: this.GameArea = ((System.Windows.Controls.Canvas)(target)); return; case 7: this.bdrWelcomeMessage = ((System.Windows.Controls.Border)(target)); return; case 8: this.btnShowHighscoreList = ((System.Windows.Controls.Button)(target)); #line 55 "..\..\MainWindow.xaml" this.btnShowHighscoreList.Click += new System.Windows.RoutedEventHandler(this.BtnShowHighscoreList_Click); #line default #line hidden return; case 9: this.bdrHighscoreList = ((System.Windows.Controls.Border)(target)); return; case 10: this.bdrNewHighscore = ((System.Windows.Controls.Border)(target)); return; case 11: this.txtPlayerName = ((System.Windows.Controls.TextBox)(target)); return; case 12: this.btnAddToHighscoreList = ((System.Windows.Controls.Button)(target)); #line 82 "..\..\MainWindow.xaml" this.btnAddToHighscoreList.Click += new System.Windows.RoutedEventHandler(this.BtnAddToHighscoreList_Click); #line default #line hidden return; case 13: this.bdrEndOfGame = ((System.Windows.Controls.Border)(target)); return; case 14: this.tbFinalScore = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }