public LineInfo(DesignerActionList list, DesignerActionItem item, Line line) { Debug.Assert(line is not null); Line = line; Item = item; List = list; }
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); }
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++; }
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); }
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); }
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)); }
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)); }
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); }
internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, System.Windows.Forms.ToolTip toolTip, ref int currentTabIndex) { }
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); }
public bool Contains(DesignerActionItem value) { throw null; }
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; } }
public int IndexOf (DesignerActionItem value) { return List.IndexOf (value); }
public bool Contains(DesignerActionItem value) { return(base.List.Contains(value)); }
public void Insert(int index, DesignerActionItem value) { throw null; }
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)); }
public int IndexOf(DesignerActionItem value) { throw null; }
public void Remove (DesignerActionItem value) { List.Remove (value); }
public int Add(DesignerActionItem value) { return(base.List.Add(value)); }
public void Remove(DesignerActionItem value) { throw null; }
// // Methods // public int Add (DesignerActionItem value) { return List.Add (value); }
internal override void UpdateActionItem(DesignerActionList actionList, DesignerActionItem actionItem, ToolTip toolTip, ref int currentTabIndex) { }
public void CopyTo (DesignerActionItem[] array, int index) { List.CopyTo (array, index); }
public LineInfo(DesignerActionList list, DesignerActionItem item, System.ComponentModel.Design.DesignerActionPanel.Line line) { this.Line = line; this.Item = item; this.List = list; }
public void Insert (int index, DesignerActionItem value) { List.Insert (index, value); }
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++; }
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); }
public int Add(DesignerActionItem value) { throw null; }