/// <summary> /// 依赖项属性发生改变时,触发的事件: /// 当EndTimeProperty依赖项属性,的属性值发生改变的时候,调用这个方法 /// </summary> /// <param name="sender">依赖项对象</param> /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param> private static void OnEndTimeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { //取到控件 BugUiControl _bugUiControl = sender as BugUiControl; //如果EndTime为空的话,就隐藏[解决Bug]的Border控件 string _newValue = e.NewValue as string; if (_newValue == null || _newValue == "") { _bugUiControl.SolveBugBorder.Visibility = Visibility.Hidden; } else { _bugUiControl.SolveBugBorder.Visibility = Visibility.Visible; } }
/// <summary> /// 依赖项属性发生改变时,触发的事件: /// 当IsShowSubmitButtonAnimationProperty依赖项属性,的属性值发生改变的时候,调用这个方法 /// </summary> /// <param name="sender">依赖项对象</param> /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param> private static void OnIsShowSubmitButtonAnimationChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { //获取控件 BugUiControl _bugUiControl = sender as BugUiControl; //判断:动画 switch ((bool)e.NewValue) { //当[省略号]显示时,等2秒后,关闭[省略号] case true: AnimationTool.PlayGridOpacityAnimation(_bugUiControl.AnimationGrid, 0, 0, 2f, (object _sender1, EventArgs _e1) => { //当完成动画后,关闭[省略号] _bugUiControl.IsShowSubmitButtonAnimation = false; }); break; } //判断:返回按钮 switch ((bool)e.NewValue) { //当[省略号]显示时,关闭[返回按钮] case true: _bugUiControl.BackGrid.Visibility = Visibility.Collapsed; break; //当[省略号]隐藏时,显示[返回按钮] case false: _bugUiControl.BackGrid.Visibility = Visibility.Visible; break; } //触发事件 _bugUiControl.OnIsShowSubmitButtonAnimationChange((bool)e.OldValue, (bool)e.NewValue); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.BugUiUserControl = ((EasyBugManager.BugUiControl)(target)); #line 13 "..\..\..\..\..\Xaml\Control\Ui\BugUiControl.xaml" this.BugUiUserControl.IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.BugUiControl_OnIsVisibleChanged); #line default #line hidden return; case 2: this.StartTimeTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.SolveBugBorder = ((System.Windows.Controls.Border)(target)); return; case 4: this.EndTimeTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.UpdateNumberFrontTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.UpdateNumberTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 7: this.UpdateNumberBehindTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 8: this.BugNameButtonControl = ((EasyBugManager.ColorButtonControl)(target)); return; case 9: this.BugNameTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.BackGrid = ((System.Windows.Controls.Grid)(target)); return; case 11: this.BackButtonControl = ((EasyBugManager.ColorButtonControl)(target)); return; case 12: this.RightCanvas = ((System.Windows.Controls.Canvas)(target)); #line 233 "..\..\..\..\..\Xaml\Control\Ui\BugUiControl.xaml" this.RightCanvas.MouseEnter += new System.Windows.Input.MouseEventHandler(this.RightCanvas_OnMouseEnter); #line default #line hidden #line 234 "..\..\..\..\..\Xaml\Control\Ui\BugUiControl.xaml" this.RightCanvas.MouseLeave += new System.Windows.Input.MouseEventHandler(this.RightCanvas_OnMouseLeave); #line default #line hidden return; case 13: this.LineBorder = ((System.Windows.Controls.Border)(target)); return; case 14: this.RecordListBox = ((System.Windows.Controls.ListBox)(target)); return; case 15: this.IsShowBugReplyGrid = ((System.Windows.Controls.Grid)(target)); return; case 16: this.RecordInputBoxControl = ((EasyBugManager.RecordInputBoxControl)(target)); return; case 17: this.AnimationGrid = ((System.Windows.Controls.Grid)(target)); return; case 18: this.ForegroundCanvas = ((System.Windows.Controls.Canvas)(target)); 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; }