private static void OnSpinningPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BizzySpinner me = (BizzySpinner)d; if (me.IsSpinningChanged != null) { me.IsSpinningChanged(me, e); } }
private static void OnAnglePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BizzySpinner me = (BizzySpinner)d; if (!me.Spin && me.IsEnabled) { me.SpinAngle = (double)e.NewValue; } }
private static void OnSpinRatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BizzySpinner me = (BizzySpinner)d; if (me.Spinning) { if (me.spinAnimation != null) { Duration duration = TimeSpan.FromSeconds((double)e.NewValue); if (me.spinAnimation.Duration != duration) { me.spinAnimation.Duration = duration; me.ReBeginSpinningAnimation(); } } } }
private static void OnSpinPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BizzySpinner me = (BizzySpinner)d; if ((bool)e.NewValue) { // Spin is true: turn spin on if this control is enabled me.ControlSpinning(me.IsEnabled); } if (!(bool)e.NewValue) { me.ControlSpinning(false); } if (me.IsSpinChanged != null) { me.IsSpinChanged(me, e); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mnuBar = ((System.Windows.Controls.Menu)(target)); return; case 2: this.mnuFile = ((System.Windows.Controls.MenuItem)(target)); return; case 3: this.mnuFileSave = ((System.Windows.Controls.MenuItem)(target)); #line 17 "..\..\..\MainWindow.xaml" this.mnuFileSave.Click += new System.Windows.RoutedEventHandler(this.mnuFileSave_Click); #line default #line hidden return; case 4: this.mnuCancel = ((System.Windows.Controls.MenuItem)(target)); #line 18 "..\..\..\MainWindow.xaml" this.mnuCancel.Click += new System.Windows.RoutedEventHandler(this.mnuCancel_Click); #line default #line hidden return; case 5: this.mnuFileExit = ((System.Windows.Controls.MenuItem)(target)); #line 20 "..\..\..\MainWindow.xaml" this.mnuFileExit.Click += new System.Windows.RoutedEventHandler(this.mnuFileExit_Click); #line default #line hidden return; case 6: this.cmdPriceOption = ((System.Windows.Controls.Button)(target)); #line 36 "..\..\..\MainWindow.xaml" this.cmdPriceOption.Click += new System.Windows.RoutedEventHandler(this.cmdPriceOption_Click); #line default #line hidden return; case 7: this.spinnerWait = ((Fenestra.BizzySpinner)(target)); return; case 8: this.lblCount = ((System.Windows.Controls.Label)(target)); return; case 9: this.lstPrices = ((System.Windows.Controls.ListBox)(target)); return; case 10: this.txtInitialPrice = ((System.Windows.Controls.TextBox)(target)); return; case 11: this.txtExercisePrice = ((System.Windows.Controls.TextBox)(target)); return; case 12: this.txtUpGrowth = ((System.Windows.Controls.TextBox)(target)); return; case 13: this.txtDownGrowth = ((System.Windows.Controls.TextBox)(target)); return; case 14: this.txtInterestRate = ((System.Windows.Controls.TextBox)(target)); return; case 15: this.txtPeriods = ((System.Windows.Controls.TextBox)(target)); return; case 16: this.txtSimulations = ((System.Windows.Controls.TextBox)(target)); return; } this._contentLoaded = true; }
private static void OnSpinRatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BizzySpinner me = (BizzySpinner)d; me.SetSpinRate((double)e.NewValue); }