Esempio n. 1
0
        /// <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)
            {
                //获取控件
                ChangeBugUiControl _changeBugUiControl = sender as ChangeBugUiControl;

                //判断:修改CheckGroup
                switch ((PriorityType)e.NewValue)
                {
                case PriorityType.Low:
                    _changeBugUiControl.PriorityCheckGroup.CheckedIndex = 0;
                    break;

                case PriorityType.Mid:
                    _changeBugUiControl.PriorityCheckGroup.CheckedIndex = 1;
                    break;

                case PriorityType.High:
                    _changeBugUiControl.PriorityCheckGroup.CheckedIndex = 2;
                    break;
                }

                //触发事件
                _changeBugUiControl.OnPriorityChange((PriorityType)e.OldValue, (PriorityType)e.NewValue);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 依赖项属性发生改变时,触发的事件:
        /// 当ProgressTypeProperty依赖项属性,的属性值发生改变的时候,调用这个方法
        /// </summary>
        /// <param name="sender">依赖项对象</param>
        /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param>
        private static void OnProgressTypeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            if ((ProgressType)e.OldValue != (ProgressType)e.NewValue)
            {
                //获取控件
                ChangeBugUiControl _changeBugUiControl = sender as ChangeBugUiControl;

                //判断:修改CheckGroup
                switch ((ProgressType)e.NewValue)
                {
                case ProgressType.Undone:
                    _changeBugUiControl.ProgressCheckGroup.CheckedIndex = 0;
                    break;

                case ProgressType.Solved:
                    _changeBugUiControl.ProgressCheckGroup.CheckedIndex = 1;
                    break;

                case ProgressType.Deprecat:
                    _changeBugUiControl.ProgressCheckGroup.CheckedIndex = 2;
                    break;
                }

                //触发事件
                _changeBugUiControl.OnProgressChange((ProgressType)e.OldValue, (ProgressType)e.NewValue);
            }
        }
Esempio n. 3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ChangeBugUiUserControl = ((EasyBugManager.ChangeBugUiControl)(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.ProgressCheckGroup = ((EasyBugManager.ImageCheckGroupControl)(target));
     return;
     case 6:
     this.RelatedBugsGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 7:
     this.RelatedBugsListBorder = ((System.Windows.Controls.Border)(target));
     return;
     case 8:
     this.RelatedBugsListBox = ((System.Windows.Controls.ListBox)(target));
     return;
     case 9:
     this.BugNameTextBox = ((System.Windows.Controls.TextBox)(target));
     
     #line 218 "..\..\..\..\..\Xaml\Control\Ui\ChangeBugUiControl.xaml"
     this.BugNameTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.BugNameTextBox_TextChanged);
     
     #line default
     #line hidden
     
     #line 219 "..\..\..\..\..\Xaml\Control\Ui\ChangeBugUiControl.xaml"
     this.BugNameTextBox.GotFocus += new System.Windows.RoutedEventHandler(this.BugNameTextBox_GotFocus);
     
     #line default
     #line hidden
     
     #line 220 "..\..\..\..\..\Xaml\Control\Ui\ChangeBugUiControl.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;
        }