Пример #1
0
        /// <summary>
        /// 当点击[删除Bug]按钮时
        /// </summary>
        /// <param name="_source">触发这个事件的Bug控件(Tag属性里有BugData)</param>
        public void ClickDeleteBugButton(BugListItemControl _source)
        {
            //如果用户选择了Bug
            if (_source != null)
            {
                //取到BugData
                BugItemData _bugItemData = _source.Tag as BugItemData;
                BugData     _bugData     = _bugItemData.Data;

                //如果[还要提示]
                if (AppManager.Datas.AppData.IsNotAgainShowDeleteBugTip == false)
                {
                    //显示删除Bug界面
                    AppManager.Uis.DeleteBugTipUi.UiControl.Data = _bugData;
                    AppManager.Uis.DeleteBugTipUi.UiControl.Text = StringTool.Clamp(_bugData.Name.Text, 50);
                    AppManager.Uis.DeleteBugTipUi.OpenOrClose(true);
                }

                //如果[不再提示]
                else
                {
                    //直接删除Bug
                    AppManager.Systems.BugSystem.DeleteBug(_bugData);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 依赖项属性发生改变时,触发的事件:
        /// 当GoToPageNumberProperty依赖项属性,的属性值发生改变的时候,调用这个方法
        /// </summary>
        /// <param name="sender">依赖项对象</param>
        /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param>
        private static void OnGoToPageNumberChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            //获取控件
            BugListItemControl _bugListItemControl = sender as BugListItemControl;

            //判断:如果为-1,或者小于等于0,就代表不跳转(不显示跳转提示)
            if ((int)e.NewValue <= 0)
            {
                //关闭提示面板
                _bugListItemControl.TipStackPanel.Visibility = Visibility.Collapsed;

                //修改按钮 长度
                _bugListItemControl.BaseCheckControl.SetValue(Grid.ColumnSpanProperty, 2);

                //显示[时间]和[更多按钮]
                _bugListItemControl.CreateTimeTextBlock.Visibility = Visibility.Visible;
                _bugListItemControl.UpdateTimeTextBlock.Visibility = Visibility.Visible;
            }

            //判断:如果大于等于1,就代表要显示跳转提示
            else
            {
                //修改按钮 长度
                _bugListItemControl.BaseCheckControl.SetValue(Grid.ColumnSpanProperty, 1);

                //显示提示面板
                _bugListItemControl.TipStackPanel.Visibility = Visibility.Visible;

                //关闭[时间]和[更多按钮]
                _bugListItemControl.CreateTimeTextBlock.Visibility = Visibility.Hidden;
                _bugListItemControl.UpdateTimeTextBlock.Visibility = Visibility.Hidden;
            }
        }
Пример #3
0
        /// <summary>
        /// 当点击右键菜单中的[优先级Type]的 某一个Check时
        /// </summary>
        /// <param name="_source">触发这个事件的Bug控件(Tag属性里有BugData)</param>
        public void ClickPriorityTypeButtonInBugContextMenu(BugListItemControl _source)
        {
            //获取Bug数据
            BugItemData _bugItemData = _source.Tag as BugItemData;
            BugData     _bugData     = _bugItemData.Data;

            //通知Bug已经修改
            AppManager.Systems.BugSystem.ChangeBug(_bugData);
        }
Пример #4
0
        /// <summary>
        /// 当点击Bug的[跳转页面]按钮时
        /// </summary>
        /// <param name="_source">触发这个事件的Bug控件(Tag属性里有BugData)</param>
        public void ClickGoToPageButtonInBug(BugListItemControl _source)
        {
            //获取Bug数据
            BugItemData _bugItemData = _source.Tag as BugItemData;
            BugData     _bugData     = _bugItemData.Data;

            //跳转到Bug所在的页面,并选中Bug
            AppManager.Systems.PageSytem.Turn(_bugData);
        }
Пример #5
0
        /// <summary>
        /// 当点击Bug的[进度]按钮时
        /// </summary>
        /// <param name="_source">触发这个事件的Bug控件(Tag属性里有BugData)</param>
        public void ClickProgressButtonInBug(BugListItemControl _source)
        {
            //获取Bug数据
            BugItemData _bugItemData = _source.Tag as BugItemData;
            BugData     _bugData     = _bugItemData.Data;

            //打开Bug界面
            AppManager.Uis.ChangeBugUi.UiControl.BugData = _bugData;
            AppManager.Uis.ChangeBugUi.OpenOrClose(true);
        }
Пример #6
0
        /// <summary>
        /// 当点击Bug的[更多]按钮时
        /// </summary>
        /// <param name="_source">触发这个事件的Bug控件(Tag属性里有BugData)</param>
        public void ClickMoreButtonInBug(BugListItemControl _source)
        {
            //获取Bug数据
            BugItemData _bugItemData = _source.Tag as BugItemData;
            BugData     _bugData     = _bugItemData.Data;


            //更新Bug的[显示数据]
            AppManager.Datas.OtherData.ShowBugItemData = _bugItemData;
            //更新Bug的[显示记录]
            AppManager.Systems.RecordSystem.SetShowRecords(_bugData, AppManager.Datas.OtherData.IsShowBugReply);


            //打开Bug界面
            this.OpenOrClose(false);
            AppManager.Uis.BugUi.OpenOrClose(true);
        }
Пример #7
0
        /// <summary>
        /// 依赖项属性发生改变时,触发的事件:
        /// 当IsDeleteProperty依赖项属性,的属性值发生改变的时候,调用这个方法
        /// </summary>
        /// <param name="sender">依赖项对象</param>
        /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param>
        private static void OnIsDeleteChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            //获取控件
            BugListItemControl _bugListItemControl = sender as BugListItemControl;

            //判断值
            switch ((bool)e.NewValue)
            {
            //如果[已删除]
            case true:
                _bugListItemControl.IsChecked = false;
                _bugListItemControl.DeletedGrid.Visibility = Visibility.Visible;
                break;

            //如果[未删除]
            case false:
                _bugListItemControl.DeletedGrid.Visibility = Visibility.Collapsed;
                break;
            }
        }
Пример #8
0
        /// <summary>
        /// 依赖项属性发生改变时,触发的事件:
        /// 当PriorityProperty依赖项属性,的属性值发生改变的时候,调用这个方法
        /// </summary>
        /// <param name="sender">依赖项对象</param>
        /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param>
        private static void OnPriorityChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            //取到控件
            BugListItemControl _bugListItemControl = sender as BugListItemControl;

            //判断是什么类型
            switch ((PriorityType)e.NewValue)
            {
            case PriorityType.Low:
                _bugListItemControl.LowPriorityBorder.Visibility  = Visibility.Visible;
                _bugListItemControl.MidPriorityBorder.Visibility  = Visibility.Collapsed;
                _bugListItemControl.HighPriorityBorder.Visibility = Visibility.Collapsed;
                break;

            case PriorityType.Mid:
                _bugListItemControl.LowPriorityBorder.Visibility  = Visibility.Collapsed;
                _bugListItemControl.MidPriorityBorder.Visibility  = Visibility.Visible;
                _bugListItemControl.HighPriorityBorder.Visibility = Visibility.Collapsed;
                break;

            case PriorityType.High:
                _bugListItemControl.LowPriorityBorder.Visibility  = Visibility.Collapsed;
                _bugListItemControl.MidPriorityBorder.Visibility  = Visibility.Collapsed;
                _bugListItemControl.HighPriorityBorder.Visibility = Visibility.Visible;
                break;

            case PriorityType.None:
                _bugListItemControl.LowPriorityBorder.Visibility  = Visibility.Collapsed;
                _bugListItemControl.MidPriorityBorder.Visibility  = Visibility.Collapsed;
                _bugListItemControl.HighPriorityBorder.Visibility = Visibility.Collapsed;
                break;
            }

            //修改右键菜单的PriorityType
            _bugListItemControl.ContextMenuControl.Priority = (PriorityType)e.NewValue;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ListUiUserControl = ((EasyBugManager.ListUiControl)(target));

            #line 13 "..\..\..\..\..\Xaml\Control\Ui\ListUiControl.xaml"
                this.ListUiUserControl.Loaded += new System.Windows.RoutedEventHandler(this.ListUiControl_OnLoaded);

            #line default
            #line hidden
                return;

            case 2:
                this.TopButtonGroupStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 3:
                this.MinimizeButtonControl = ((EasyBugManager.MinimizeButtonControl)(target));
                return;

            case 4:
                this.CloseButtonControl = ((EasyBugManager.NoButtonControl)(target));
                return;

            case 5:
                this.SettingButtonControl = ((EasyBugManager.SettingButtonControl)(target));
                return;

            case 6:
                this.ProjectNameTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.UndoneBugNumberTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.PriorityHighBugNumberTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.PriorityMidBugNumberTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 10:
                this.PriorityLowBugNumberTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 11:
                this.SearchTextBox = ((System.Windows.Controls.TextBox)(target));

            #line 187 "..\..\..\..\..\Xaml\Control\Ui\ListUiControl.xaml"
                this.SearchTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.SearchTextBox_TextChanged);

            #line default
            #line hidden
                return;

            case 12:
                this.ClearSearchButtonControl = ((EasyBugManager.ImageButtonControl)(target));
                return;

            case 13:
                this.ProgressListHeadButtonControl = ((EasyBugManager.ListHeadButtonControl)(target));
                return;

            case 14:
                this.PriorityListHeadButtonControl = ((EasyBugManager.ListHeadButtonControl)(target));
                return;

            case 15:
                this.CreateTimeListHeadButtonControl = ((EasyBugManager.ListHeadButtonControl)(target));
                return;

            case 16:
                this.UpdateTimeListHeadButtonControl = ((EasyBugManager.ListHeadButtonControl)(target));
                return;

            case 17:
                this.BugListBox = ((System.Windows.Controls.ListBox)(target));
                return;

            case 18:
                this.BugListItemControl1 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 19:
                this.BugListItemControl2 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 20:
                this.BugListItemControl3 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 21:
                this.BugListItemControl4 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 22:
                this.BugListItemControl5 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 23:
                this.BugListItemControl6 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 24:
                this.BugListItemControl7 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 25:
                this.BugListItemControl8 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 26:
                this.BugListItemControl9 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 27:
                this.BugListItemControl10 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 28:
                this.BugListItemControl11 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 29:
                this.BugListItemControl12 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 30:
                this.BugListItemControl13 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 31:
                this.BugListItemControl14 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 32:
                this.BugListItemControl15 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 33:
                this.BugListItemControl16 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 34:
                this.BugListItemControl17 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 35:
                this.BugListItemControl18 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 36:
                this.BugListItemControl19 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 37:
                this.BugListItemControl20 = ((EasyBugManager.BugListItemControl)(target));
                return;

            case 38:
                this.ShowBugNumberCheckGroupControl = ((EasyBugManager.ImageCheckGroupControl)(target));
                return;

            case 39:
                this.PreviousPageButtonControl = ((EasyBugManager.ColorButtonControl)(target));
                return;

            case 40:
                this.CurrentPageNumberTextBox = ((System.Windows.Controls.TextBox)(target));

            #line 911 "..\..\..\..\..\Xaml\Control\Ui\ListUiControl.xaml"
                this.CurrentPageNumberTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.CurrentPageNumberTextBox_TextChanged);

            #line default
            #line hidden

            #line 915 "..\..\..\..\..\Xaml\Control\Ui\ListUiControl.xaml"
                this.CurrentPageNumberTextBox.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.CurrentPageNumberTextBox_PreviewTextInput);

            #line default
            #line hidden

            #line 916 "..\..\..\..\..\Xaml\Control\Ui\ListUiControl.xaml"
                this.CurrentPageNumberTextBox.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.CurrentPageNumberTextBox_PreviewKeyDown);

            #line default
            #line hidden
                return;

            case 41:
                this.TotalPageNumberTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 42:
                this.NextPageButtonControl = ((EasyBugManager.ColorButtonControl)(target));
                return;

            case 43:
                this.ListTipControl = ((EasyBugManager.ListTipControl)(target));
                return;

            case 44:
                this.ForegroundCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 45:
                this.TopButtonForegroundGroupStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #10
0
 /// <summary>
 /// 当点击右键菜单中的[更多]按钮
 /// </summary>
 /// <param name="_source">触发这个事件的Bug控件(Tag属性里有BugData)</param>
 public void ClickMoreButtonInBugContextMenu(BugListItemControl _source)
 {
     ClickMoreButtonInBug(_source);
 }
Пример #11
0
 /// <summary>
 /// 当点击右键菜单中的[删除]按钮
 /// </summary>
 /// <param name="_source">触发这个事件的Bug控件(Tag属性里有BugData)</param>
 public void ClickDeleteButtonInBugContextMenu(BugListItemControl _source)
 {
     ClickDeleteBugButton(_source);
 }
Пример #12
0
 /// <summary>
 /// 当双击Bug的按钮时
 /// </summary>
 /// <param name="_source">触发这个事件的Bug控件(Tag属性里有BugData)</param>
 public void MouseDoubleClickCheckInBug(BugListItemControl _source)
 {
     //进入BugUi(和点击[More]按钮一样)
     ClickMoreButtonInBug(_source);
 }
Пример #13
0
 /// <summary>
 /// 当点击Bug的[已删除]按钮时
 /// </summary>
 /// <param name="_source">触发这个事件的Bug控件(Tag属性里有BugData)</param>
 public void ClickDeletedButtonInBug(BugListItemControl _source)
 {
     //刷新当前页面
     AppManager.Systems.PageSytem.Refresh();
 }
Пример #14
0
        /// <summary>
        /// 依赖项属性发生改变时,触发的事件:
        /// 当PaddingProperty依赖项属性,的属性值发生改变的时候,调用这个方法
        /// </summary>
        /// <param name="sender">依赖项对象</param>
        /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param>
        private static void OnProgressChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            //取到控件
            BugListItemControl _bugListItemControl = sender as BugListItemControl;

            //判断是什么类型
            switch ((ProgressType)e.NewValue)
            {
            case ProgressType.Undone:
                //更改图片
                _bugListItemControl.UndoneProgressBorder.Visibility   = Visibility.Visible;
                _bugListItemControl.SolvedProgressBorder.Visibility   = Visibility.Collapsed;
                _bugListItemControl.DeprecatProgressBorder.Visibility = Visibility.Collapsed;

                //修改透明度
                _bugListItemControl.CreateTimeTextBlock.Opacity = 1;
                _bugListItemControl.UpdateTimeTextBlock.Opacity = 1;
                _bugListItemControl.TitleTextBlock.Opacity      = 1;
                _bugListItemControl.PriorityGrid.Opacity        = 1;

                //修改进度按钮
                _bugListItemControl.RedProgressButton.Visibility  = Visibility.Collapsed;
                _bugListItemControl.GreyProgressButton.Visibility = Visibility.Visible;
                break;

            case ProgressType.Solved:
                //更改图片
                _bugListItemControl.UndoneProgressBorder.Visibility   = Visibility.Collapsed;
                _bugListItemControl.SolvedProgressBorder.Visibility   = Visibility.Visible;
                _bugListItemControl.DeprecatProgressBorder.Visibility = Visibility.Collapsed;

                //修改透明度
                _bugListItemControl.CreateTimeTextBlock.Opacity = 0.5f;
                _bugListItemControl.UpdateTimeTextBlock.Opacity = 0.5f;
                _bugListItemControl.TitleTextBlock.Opacity      = 0.5f;
                _bugListItemControl.PriorityGrid.Opacity        = 0.5f;

                //修改进度按钮
                _bugListItemControl.RedProgressButton.Visibility  = Visibility.Visible;
                _bugListItemControl.GreyProgressButton.Visibility = Visibility.Collapsed;
                break;

            case ProgressType.Deprecat:
                //更改图片
                _bugListItemControl.UndoneProgressBorder.Visibility   = Visibility.Collapsed;
                _bugListItemControl.SolvedProgressBorder.Visibility   = Visibility.Collapsed;
                _bugListItemControl.DeprecatProgressBorder.Visibility = Visibility.Visible;

                //修改透明度
                _bugListItemControl.CreateTimeTextBlock.Opacity = 0.5f;
                _bugListItemControl.UpdateTimeTextBlock.Opacity = 0.5f;
                _bugListItemControl.TitleTextBlock.Opacity      = 0.5f;
                _bugListItemControl.PriorityGrid.Opacity        = 0.5f;

                //修改进度按钮
                _bugListItemControl.RedProgressButton.Visibility  = Visibility.Collapsed;
                _bugListItemControl.GreyProgressButton.Visibility = Visibility.Visible;
                break;

            case ProgressType.None:
                //更改图片
                _bugListItemControl.UndoneProgressBorder.Visibility   = Visibility.Collapsed;
                _bugListItemControl.SolvedProgressBorder.Visibility   = Visibility.Collapsed;
                _bugListItemControl.DeprecatProgressBorder.Visibility = Visibility.Collapsed;

                //修改透明度
                _bugListItemControl.CreateTimeTextBlock.Opacity = 1;
                _bugListItemControl.UpdateTimeTextBlock.Opacity = 1;
                _bugListItemControl.TitleTextBlock.Opacity      = 1;
                _bugListItemControl.PriorityGrid.Opacity        = 1;

                //修改进度按钮
                _bugListItemControl.RedProgressButton.Visibility  = Visibility.Collapsed;
                _bugListItemControl.GreyProgressButton.Visibility = Visibility.Visible;
                break;
            }

            //修改右键菜单的ProgressType
            _bugListItemControl.ContextMenuControl.Progress = (ProgressType)e.NewValue;
        }
        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;
        }