void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.InGameMenuEscWnd = ((CardGameClient.InGameMenuEscWindow)(target)); return; case 2: this.CardNameLabel = ((System.Windows.Controls.Label)(target)); return; case 3: this.CancelBtn = ((CardGameClient.StyledBtn)(target)); return; case 4: this.LeaveBtn = ((CardGameClient.StyledBtn)(target)); return; case 5: this.ExitBtn = ((CardGameClient.StyledBtn)(target)); return; } this._contentLoaded = true; }
private void Window_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Escape) { var igmew = new InGameMenuEscWindow(this); App.WindowList.Add(igmew.Name, igmew); igmew.Show(); } }