void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.AddStatusEffectWindow = ((WPFTools.Popups.AddStatusEffect)(target)); #line 4 "..\..\..\..\Popups\AddStatusEffect.xaml" this.AddStatusEffectWindow.Closing += new System.ComponentModel.CancelEventHandler(this.AddStatusEffectWindow_Closing); #line default #line hidden return; case 2: this.label3 = ((System.Windows.Controls.Label)(target)); return; case 3: this.label1 = ((System.Windows.Controls.Label)(target)); return; case 4: this.label2 = ((System.Windows.Controls.Label)(target)); return; case 5: this.AddStatusEffectButton = ((System.Windows.Controls.Button)(target)); #line 12 "..\..\..\..\Popups\AddStatusEffect.xaml" this.AddStatusEffectButton.Click += new System.Windows.RoutedEventHandler(this.AddStatusEffect_Click); #line default #line hidden return; case 6: this.CancelAddStatusEffectButton = ((System.Windows.Controls.Button)(target)); #line 13 "..\..\..\..\Popups\AddStatusEffect.xaml" this.CancelAddStatusEffectButton.Click += new System.Windows.RoutedEventHandler(this.CancelAddStatusEffect_Click); #line default #line hidden return; case 7: this.AddStatusEffectNameBox = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.AddStatusEffectValueBox = ((System.Windows.Controls.TextBox)(target)); return; } this._contentLoaded = true; }
private void AddEnemySERes_Click(object sender, RoutedEventArgs e) { var instWindow = new WPFTools.Popups.AddStatusEffect((XmlElement)((XmlElement)EnemyLevelsListBox.SelectedItem).SelectSingleNode("StatusResistances"), "Resistance"); var helper = new WindowInteropHelper(instWindow); helper.Owner = new WindowInteropHelper(this).Handle; bool? res = instWindow.ShowDialog(); if (res != null && res == true) { } else { } /* * NewEnemyInstanceWindow instWindow = new NewEnemyInstanceWindow(this.NewEnemyElement); var helper = new WindowInteropHelper(instWindow); helper.Owner = new WindowInteropHelper(this).Handle; bool? res = instWindow.ShowDialog(); if (res != null && (bool)res) { } else { // MessageBox.Show("Did not add new enemy instance"); } */ }