//当点击[Item]中的[从列表中移除]按钮时
        private void LatelyProjectListItemControl_OnClickRemoveButton(object sender, RoutedPropertyChangedEventArgs <bool> e)
        {
            //获取控件
            LatelyProjectListItemControl _latelyProjectListItemControl = sender as LatelyProjectListItemControl;

            //获取数据
            LatelyProjectData _latelyProjectData = _latelyProjectListItemControl.DataContext as LatelyProjectData;

            //触发事件
            this.OnClickListItemRemoveButton(_latelyProjectData);
        }
Esempio n. 2
0
        /// <summary>
        /// 依赖项属性发生改变时,触发的事件:
        /// 当ModeProperty依赖项属性,的属性值发生改变的时候,调用这个方法
        /// </summary>
        /// <param name="sender">依赖项对象</param>
        /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param>
        private static void OnModeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            //获取到控件
            LatelyProjectListItemControl _latelyProjectListItemControl = sender as LatelyProjectListItemControl;

            //如果没有任何的内容
            if (e.NewValue == null || (string)e.NewValue == "")
            {
                _latelyProjectListItemControl.LineBorder.Visibility = Visibility.Collapsed;//隐藏分割线
            }
            //如果有内容
            else
            {
                _latelyProjectListItemControl.LineBorder.Visibility = Visibility.Visible;//显示分割线
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LatelyProjectUiUserControl = ((EasyBugManager.LatelyProjectUiControl)(target));

            #line 12 "..\..\..\..\..\Xaml\Control\Ui\LatelyProjectUiControl.xaml"
                this.LatelyProjectUiUserControl.Loaded += new System.Windows.RoutedEventHandler(this.LatelyProjectUiControl_OnLoaded);

            #line default
            #line hidden

            #line 13 "..\..\..\..\..\Xaml\Control\Ui\LatelyProjectUiControl.xaml"
                this.LatelyProjectUiUserControl.MouseEnter += new System.Windows.Input.MouseEventHandler(this.LatelyProjectUiControl_OnMouseEnter);

            #line default
            #line hidden

            #line 14 "..\..\..\..\..\Xaml\Control\Ui\LatelyProjectUiControl.xaml"
                this.LatelyProjectUiUserControl.MouseLeave += new System.Windows.Input.MouseEventHandler(this.LatelyProjectUiControl_OnMouseLeave);

            #line default
            #line hidden
                return;

            case 2:
                this.BackgroudBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 3:

            #line 43 "..\..\..\..\..\Xaml\Control\Ui\LatelyProjectUiControl.xaml"
                ((System.Windows.Controls.Border)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.WindowTitleBorder_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 4:
                this.ProjectListBox = ((System.Windows.Controls.ListBox)(target));
                return;

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

            case 6:
                this.LatelyProjectListItemControl2 = ((EasyBugManager.LatelyProjectListItemControl)(target));
                return;

            case 7:
                this.LatelyProjectListItemControl3 = ((EasyBugManager.LatelyProjectListItemControl)(target));
                return;

            case 8:
                this.LatelyProjectListItemControl4 = ((EasyBugManager.LatelyProjectListItemControl)(target));
                return;

            case 9:
                this.LatelyProjectListItemControl5 = ((EasyBugManager.LatelyProjectListItemControl)(target));
                return;

            case 10:
                this.LatelyProjectListItemControl6 = ((EasyBugManager.LatelyProjectListItemControl)(target));
                return;

            case 11:
                this.LatelyProjectListItemControl7 = ((EasyBugManager.LatelyProjectListItemControl)(target));
                return;

            case 12:
                this.LatelyProjectListItemControl8 = ((EasyBugManager.LatelyProjectListItemControl)(target));
                return;

            case 13:
                this.LatelyProjectListItemControl9 = ((EasyBugManager.LatelyProjectListItemControl)(target));
                return;

            case 14:
                this.LatelyProjectListItemControl10 = ((EasyBugManager.LatelyProjectListItemControl)(target));
                return;

            case 15:
                this.FoldGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 16:
                this.EmptyBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 17:
                this.ForegroundCanvas = ((System.Windows.Controls.Canvas)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LatelyProjectListItemUserControl = ((EasyBugManager.LatelyProjectListItemControl)(target));

            #line 13 "..\..\..\..\..\..\Xaml\Control\Perfab\LatelyProjectUi\LatelyProjectListItemControl.xaml"
                this.LatelyProjectListItemUserControl.LostFocus += new System.Windows.RoutedEventHandler(this.LatelyProjectListItemControl_OnLostFocus);

            #line default
            #line hidden

            #line 14 "..\..\..\..\..\..\Xaml\Control\Perfab\LatelyProjectUi\LatelyProjectListItemControl.xaml"
                this.LatelyProjectListItemUserControl.DataContextChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.LatelyProjectListItemControl_OnDataContextChanged);

            #line default
            #line hidden

            #line 15 "..\..\..\..\..\..\Xaml\Control\Perfab\LatelyProjectUi\LatelyProjectListItemControl.xaml"
                this.LatelyProjectListItemUserControl.MouseEnter += new System.Windows.Input.MouseEventHandler(this.LatelyProjectListItemControl_OnMouseEnter);

            #line default
            #line hidden

            #line 16 "..\..\..\..\..\..\Xaml\Control\Perfab\LatelyProjectUi\LatelyProjectListItemControl.xaml"
                this.LatelyProjectListItemUserControl.MouseLeave += new System.Windows.Input.MouseEventHandler(this.LatelyProjectListItemControl_OnMouseLeave);

            #line default
            #line hidden
                return;

            case 2:
                this.ProjectNameTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.LineBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 4:
                this.MoreGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this.MoreButton = ((System.Windows.Controls.Button)(target));

            #line 99 "..\..\..\..\..\..\Xaml\Control\Perfab\LatelyProjectUi\LatelyProjectListItemControl.xaml"
                this.MoreButton.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MoreButtonControl_OnMouseEnter);

            #line default
            #line hidden

            #line 100 "..\..\..\..\..\..\Xaml\Control\Perfab\LatelyProjectUi\LatelyProjectListItemControl.xaml"
                this.MoreButton.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MoreButtonControl_OnMouseLeave);

            #line default
            #line hidden

            #line 101 "..\..\..\..\..\..\Xaml\Control\Perfab\LatelyProjectUi\LatelyProjectListItemControl.xaml"
                this.MoreButton.Click += new System.Windows.RoutedEventHandler(this.MoreButtonControl_OnClick);

            #line default
            #line hidden
                return;

            case 6:
                this.ContextMenuPopup = ((System.Windows.Controls.Primitives.Popup)(target));

            #line 122 "..\..\..\..\..\..\Xaml\Control\Perfab\LatelyProjectUi\LatelyProjectListItemControl.xaml"
                this.ContextMenuPopup.Opened += new System.EventHandler(this.ContextMenuPopup_Opened);

            #line default
            #line hidden
                return;

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

            case 8:
                this.RemoveTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }