/// <summary> /// 依赖项属性发生改变时,触发的事件: /// 当SyncIconAnimationStateTypeProperty依赖项属性,的属性值发生改变的时候,调用这个方法 /// </summary> /// <param name="sender">依赖项对象</param> /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param> private static void OnSyncIconAnimationStateTypeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { //获取控件 SyncUiControl _syncUiControl = sender as SyncUiControl; //判断 switch ((AnimationStateType)e.NewValue) { case AnimationStateType.None: break; //如果是[开始]动画 case AnimationStateType.Start: _syncUiControl.PlaySyncIconAnimation(); //播放动画 break; //如果是[结束]动画 case AnimationStateType.End: _syncUiControl.StopSyncIconAnimation(); //停止动画 break; } //触发事件 _syncUiControl.OnSyncIconAnimationStateTypeChange((AnimationStateType)e.OldValue, (AnimationStateType)e.NewValue); }
/// <summary> /// 依赖项属性发生改变时,触发的事件: /// 当IsShowSyncLogProperty依赖项属性,的属性值发生改变的时候,调用这个方法 /// </summary> /// <param name="sender">依赖项对象</param> /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param> private static void OnIsShowSyncLogChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { //获取控件 SyncUiControl _syncUiControl = sender as SyncUiControl; //触发事件 _syncUiControl.OnIsShowSyncLogChange((bool)e.OldValue, (bool)e.NewValue); }
/// <summary> /// 依赖项属性发生改变时,触发的事件: /// 当SyncStateTypeProperty依赖项属性,的属性值发生改变的时候,调用这个方法 /// </summary> /// <param name="sender">依赖项对象</param> /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param> private static void OnSyncStateTypeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { //获取控件 SyncUiControl _syncUiControl = sender as SyncUiControl; //判断值 switch ((SyncStateType)e.NewValue) { //如果是[空] case SyncStateType.None: //不做任何处理 break; //如果是[不同步] case SyncStateType.NoSync: _syncUiControl.EnNoSyncBorder.Visibility = Visibility.Visible; _syncUiControl.EnSyncingBorder.Visibility = Visibility.Collapsed; _syncUiControl.EnSyncedBorder.Visibility = Visibility.Collapsed; _syncUiControl.CnNoSyncBorder.Visibility = Visibility.Visible; _syncUiControl.CnSyncingBorder.Visibility = Visibility.Collapsed; _syncUiControl.CnSyncedBorder.Visibility = Visibility.Collapsed; _syncUiControl.SyncIconBorder.Visibility = Visibility.Collapsed; _syncUiControl.TimeTextBlock.Visibility = Visibility.Collapsed; _syncUiControl.WaitSyncAnimationStateType = AnimationStateType.None; //停止等待 _syncUiControl.SyncIconAnimationStateType = AnimationStateType.None; //停止动画 break; //如果是[准备同步] case SyncStateType.WaitSync: _syncUiControl.WaitSyncAnimationStateType = AnimationStateType.Start; //准备同步 break; //如果是[同步中] case SyncStateType.Syncing: _syncUiControl.EnNoSyncBorder.Visibility = Visibility.Collapsed; _syncUiControl.EnSyncingBorder.Visibility = Visibility.Visible; _syncUiControl.EnSyncedBorder.Visibility = Visibility.Collapsed; _syncUiControl.CnNoSyncBorder.Visibility = Visibility.Collapsed; _syncUiControl.CnSyncingBorder.Visibility = Visibility.Visible; _syncUiControl.CnSyncedBorder.Visibility = Visibility.Collapsed; _syncUiControl.SyncIconBorder.Visibility = Visibility.Visible; _syncUiControl.TimeTextBlock.Visibility = Visibility.Collapsed; _syncUiControl.SyncIconAnimationStateType = AnimationStateType.Start; //播放动画 break; //如果是[同步完成] case SyncStateType.Synced: _syncUiControl.EnNoSyncBorder.Visibility = Visibility.Collapsed; _syncUiControl.EnSyncingBorder.Visibility = Visibility.Collapsed; _syncUiControl.EnSyncedBorder.Visibility = Visibility.Visible; _syncUiControl.CnNoSyncBorder.Visibility = Visibility.Collapsed; _syncUiControl.CnSyncingBorder.Visibility = Visibility.Collapsed; _syncUiControl.CnSyncedBorder.Visibility = Visibility.Visible; _syncUiControl.SyncIconBorder.Visibility = Visibility.Collapsed; _syncUiControl.TimeTextBlock.Visibility = Visibility.Visible; _syncUiControl.WaitSyncAnimationStateType = AnimationStateType.None; //停止等待 _syncUiControl.SyncIconAnimationStateType = AnimationStateType.None; //停止动画 break; } //触发事件 _syncUiControl.OnSyncStateTypeChange((SyncStateType)e.OldValue, (SyncStateType)e.NewValue); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.SyncUiUserControl = ((EasyBugManager.SyncUiControl)(target)); return; case 2: this.WaitSyncBorder = ((System.Windows.Controls.Border)(target)); return; case 3: this.CnSyncButtonGrid = ((System.Windows.Controls.Grid)(target)); return; case 4: this.CnSyncButtonControl = ((EasyBugManager.ColorButtonControl)(target)); return; case 5: this.CnNoSyncBorder = ((System.Windows.Controls.Border)(target)); return; case 6: this.CnSyncingBorder = ((System.Windows.Controls.Border)(target)); return; case 7: this.CnSyncedBorder = ((System.Windows.Controls.Border)(target)); return; case 8: this.EnSyncButtonGrid = ((System.Windows.Controls.Grid)(target)); return; case 9: this.EnSyncButtonControl = ((EasyBugManager.ColorButtonControl)(target)); return; case 10: this.EnNoSyncBorder = ((System.Windows.Controls.Border)(target)); return; case 11: this.EnSyncingBorder = ((System.Windows.Controls.Border)(target)); return; case 12: this.EnSyncedBorder = ((System.Windows.Controls.Border)(target)); return; case 13: this.SyncIconBorder = ((System.Windows.Controls.Border)(target)); return; case 14: this.SyncIconBorderRotateTransform = ((System.Windows.Media.RotateTransform)(target)); return; case 15: this.TimeTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 16: this.TopButtonBackgroundGroupStackPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 17: this.BackgroundBorder = ((System.Windows.Controls.Border)(target)); return; case 18: this.SyncLogTitleTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 19: this.NumberOfSyncTitleTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 20: this.NumberOfSyncContentTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 21: this.LastSyncTimeTitleTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 22: this.LastSyncTimeContentTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 23: this.ForegroundCanvas = ((System.Windows.Controls.Canvas)(target)); return; case 24: this.TopButtonForegroundGroupStackPanel = ((System.Windows.Controls.StackPanel)(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; }