コード例 #1
0
 public LineInfo(DesignerActionList list, DesignerActionItem item, Line line)
 {
     Debug.Assert(line is not null);
     Line = line;
     Item = item;
     List = list;
 }
コード例 #2
0
 internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, ToolTip toolTip, ref int currentTabIndex)
 {
     _textItem       = (DesignerActionTextItem)actionItem;
     _label.Text     = StripAmpersands(_textItem.DisplayName);
     _label.Font     = GetFont();
     _label.TabIndex = currentTabIndex++;
     toolTip.SetToolTip(_label, _textItem.Description);
 }
コード例 #3
0
 internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, ToolTip toolTip, ref int currentTabIndex)
 {
     _actionList = actionList;
     _methodItem = (DesignerActionMethodItem)actionItem;
     toolTip.SetToolTip(_linkLabel, _methodItem.Description);
     _linkLabel.Text = StripAmpersands(_methodItem.DisplayName);
     _linkLabel.AccessibleDescription = actionItem.Description;
     _linkLabel.TabIndex = currentTabIndex++;
 }
コード例 #4
0
 private static bool CheckCondition(DesignerActionList actionList, DesignerActionItem ai)
 {
     if (ai.Properties["Condition"] != null)
     {
         var p = actionList.GetType().GetProperty((string)ai.Properties["Condition"], allInstBind, null, typeof(bool), Type.EmptyTypes, null);
         if (p != null)
         {
             return((bool)p.GetValue(actionList, null));
         }
     }
     return(true);
 }
コード例 #5
0
            internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, ToolTip toolTip, ref int currentTabIndex)
            {
                _actionList      = actionList;
                _panelHeaderItem = (DesignerActionPanelHeaderItem)actionItem;

                _titleLabel.Text        = _panelHeaderItem.DisplayName;
                _titleLabel.TabIndex    = currentTabIndex++;
                _subtitleLabel.Text     = _panelHeaderItem.Subtitle;
                _subtitleLabel.TabIndex = currentTabIndex++;
                _subtitleLabel.Visible  = (_subtitleLabel.Text.Length != 0);

                // Force the font to update
                OnParentControlFontChanged(null, EventArgs.Empty);
            }
コード例 #6
0
        private static int CompareItems(DesignerActionItem a, DesignerActionItem b)
        {
            var c = string.Compare(a?.Category ?? string.Empty, b?.Category ?? string.Empty, true);

            if (c != 0)
            {
                return(c);
            }
            c = (int)(a?.Properties["Order"] ?? 0) - (int)(b?.Properties["Order"] ?? 0);
            if (c != 0)
            {
                return(c);
            }
            return(string.Compare(a?.DisplayName, b?.DisplayName, true));
        }
コード例 #7
0
        private static int CompareItems(DesignerActionItem a, DesignerActionItem b)
        {
            var c = string.Compare(a.Category ?? string.Empty, b.Category ?? string.Empty, true, CultureInfo.CurrentCulture);

            if (c != 0)
            {
                return(c);
            }
            c = (int)a.Properties["Order"] - (int)b.Properties["Order"];
            if (c != 0)
            {
                return(c);
            }
            return(string.Compare(a.DisplayName, b.DisplayName, true, CultureInfo.CurrentCulture));
        }
コード例 #8
0
 private LineInfo ProcessTaskItem(DesignerActionList list, DesignerActionItem item)
 {
     Line line = null;
     if (item is DesignerActionMethodItem)
     {
         line = new MethodLine(this._serviceProvider, this);
     }
     else if (item is DesignerActionPropertyItem)
     {
         DesignerActionPropertyItem item2 = (DesignerActionPropertyItem) item;
         PropertyDescriptor propDesc = TypeDescriptor.GetProperties(list)[item2.MemberName];
         if (propDesc == null)
         {
             throw new InvalidOperationException(System.Design.SR.GetString("DesignerActionPanel_CouldNotFindProperty", new object[] { item2.MemberName, list.GetType().FullName }));
         }
         TypeDescriptorContext context = new TypeDescriptorContext(this._serviceProvider, propDesc, list);
         UITypeEditor editor = (UITypeEditor) propDesc.GetEditor(typeof(UITypeEditor));
         bool standardValuesSupported = propDesc.Converter.GetStandardValuesSupported(context);
         if (editor == null)
         {
             if (propDesc.PropertyType == typeof(bool))
             {
                 if (IsReadOnlyProperty(propDesc))
                 {
                     line = new TextBoxPropertyLine(this._serviceProvider, this);
                 }
                 else
                 {
                     line = new CheckBoxPropertyLine(this._serviceProvider, this);
                 }
             }
             else if (standardValuesSupported)
             {
                 line = new EditorPropertyLine(this._serviceProvider, this);
             }
             else
             {
                 line = new TextBoxPropertyLine(this._serviceProvider, this);
             }
         }
         else
         {
             line = new EditorPropertyLine(this._serviceProvider, this);
         }
     }
     else
     {
         if (!(item is DesignerActionTextItem))
         {
             return null;
         }
         if (item is DesignerActionHeaderItem)
         {
             line = new HeaderLine(this._serviceProvider, this);
         }
         else
         {
             line = new TextLine(this._serviceProvider, this);
         }
     }
     return new LineInfo(list, item, line);
 }
コード例 #9
0
 internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, System.Windows.Forms.ToolTip toolTip, ref int currentTabIndex)
 {
 }
コード例 #10
0
 internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, System.Windows.Forms.ToolTip toolTip, ref int currentTabIndex)
 {
     this._textItem = (DesignerActionTextItem) actionItem;
     this._label.Text = DesignerActionPanel.StripAmpersands(this._textItem.DisplayName);
     this._label.Font = this.GetFont();
     this._label.TabIndex = currentTabIndex++;
     toolTip.SetToolTip(this._label, this._textItem.Description);
 }
コード例 #11
0
 public bool Contains(DesignerActionItem value)
 {
     throw null;
 }
コード例 #12
0
 internal override sealed void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, System.Windows.Forms.ToolTip toolTip, ref int currentTabIndex)
 {
     this._actionList = actionList;
     this._propertyItem = (DesignerActionPropertyItem) actionItem;
     this._propDesc = null;
     this._typeDescriptorContext = null;
     this._value = this.PropertyDescriptor.GetValue(actionList);
     this.OnPropertyTaskItemUpdated(toolTip, ref currentTabIndex);
     this._pushingValue = true;
     try
     {
         this.OnValueChanged();
     }
     finally
     {
         this._pushingValue = false;
     }
 }
コード例 #13
0
		public int IndexOf (DesignerActionItem value)
		{
			return List.IndexOf (value);
		}
 public bool Contains(DesignerActionItem value)
 {
     return(base.List.Contains(value));
 }
コード例 #15
0
 public void Insert(int index, DesignerActionItem value)
 {
     throw null;
 }
コード例 #16
0
		public bool Contains (DesignerActionItem value)
		{
			return List.Contains (value);
		}
 public void Remove(DesignerActionItem value)
 {
     base.List.Remove(value);
 }
 public void Insert(int index, DesignerActionItem value)
 {
     base.List.Insert(index, value);
 }
 public int IndexOf(DesignerActionItem value)
 {
     return(base.List.IndexOf(value));
 }
コード例 #20
0
 public int IndexOf(DesignerActionItem value)
 {
     throw null;
 }
コード例 #21
0
		public void Remove (DesignerActionItem value)
		{
			List.Remove (value);
		}
 public int Add(DesignerActionItem value)
 {
     return(base.List.Add(value));
 }
コード例 #23
0
 public void Remove(DesignerActionItem value)
 {
     throw null;
 }
コード例 #24
0
		//
		// Methods
		//
		public int Add (DesignerActionItem value)
		{
			return List.Add (value); 
		}
コード例 #25
0
 internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, ToolTip toolTip, ref int currentTabIndex)
 {
 }
コード例 #26
0
		public void CopyTo (DesignerActionItem[] array, int index)
		{
			List.CopyTo (array, index);
		}
コード例 #27
0
 public LineInfo(DesignerActionList list, DesignerActionItem item, System.ComponentModel.Design.DesignerActionPanel.Line line)
 {
     this.Line = line;
     this.Item = item;
     this.List = list;
 }
コード例 #28
0
		public void Insert (int index, DesignerActionItem value)
		{
			List.Insert (index, value);
		}
コード例 #29
0
 internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, System.Windows.Forms.ToolTip toolTip, ref int currentTabIndex)
 {
     this._actionList = actionList;
     this._methodItem = (DesignerActionMethodItem) actionItem;
     toolTip.SetToolTip(this._linkLabel, this._methodItem.Description);
     this._linkLabel.Text = DesignerActionPanel.StripAmpersands(this._methodItem.DisplayName);
     this._linkLabel.AccessibleDescription = actionItem.Description;
     this._linkLabel.TabIndex = currentTabIndex++;
 }
コード例 #30
0
 internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, System.Windows.Forms.ToolTip toolTip, ref int currentTabIndex)
 {
     this._actionList = actionList;
     this._panelHeaderItem = (DesignerActionPanel.DesignerActionPanelHeaderItem) actionItem;
     this._titleLabel.Text = this._panelHeaderItem.DisplayName;
     this._titleLabel.TabIndex = currentTabIndex++;
     this._subtitleLabel.Text = this._panelHeaderItem.Subtitle;
     this._subtitleLabel.TabIndex = currentTabIndex++;
     this._subtitleLabel.Visible = this._subtitleLabel.Text.Length != 0;
     this.OnParentControlFontChanged(null, EventArgs.Empty);
 }
コード例 #31
0
 public int Add(DesignerActionItem value)
 {
     throw null;
 }