public HotkeyPopupWindow(SoundboardButton button) { InitializeComponent(); SelectedButton = button; //override effect of volume_valuechanged for the constructor bool edited = MainWindow.HaveChangesBeenMade; if (button.Volume != null) { Volume.Value = (double)button.Volume; } MainWindow.HaveChangesBeenMade = edited; }
public HotKey(ModifierKeys modifierKeys, Keys key, Window window, SoundboardButton button) : this(modifierKeys, key, new WindowInteropHelper(window)) { Button = button; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 10 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Load); #line default #line hidden return; case 2: #line 11 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Save); #line default #line hidden return; case 3: #line 12 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveAs); #line default #line hidden return; case 4: this.OutputDeviceList = ((System.Windows.Controls.MenuItem)(target)); return; case 5: this.AlternateOutputDeviceList = ((System.Windows.Controls.MenuItem)(target)); return; case 6: this.SoundboardButton_7 = ((Soundboard.SoundboardButton)(target)); return; case 7: this.SoundboardButton_4 = ((Soundboard.SoundboardButton)(target)); return; case 8: this.SoundboardButton_1 = ((Soundboard.SoundboardButton)(target)); return; case 9: this.SoundboardButton_8 = ((Soundboard.SoundboardButton)(target)); return; case 10: this.SoundboardButton_5 = ((Soundboard.SoundboardButton)(target)); return; case 11: this.SoundboardButton_2 = ((Soundboard.SoundboardButton)(target)); return; case 12: this.SoundboardButton_9 = ((Soundboard.SoundboardButton)(target)); return; case 13: this.SoundboardButton_6 = ((Soundboard.SoundboardButton)(target)); return; case 14: this.SoundboardButton_3 = ((Soundboard.SoundboardButton)(target)); return; case 15: this.SoundboardButton_0 = ((Soundboard.SoundboardButton)(target)); return; case 16: this.SoundboardButton_Period = ((Soundboard.SoundboardButton)(target)); return; case 17: this.SoundboardButton_Divide = ((Soundboard.SoundboardButton)(target)); return; case 18: this.SoundboardButton_Multiply = ((Soundboard.SoundboardButton)(target)); return; case 19: this.SoundboardButton_Subtract = ((Soundboard.SoundboardButton)(target)); return; case 20: this.SoundboardButton_Num_Lock = ((Soundboard.SoundboardButton)(target)); return; case 21: this.SoundboardButton_Add = ((Soundboard.SoundboardButton)(target)); return; case 22: this.SoundboardButton_Enter = ((Soundboard.SoundboardButton)(target)); return; case 23: this.Volume = ((System.Windows.Controls.Slider)(target)); #line 35 "..\..\MainWindow.xaml" this.Volume.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.Slider_ValueChanged); #line default #line hidden return; } this._contentLoaded = true; }