/// <summary> /// 依赖项属性发生改变时,触发的事件: /// 当ProgressProperty依赖项属性,的属性值发生改变的时候,调用这个方法 /// </summary> /// <param name="sender">依赖项对象</param> /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param> private static void OnProgressChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { if ((ProgressType)e.OldValue != (ProgressType)e.NewValue) { //获取控件 BugListItemContextMenuControl _bugListItemContextMenuControl = sender as BugListItemContextMenuControl; //判断:修改CheckGroup switch ((ProgressType)e.NewValue) { case ProgressType.Undone: _bugListItemContextMenuControl.ProgressCheckGroup.CheckedIndex = 0; break; case ProgressType.Solved: _bugListItemContextMenuControl.ProgressCheckGroup.CheckedIndex = 1; break; case ProgressType.Deprecat: _bugListItemContextMenuControl.ProgressCheckGroup.CheckedIndex = 2; break; } //触发事件 _bugListItemContextMenuControl.OnProgressTypeChange((ProgressType)e.OldValue, (ProgressType)e.NewValue); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.BugListItemContextMenuUserControl = ((EasyBugManager.BugListItemContextMenuControl)(target)); return; case 2: this.ContextMenuPanel = ((System.Windows.Controls.Grid)(target)); return; case 3: this.BaseBorder = ((System.Windows.Controls.Border)(target)); return; case 4: this.ProgressButtonControl = ((EasyBugManager.ImageButtonControl)(target)); return; case 5: this.DeleteButtonControl = ((EasyBugManager.ImageButtonControl)(target)); return; case 6: this.MoreButtonControl = ((EasyBugManager.ImageButtonControl)(target)); return; case 7: this.Line1Border = ((System.Windows.Controls.Border)(target)); return; case 8: this.Line2Border = ((System.Windows.Controls.Border)(target)); return; case 9: this.Line3Border = ((System.Windows.Controls.Border)(target)); return; case 10: this.ProgressPanel = ((System.Windows.Controls.Primitives.Popup)(target)); #line 102 "..\..\..\..\..\..\Xaml\Control\Perfab\ListUi\BugListItemContextMenuControl.xaml" this.ProgressPanel.MouseLeave += new System.Windows.Input.MouseEventHandler(this.ProgressPanel_MouseLeave); #line default #line hidden #line 103 "..\..\..\..\..\..\Xaml\Control\Perfab\ListUi\BugListItemContextMenuControl.xaml" this.ProgressPanel.MouseEnter += new System.Windows.Input.MouseEventHandler(this.ProgressPanel_MouseEnter); #line default #line hidden return; case 11: this.ProgressBorder = ((System.Windows.Controls.Border)(target)); return; case 12: this.ProgressCheckGroup = ((EasyBugManager.ImageCheckGroupControl)(target)); return; case 13: this.PriorityPanel = ((System.Windows.Controls.Primitives.Popup)(target)); #line 147 "..\..\..\..\..\..\Xaml\Control\Perfab\ListUi\BugListItemContextMenuControl.xaml" this.PriorityPanel.MouseLeave += new System.Windows.Input.MouseEventHandler(this.PriorityPanel_MouseLeave); #line default #line hidden #line 148 "..\..\..\..\..\..\Xaml\Control\Perfab\ListUi\BugListItemContextMenuControl.xaml" this.PriorityPanel.MouseEnter += new System.Windows.Input.MouseEventHandler(this.PriorityPanel_MouseEnter); #line default #line hidden return; case 14: this.PriorityBorder = ((System.Windows.Controls.Border)(target)); return; case 15: this.PriorityCheckGroup = ((EasyBugManager.ImageCheckGroupControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.BugListItemUserControl = ((EasyBugManager.BugListItemControl)(target)); #line 13 "..\..\..\..\..\..\Xaml\Control\Perfab\ListUi\BugListItemControl.xaml" this.BugListItemUserControl.DataContextChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.BugListItemControl_OnDataContextChanged); #line default #line hidden #line 14 "..\..\..\..\..\..\Xaml\Control\Perfab\ListUi\BugListItemControl.xaml" this.BugListItemUserControl.LostFocus += new System.Windows.RoutedEventHandler(this.BugListItemControl_OnLostFocus); #line default #line hidden return; case 2: this.BaseCheckControl = ((EasyBugManager.ColorCheckControl)(target)); return; case 3: this.TipStackPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 4: this.RefreshButtonControl = ((EasyBugManager.ColorButtonControl)(target)); return; case 5: this.GoToPageButtonControl = ((EasyBugManager.ColorButtonControl)(target)); return; case 6: this.GoToPageNumberTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 7: this.UndoneProgressBorder = ((System.Windows.Controls.Border)(target)); return; case 8: this.SolvedProgressBorder = ((System.Windows.Controls.Border)(target)); return; case 9: this.DeprecatProgressBorder = ((System.Windows.Controls.Border)(target)); return; case 10: this.RedProgressButton = ((EasyBugManager.ColorButtonControl)(target)); return; case 11: this.GreyProgressButton = ((EasyBugManager.ColorButtonControl)(target)); return; case 12: this.PriorityGrid = ((System.Windows.Controls.Grid)(target)); return; case 13: this.LowPriorityBorder = ((System.Windows.Controls.Border)(target)); return; case 14: this.MidPriorityBorder = ((System.Windows.Controls.Border)(target)); return; case 15: this.HighPriorityBorder = ((System.Windows.Controls.Border)(target)); return; case 16: this.TitleTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 17: this.CreateTimeTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 18: this.UpdateTimeTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 19: this.MoreButtonControl = ((EasyBugManager.ColorButtonControl)(target)); return; case 20: this.DeletedGrid = ((System.Windows.Controls.Grid)(target)); return; case 21: this.DeletedButtonControl = ((EasyBugManager.ColorButtonControl)(target)); return; case 22: this.DeletedBorder = ((System.Windows.Controls.Border)(target)); return; case 23: this.ClickRefreshBorder = ((System.Windows.Controls.Border)(target)); return; case 24: this.ContextMenuPopup = ((System.Windows.Controls.Primitives.Popup)(target)); #line 290 "..\..\..\..\..\..\Xaml\Control\Perfab\ListUi\BugListItemControl.xaml" this.ContextMenuPopup.Opened += new System.EventHandler(this.ContextMenuPopup_Opened); #line default #line hidden #line 290 "..\..\..\..\..\..\Xaml\Control\Perfab\ListUi\BugListItemControl.xaml" this.ContextMenuPopup.Closed += new System.EventHandler(this.ContextMenuPopup_Closed); #line default #line hidden return; case 25: this.ContextMenuControl = ((EasyBugManager.BugListItemContextMenuControl)(target)); return; } this._contentLoaded = true; }