/// <summary> /// 依赖项属性发生改变时,触发的事件: /// 当PriorityTypeProperty依赖项属性,的属性值发生改变的时候,调用这个方法 /// </summary> /// <param name="sender">依赖项对象</param> /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param> private static void OnPriorityTypeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { if ((PriorityType)e.OldValue != (PriorityType)e.NewValue) { //获取控件 CreateBugUiControl _createBugControl = sender as CreateBugUiControl; //判断:修改CheckGroup switch ((PriorityType)e.NewValue) { case PriorityType.Low: _createBugControl.PriorityCheckGroup.CheckedIndex = 0; break; case PriorityType.Mid: _createBugControl.PriorityCheckGroup.CheckedIndex = 1; break; case PriorityType.High: _createBugControl.PriorityCheckGroup.CheckedIndex = 2; break; } //触发事件 _createBugControl.OnPriorityChange((PriorityType)e.OldValue, (PriorityType)e.NewValue); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.CreateBugUiUserControl = ((EasyBugManager.CreateBugUiControl)(target)); return; case 2: this.BackgroundBorder = ((System.Windows.Controls.Border)(target)); return; case 3: this.TipTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.PriorityCheckGroup = ((EasyBugManager.ImageCheckGroupControl)(target)); return; case 5: this.RelatedBugsGrid = ((System.Windows.Controls.Grid)(target)); return; case 6: this.RelatedBugsListBorder = ((System.Windows.Controls.Border)(target)); return; case 7: this.RelatedBugsListBox = ((System.Windows.Controls.ListBox)(target)); return; case 8: this.BugNameTextBox = ((System.Windows.Controls.TextBox)(target)); #line 180 "..\..\..\..\..\Xaml\Control\Ui\CreateBugUiControl.xaml" this.BugNameTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.BugNameTextBox_TextChanged); #line default #line hidden #line 181 "..\..\..\..\..\Xaml\Control\Ui\CreateBugUiControl.xaml" this.BugNameTextBox.GotFocus += new System.Windows.RoutedEventHandler(this.BugNameTextBox_GotFocus); #line default #line hidden #line 182 "..\..\..\..\..\Xaml\Control\Ui\CreateBugUiControl.xaml" this.BugNameTextBox.LostFocus += new System.Windows.RoutedEventHandler(this.BugNameTextBox_LostFocus); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 23 "..\..\MainWindow.xaml" ((EasyBugManager.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.MainWindow_OnLoaded); #line default #line hidden return; case 2: this.BackgroudBorder = ((System.Windows.Controls.Border)(target)); return; case 3: this.DragBackgroudGrid = ((System.Windows.Controls.Grid)(target)); return; case 4: #line 78 "..\..\MainWindow.xaml" ((System.Windows.Controls.Border)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.WindowTitleBorder_MouseLeftButtonDown); #line default #line hidden return; case 5: this.LatelyProjectUiControl = ((EasyBugManager.LatelyProjectUiControl)(target)); return; case 6: this.MainUiControl = ((EasyBugManager.MainUiControl)(target)); return; case 7: this.ListUiControl = ((EasyBugManager.ListUiControl)(target)); return; case 8: this.BugUiControl = ((EasyBugManager.BugUiControl)(target)); return; case 9: this.SyncUiControl = ((EasyBugManager.SyncUiControl)(target)); return; case 10: this.ImageUiControl = ((EasyBugManager.ImageUiControl)(target)); return; case 11: this.DragForegroundGrid = ((System.Windows.Controls.Grid)(target)); return; case 12: #line 259 "..\..\MainWindow.xaml" ((System.Windows.Controls.Border)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.WindowTitleBorder_MouseLeftButtonDown); #line default #line hidden return; case 13: this.SettingsUiControl = ((EasyBugManager.SettingsUiControl)(target)); return; case 14: this.CreateProjectUiControl = ((EasyBugManager.CreateProjectUiControl)(target)); return; case 15: this.ExportUiControl = ((EasyBugManager.ExportUiControl)(target)); return; case 16: this.CreateBugUiControl = ((EasyBugManager.CreateBugUiControl)(target)); return; case 17: this.ChangeBugUiControl = ((EasyBugManager.ChangeBugUiControl)(target)); return; case 18: this.DeleteBugTipUiControl = ((EasyBugManager.DeleteTipUiControl)(target)); return; case 19: this.DeleteRecordTipUiControl = ((EasyBugManager.DeleteTipUiControl)(target)); return; case 20: this.BaseTipUiControl = ((EasyBugManager.TipUiControl)(target)); return; case 21: this.LatelyProjectTipUiControl = ((EasyBugManager.TipUiControl)(target)); return; case 22: this.ErrorUiControl = ((EasyBugManager.ErrorUiControl)(target)); return; } this._contentLoaded = true; }