public void FillResources(ResourceListView2 resourceListView) { foreach (IResource res in allStores) { resourceListView.JetListView.Nodes.Add(res); } }
private void UpdateListViewColumns(ResourceListView2 listView, ColumnDescriptor[] columns, ResourceListDataProvider dataProvider, bool setGroupProviders) { foreach (JetListViewColumn col in listView.Columns) { ConversationStructureColumn convStructureColumn = col as ConversationStructureColumn; if (convStructureColumn != null) { convStructureColumn.DataProvider = dataProvider as ConversationDataProvider; } ResourcePropsColumn propsCol = col as ResourcePropsColumn; if (propsCol != null) { foreach (ColumnDescriptor colDesc in columns) { int[] propIds = PropNamesToIDs(colDesc.PropNames, true); if (propsCol.PropIdsEqual(propIds)) { UpdateGroupProvider(setGroupProviders, colDesc, propsCol); break; } } } ResourceListView2Column rlvCol = col as ResourceListView2Column; if (rlvCol != null) { rlvCol.OwnerList = dataProvider.ResourceList; } } }
/** * Saves the state of the list view (column widths) under the key that is * specified as a sequence of columns. */ internal void SaveListViewState(ResourceListView2 listView, ResourceListDataProvider dataProvider, ResourceListState state, bool async) { ColumnDescriptor[] columns = ColumnDescriptorsFromList(listView); columns = UpdateColumnsFromState(columns, state); state.SaveState(columns, dataProvider.SortSettings, async); }
private void tabViews_SelectedIndexChanged(object sender, EventArgs e) { TabPage page = tabsViews.SelectedTab; viewsTree = (ResourceListView2)page.Tag; UpdateButtonsState(); }
private static bool HasTreeColumn(ResourceListView2 listView) { foreach (JetListViewColumn col in listView.Columns) { if (col is ConversationStructureColumn) { return(true); } } return(false); }
private void itemShowContact_Click(object sender, EventArgs e) { Control ctrl = ((MenuItem)sender).Parent.GetContextMenu().SourceControl; ResourceListView2 list = (ResourceListView2)ctrl; int count = list.Selection.Count; if (count == 1) { IResourceList sel = list.GetSelectedResources(); ContactView cv = new ContactView(); Core.UIManager.OpenResourceEditWindow(cv, sel[0], false); } }
[SetUp] public void SetUp() { _core = new TestCore(); _core.ResourceStore.ResourceTypes.Register("Folder", "Name", ResourceTypeFlags.ResourceContainer); _core.ResourceStore.ResourceTypes.Register("Item", "Name", ResourceTypeFlags.Normal); _propParent = _core.ResourceStore.PropTypes.Register("Parent", PropDataType.Link, PropTypeFlags.DirectedLink); _core.ResourceStore.PropTypes.Register("IsUnread", PropDataType.Bool); _rootFolder = _core.ResourceStore.NewResource("Folder"); _resourceListView = new ResourceListView2(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.labelRemote = new System.Windows.Forms.Label(); this._lvInfoStores = new ResourceListView2(); //JetBrains.Omea.GUIControls.ResourceListView(); this.SuspendLayout(); // // label1 // this.label1.Dock = System.Windows.Forms.DockStyle.Top; this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System; this.label1.Location = new System.Drawing.Point(0, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(276, 55); this.label1.TabIndex = 4; this.label1.Text = "Select the information stores which you would like to access from Omea."; // // _lvInfoStores // this._lvInfoStores.AllowDrop = false; this._lvInfoStores.Dock = System.Windows.Forms.DockStyle.Fill; this._lvInfoStores.Location = new System.Drawing.Point(0, 55); this._lvInfoStores.Name = "_lvInfoStores"; this._lvInfoStores.Size = new System.Drawing.Size(276, 130); this._lvInfoStores.TabIndex = 5; this._lvInfoStores.HideSelection = false; this._lvInfoStores.BorderStyle = BorderStyle.Fixed3D; this._lvInfoStores.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; // // labelRemote // this.labelRemote.Dock = System.Windows.Forms.DockStyle.Bottom; this.labelRemote.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelRemote.Location = new System.Drawing.Point(0, 185); this.labelRemote.Name = "labelRemote"; this.labelRemote.ForeColor = Color.Red; this.labelRemote.Size = new System.Drawing.Size(276, 75); this.labelRemote.TabIndex = 6; this.labelRemote.Text = "IMPORTANT! Inclusion of remote information stores may significantly increase application startup time."; // // OutlookOptionsPane_InfoStores // this.Controls.Add(this._lvInfoStores); this.Controls.Add(this.label1); this.Controls.Add(this.labelRemote); this._lvInfoStores.BringToFront(); this.Name = "OutlookOptionsPane_InfoStores"; this.Size = new System.Drawing.Size(276, 220); this.ResumeLayout(false); }
private void SelectNewViewInProperTab(IResource view) { foreach (TabPage page in tabsViews.TabPages) { ResourceListView2 tree = (ResourceListView2)page.Tag; ViewsFilter filter = (ViewsFilter)tree.Tag; if (filter.AcceptResource(view)) { tabsViews.SelectedTab = page; tree.Selection.Clear(); tree.Selection.Add(view); } } }
private TabPage CreateTab(string name, ViewsFilter filter) { ResourceListView2 view = new ResourceListView2(); TabPage page = new TabPage(); page.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; page.Controls.Add(view); page.Location = new System.Drawing.Point(4, 22); page.Name = "tab" + name; page.Size = new System.Drawing.Size(232, 258); page.TabIndex = 2; page.Text = name; page.Tag = view; view.AllowDrop = true; view.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right); view.InPlaceEdit = false; view.ShowContextMenu = false; view.Location = new System.Drawing.Point(0, 0); view.Name = name; view.Size = new System.Drawing.Size(230, 258); view.TabIndex = 10; view.OpenProperty = Core.Props.Open; view.AddTreeStructureColumn(); view.AddIconColumn(); RichTextColumn nameColumn = new RichTextColumn(); nameColumn.SizeToContent = true; nameColumn.AddNodeDecorator(_decorator); view.Columns.Add(nameColumn); view.DoubleClick += new HandledEventHandler(this.OnDoubleClicked); view.JetListView.SelectionStateChanged += new JetBrains.JetListViewLibrary.StateChangeEventHandler(SelectionStateChanged); view.RootResource = Core.ResourceTreeManager.ResourceTreeRoot; // TODO: why ResourceListView, not ResourceTreeViewBase? if (filter != null) { view.Filters.Add(filter); view.Tag = filter; } IResource root = Core.ResourceTreeManager.ResourceTreeRoot; view.DataProvider = new ResourceTreeDataProvider(root, Core.Props.Parent); return(page); }
[SetUp] public void SetUp() { _core = new TestCore(); _propSubject = _core.ResourceStore.PropTypes.Register("Subject", PropDataType.String); _propDate = _core.ResourceStore.PropTypes.Register("Date", PropDataType.Date); _propReply = _core.ResourceStore.PropTypes.Register("Reply", PropDataType.Link, PropTypeFlags.DirectedLink); _propUnread = _core.ResourceStore.PropTypes.Register("IsUnread", PropDataType.Bool); _core.ResourceStore.ResourceTypes.Register("Email", "Subject"); _core.ResourceStore.ResourceTypes.Register("Person", "Name"); _threadingHandler = new DefaultThreadingHandler(_propReply); _resourceListView = new ResourceListView2(); }
/** * Shows the specified list of columns in the list view. */ internal void ShowListViewColumns(ResourceListView2 listView, ColumnDescriptor[] columns, ResourceListDataProvider dataProvider, bool setGroupProviders) { ColumnDescriptor[] oldColumns = ColumnDescriptorsFromList(listView); bool hadTreeColumn = HasTreeColumn(listView); bool needTreeColumn = (dataProvider is ConversationDataProvider); if (!new ComparableArrayList(columns).Equals(new ComparableArrayList(oldColumns)) || hadTreeColumn != needTreeColumn) { RecreateListViewColumns(listView, columns, dataProvider, setGroupProviders); } else { UpdateListViewColumns(listView, columns, dataProvider, setGroupProviders); } }
/// <summary> /// Returns an array of ColumnDescriptors describing the current column configuration /// of the ListView. /// </summary> /// <param name="listView">The list view for which the column configuration is returned.</param> /// <returns>An array of column descriptors.</returns> internal ColumnDescriptor[] ColumnDescriptorsFromList(ResourceListView2 listView) { ArrayList columnDescriptors = new ArrayList(); foreach (JetListViewColumn col in listView.Columns) { ResourcePropsColumn propsCol = col as ResourcePropsColumn; if (propsCol != null) { string[] propNames = new string[propsCol.PropIds.Length]; for (int i = 0; i < propsCol.PropIds.Length; i++) { int propId = propsCol.PropIds [i]; if (propId < 0) { propNames [i] = "-" + Core.ResourceStore.PropTypes [-propId].Name; } else { propNames [i] = Core.ResourceStore.PropTypes [propId].Name; } } int width; ColumnDescriptorFlags flags = 0; if (col.FixedSize) { flags |= ColumnDescriptorFlags.FixedSize; } if (col.AutoSize) { flags |= ColumnDescriptorFlags.AutoSize; width = col.AutoSizeMinWidth; } else { width = col.Width; } columnDescriptors.Add(new ColumnDescriptor(propNames, width, flags)); } } return((ColumnDescriptor[])columnDescriptors.ToArray(typeof(ColumnDescriptor))); }
public ResourceColumnSchemeProvider(DisplayColumnManager displayColumnManager, ResourceListView2 resourceListView) { _displayColumnManager = displayColumnManager; _resourceListView = resourceListView; }
public void CreateComponents() { _lblAvailable = new Label(); _lblAvailable.Text = "Available:"; _lblAvailable.FlatStyle = FlatStyle.System; _lblAvailable.AutoSize = true; _lblInWorkspace = new Label(); _lblInWorkspace.FlatStyle = FlatStyle.System; _lblInWorkspace.AutoSize = true; _lblProcessing = new Label(); _lblProcessing.FlatStyle = FlatStyle.System; _lblProcessing.AutoSize = true; _lblProcessing.Visible = false; _lblProcessing.Text = "Processing..."; _btnAdd = CreateTabButton("Add", new EventHandler(OnAddListClick)); _btnRemove = CreateTabButton("Remove", new EventHandler(OnRemoveListClick)); // // _lvAvailable // _lvAvailable = new ResourceListView2(); _lvAvailable.Columns.Add(new ResourceIconColumn()); _lvAvailable.AddColumn(ResourceProps.DisplayName).AutoSize = true; IResourceList tabResources = Core.ResourceStore.GetAllResourcesLive(_resourceTypes [0]); tabResources.Sort(new int[] { ResourceProps.DisplayName }, true); _listAvailable = tabResources; _lvAvailable.DataProvider = new ResourceListDataProvider(_listAvailable); _nameJetFilter = new ResourceNameJetFilter(""); _lvAvailable.Filters.Add(_nameJetFilter); _lvAvailable.HeaderStyle = ColumnHeaderStyle.None; _lvAvailable.ShowContextMenu = false; _lvAvailable.ExecuteDoubleClickAction = false; _lvAvailable.AllowDrop = false; _lvAvailable.DoubleClick += new HandledEventHandler(OnAddListClick); _lvAvailable.SelectionChanged += new EventHandler(OnListSelectionChanged); WorkspaceManager workspaceManager = Core.WorkspaceManager as WorkspaceManager; IResourceNodeFilter filter = workspaceManager.GetAvailSelectorFilter(_resourceTypes [0]); if (filter != null) { _lvAvailable.Filters.Add(new TreeFilterJetWrapper(filter)); } _edtFind = new JetTextBox(); _edtFind.EmptyText = "<type a name to find>"; _edtFind.IncrementalSearchUpdated += new EventHandler(OnListIncSearch); // // _lvInWorkspace // _lvInWorkspace = new ResourceListView2(); _lvInWorkspace.Columns.Add(new ResourceIconColumn()); _lvInWorkspace.AddColumn(ResourceProps.DisplayName).AutoSize = true; _lvInWorkspace.HeaderStyle = ColumnHeaderStyle.None; _lvInWorkspace.ShowContextMenu = false; _lvInWorkspace.ExecuteDoubleClickAction = false; _lvInWorkspace.AllowDrop = false; _lvInWorkspace.DoubleClick += new HandledEventHandler(OnRemoveListClick); _lvInWorkspace.SelectionChanged += new EventHandler(OnListSelectionChanged); UpdateListSelection(); Controls.AddRange(new Control[] { _lblAvailable, _edtFind, _lvAvailable, _btnAdd, _btnRemove, _lblProcessing, _lblInWorkspace, _lvInWorkspace }); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this._btn_Cancel = new System.Windows.Forms.Button(); this._btn_OK = new System.Windows.Forms.Button(); this.textFullName = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.buttonAddContact = new System.Windows.Forms.Button(); this.buttonRemoveContact = new System.Windows.Forms.Button(); this.labelOtherContacts = new System.Windows.Forms.Label(); this.checkShowOrigNames = new System.Windows.Forms.CheckBox(); this._suggestedContacts = new ResourceListView2(); this._contactsToMerge = new ResourceListView2(); this._menu = new System.Windows.Forms.ContextMenuStrip(); this._miShowContact = new ToolStripMenuItem(); this._lblContacts2Merge = new System.Windows.Forms.Label(); this._btnMoreContacts = new System.Windows.Forms.Button(); this._lblError = new System.Windows.Forms.Label(); this.SuspendLayout(); // // _btn_Cancel // this._btn_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this._btn_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this._btn_Cancel.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btn_Cancel.Location = new System.Drawing.Point(332, 364); this._btn_Cancel.Name = "_btn_Cancel"; this._btn_Cancel.Size = new System.Drawing.Size(75, 25); this._btn_Cancel.TabIndex = 11; this._btn_Cancel.Text = "Cancel"; // // _btn_OK // this._btn_OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this._btn_OK.DialogResult = System.Windows.Forms.DialogResult.OK; this._btn_OK.Enabled = false; this._btn_OK.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btn_OK.Location = new System.Drawing.Point(248, 364); this._btn_OK.Name = "_btn_OK"; this._btn_OK.Size = new System.Drawing.Size(75, 25); this._btn_OK.TabIndex = 10; this._btn_OK.Text = "&Merge"; this._btn_OK.Click += new System.EventHandler(this.OK_Click); // // textFullName // this.textFullName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textFullName.Location = new System.Drawing.Point(160, 8); this.textFullName.Name = "textFullName"; this.textFullName.ReadOnly = true; this.textFullName.Size = new System.Drawing.Size(248, 21); this.textFullName.TabIndex = 1; this.textFullName.TabStop = false; this.textFullName.Text = ""; this.textFullName.TextChanged += new System.EventHandler(this.NameChanged); // // label1 // this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System; this.label1.Location = new System.Drawing.Point(8, 12); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(140, 16); this.label1.TabIndex = 0; this.label1.Text = "Merged Contact &Name:"; // // buttonAddContact // this.buttonAddContact.FlatStyle = System.Windows.Forms.FlatStyle.System; this.buttonAddContact.Location = new System.Drawing.Point(168, 76); this.buttonAddContact.Name = "buttonAddContact"; this.buttonAddContact.TabIndex = 5; this.buttonAddContact.Text = ">>"; this.buttonAddContact.Click += new System.EventHandler(this.buttonAddContact_Click); // // buttonRemoveContact // this.buttonRemoveContact.FlatStyle = System.Windows.Forms.FlatStyle.System; this.buttonRemoveContact.Location = new System.Drawing.Point(168, 104); this.buttonRemoveContact.Name = "buttonRemoveContact"; this.buttonRemoveContact.TabIndex = 6; this.buttonRemoveContact.Text = "<<"; this.buttonRemoveContact.Click += new System.EventHandler(this.buttonRemoveContact_Click); // // labelOtherContacts // this.labelOtherContacts.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelOtherContacts.Location = new System.Drawing.Point(8, 56); this.labelOtherContacts.Name = "labelOtherContacts"; this.labelOtherContacts.Size = new System.Drawing.Size(112, 18); this.labelOtherContacts.TabIndex = 3; this.labelOtherContacts.Text = "&Suggested Contacts:"; // // checkShowOrigNames // this.checkShowOrigNames.FlatStyle = System.Windows.Forms.FlatStyle.System; this.checkShowOrigNames.Location = new System.Drawing.Point(8, 32); this.checkShowOrigNames.Name = "checkShowOrigNames"; this.checkShowOrigNames.Size = new System.Drawing.Size(380, 18); this.checkShowOrigNames.TabIndex = 2; this.checkShowOrigNames.Text = "&Show name used in messages addressed to this contact"; // // _suggestedContacts2 // this._suggestedContacts.AllowColumnReorder = false; this._suggestedContacts.AllowDrop = true; this._suggestedContacts.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this._suggestedContacts.ContextMenuStrip = _menu; this._suggestedContacts.ExecuteDoubleClickAction = false; this._suggestedContacts.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; this._suggestedContacts.HideSelection = false; this._suggestedContacts.Location = new System.Drawing.Point(4, 76); this._suggestedContacts.Name = "_suggestedContacts"; this._suggestedContacts.Size = new System.Drawing.Size(160, 260); this._suggestedContacts.ShowContextMenu = false; this._suggestedContacts.TabIndex = 4; this._suggestedContacts.DoubleClick += new JetBrains.JetListViewLibrary.HandledEventHandler(buttonAddContact_Click); // // _menu // this._menu.Items.Add(_miShowContact); this._menu.Opening += new System.ComponentModel.CancelEventHandler(contextMenu1_Opening); // // menuItem2 // this._miShowContact.Text = "Show Contact..."; this._miShowContact.Click += new System.EventHandler(this.itemShowContact_Click); // // _contactsToMerge2 // this._contactsToMerge.AllowColumnReorder = false; this._contactsToMerge.AllowDrop = true; this._contactsToMerge.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._contactsToMerge.ContextMenuStrip = _menu; this._contactsToMerge.ExecuteDoubleClickAction = false; this._contactsToMerge.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; this._contactsToMerge.HideSelection = false; this._contactsToMerge.Location = new System.Drawing.Point(248, 76); this._contactsToMerge.Name = "_contactsToMerge"; this._contactsToMerge.Size = new System.Drawing.Size(160, 232); this._contactsToMerge.TabIndex = 8; this._contactsToMerge.SelectionChanged += new EventHandler(this.OnSelectContact); this._contactsToMerge.DoubleClick += new JetBrains.JetListViewLibrary.HandledEventHandler(buttonRemoveContact_Click); // // _lblContacts2Merge // this._lblContacts2Merge.FlatStyle = System.Windows.Forms.FlatStyle.System; this._lblContacts2Merge.Location = new System.Drawing.Point(248, 56); this._lblContacts2Merge.Name = "_lblContacts2Merge"; this._lblContacts2Merge.Size = new System.Drawing.Size(112, 18); this._lblContacts2Merge.TabIndex = 7; this._lblContacts2Merge.Text = "&Contacts to Merge:"; // // _btnMoreContacts // this._btnMoreContacts.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this._btnMoreContacts.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btnMoreContacts.Location = new System.Drawing.Point(248, 312); this._btnMoreContacts.Name = "_btnMoreContacts"; this._btnMoreContacts.Size = new System.Drawing.Size(120, 23); this._btnMoreContacts.TabIndex = 9; this._btnMoreContacts.Text = "&More Contacts..."; this._btnMoreContacts.Click += new System.EventHandler(this._btnMoreContacts_Click); // // _lblError // this._lblError.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this._lblError.FlatStyle = System.Windows.Forms.FlatStyle.System; this._lblError.ForeColor = System.Drawing.Color.Red; this._lblError.Location = new System.Drawing.Point(8, 340); this._lblError.Name = "_lblError"; this._lblError.Size = new System.Drawing.Size(400, 16); this._lblError.TabIndex = 12; this._lblError.Text = "label3"; this._lblError.Visible = false; // // MergeContactsForm // this.AcceptButton = this._btn_OK; this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.CancelButton = this._btn_Cancel; this.ClientSize = new System.Drawing.Size(416, 398); this.Controls.Add(this._lblError); this.Controls.Add(this._btnMoreContacts); this.Controls.Add(this._lblContacts2Merge); this.Controls.Add(this._contactsToMerge); this.Controls.Add(this._suggestedContacts); this.Controls.Add(this.checkShowOrigNames); this.Controls.Add(this.buttonAddContact); this.Controls.Add(this._btn_Cancel); this.Controls.Add(this._btn_OK); this.Controls.Add(this.textFullName); this.Controls.Add(this.label1); this.Controls.Add(this.buttonRemoveContact); this.Controls.Add(this.labelOtherContacts); this.Name = "MergeContactsForm"; this.Text = "Merge Contacts"; this.ResumeLayout(false); }
private void RecreateListViewColumns(ResourceListView2 listView, ColumnDescriptor[] columns, ResourceListDataProvider dataProvider, bool setGroupProviders) { bool haveTreeColumn = false; listView.Columns.BeginUpdate(); try { listView.Columns.Clear(); foreach (ColumnDescriptor desc in columns) { int[] propIds = PropNamesToIDs(desc.PropNames, true); ResourcePropsColumn colHdr; if (dataProvider is ConversationDataProvider && !haveTreeColumn && ((propIds.Length == 1 && propIds [0] == ResourceProps.Type) || (desc.Flags & ColumnDescriptorFlags.FixedSize) == 0)) { haveTreeColumn = true; ConversationStructureColumn col = new ConversationStructureColumn(dataProvider as ConversationDataProvider); listView.Columns.Add(col); } if (propIds.Length == 1 && propIds [0] == ResourceProps.Type) { colHdr = listView.AddIconColumn(); if (dataProvider is ConversationDataProvider) { colHdr.ShowHeader = false; } } else { ICustomColumn[] customColumns = BuildCustomColumns(propIds); if (customColumns == null) { colHdr = listView.AddColumn(propIds); colHdr.Text = GetColumnText(propIds); SetPropertyToTextCallbacks(colHdr as ResourceListView2Column); (colHdr as ResourceListView2Column).OwnerList = dataProvider.ResourceList; } else { colHdr = listView.AddCustomColumn(propIds, customColumns); } FillSortMenuText(colHdr, desc, propIds); colHdr.CustomComparer = desc.CustomComparer; colHdr.Alignment = GetDefaultAlignment(propIds); } if ((desc.Flags & ColumnDescriptorFlags.AutoSize) != 0) { colHdr.AutoSize = true; colHdr.AutoSizeMinWidth = desc.Width; } else { colHdr.Width = desc.Width; if ((desc.Flags & ColumnDescriptorFlags.FixedSize) != 0) { colHdr.FixedSize = true; } } UpdateGroupProvider(setGroupProviders, desc, colHdr); } } finally { listView.Columns.EndUpdate(); } }
private void InitializeComponent() { System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ReminderForm)); // components = new Container(); this._targetList = new JetBrains.Omea.GUIControls.ResourceListView2(); this._controlPanel = new System.Windows.Forms.Panel(); this._snoozeLabel = new System.Windows.Forms.Label(); this._snoozePeriodList = new System.Windows.Forms.ComboBox(); this._snoozeButton = new System.Windows.Forms.Button(); this._editButton = new System.Windows.Forms.Button(); this._dismissButton = new System.Windows.Forms.Button(); this._dismissAllButton = new System.Windows.Forms.Button(); this._snoozeAllButton = new System.Windows.Forms.Button(); this._descriptionTextBox = new System.Windows.Forms.TextBox(); this._targetsLabel = new System.Windows.Forms.Label(); this._taskSubject = new JetBrains.Omea.GUIControls.ResourceLinkLabel(); this._controlPanel.SuspendLayout(); toolTipReason = new ToolTip(); toolTipReason.ShowAlways = true; this.SuspendLayout(); // // _targetList // this._targetList.AllowDrop = true; this._targetList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._targetList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; this._targetList.HideSelection = false; this._targetList.Location = new System.Drawing.Point(8, 128); this._targetList.Name = "_targetList"; this._targetList.ShowContextMenu = false; this._targetList.Size = new System.Drawing.Size(348, 72); this._targetList.TabIndex = 2; // // _controlPanel // this._controlPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._controlPanel.Controls.Add(this._snoozeLabel); this._controlPanel.Controls.Add(this._snoozePeriodList); this._controlPanel.Controls.Add(this._snoozeButton); this._controlPanel.Controls.Add(this._editButton); this._controlPanel.Controls.Add(this._dismissButton); this._controlPanel.Controls.Add(this._dismissAllButton); this._controlPanel.Controls.Add(this._snoozeAllButton); this._controlPanel.Location = new System.Drawing.Point(8, 204); this._controlPanel.Name = "_controlPanel"; this._controlPanel.Size = new System.Drawing.Size(348, 84); this._controlPanel.TabIndex = 3; // // _snoozeLabel // this._snoozeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._snoozeLabel.Location = new System.Drawing.Point(8, 36); this._snoozeLabel.Name = "_snoozeLabel"; this._snoozeLabel.Size = new System.Drawing.Size(248, 17); this._snoozeLabel.TabIndex = 9; this._snoozeLabel.Text = "Click Snooze to be reminded in:"; // // _snoozePeriodList // this._snoozePeriodList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._snoozePeriodList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this._snoozePeriodList.Items.AddRange(new object[] { "5 minutes", "10 minutes", "15 minutes", "30 minutes", "1 hour", "2 hours", "4 hours", "8 hours", "0.5 days", "1 day", "2 days", "3 days", "4 days", "1 week", "2 weeks" }); this._snoozePeriodList.Location = new System.Drawing.Point(8, 57); this._snoozePeriodList.Name = "_snoozePeriodList"; this._snoozePeriodList.Size = new System.Drawing.Size(252, 21); this._snoozePeriodList.TabIndex = 5; // // _snoozeButton // this._snoozeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._snoozeButton.DialogResult = System.Windows.Forms.DialogResult.OK; this._snoozeButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this._snoozeButton.Location = new System.Drawing.Point(272, 56); this._snoozeButton.Name = "_snoozeButton"; this._snoozeButton.Size = new System.Drawing.Size(75, 25); this._snoozeButton.TabIndex = 6; this._snoozeButton.Text = "Snooze"; this._snoozeButton.Click += new System.EventHandler(this._snoozeButton_Click); // // _editButton // this._editButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._editButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this._editButton.Location = new System.Drawing.Point(272, 0); this._editButton.Name = "_editButton"; this._editButton.Size = new System.Drawing.Size(75, 25); this._editButton.TabIndex = 3; this._editButton.Text = "Edit Task..."; this._editButton.Click += new System.EventHandler(this._openButton_Click); // // _dismissButton // this._dismissButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._dismissButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this._dismissButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this._dismissButton.Location = new System.Drawing.Point(272, 28); this._dismissButton.Name = "_dismissButton"; this._dismissButton.Size = new System.Drawing.Size(75, 25); this._dismissButton.TabIndex = 4; this._dismissButton.Text = "Dismiss"; this._dismissButton.Click += new System.EventHandler(this._dismissButton_Click); // // _dismissAllButton // this._dismissAllButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); this._dismissAllButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this._dismissAllButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this._dismissAllButton.Location = new System.Drawing.Point(8, 8); this._dismissAllButton.Name = "_dismissAllButton"; this._dismissAllButton.Size = new System.Drawing.Size(85, 25); this._dismissAllButton.TabIndex = 4; this._dismissAllButton.Text = "Dismiss All"; this._dismissAllButton.Visible = false; this._dismissAllButton.Click += new System.EventHandler(this._dismissAllButton_Click); // // _snoozeAllButton // this._snoozeAllButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); this._snoozeAllButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this._snoozeAllButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this._snoozeAllButton.Location = new System.Drawing.Point(102, 8); this._snoozeAllButton.Name = "_snoozeAllButton"; this._snoozeAllButton.Size = new System.Drawing.Size(85, 25); this._snoozeAllButton.TabIndex = 4; this._snoozeAllButton.Text = "Snooze All"; this._snoozeAllButton.Visible = false; this._snoozeAllButton.Click += new System.EventHandler(this._snoozeAllButton_Click); // // _descriptionTextBox // this._descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._descriptionTextBox.Location = new System.Drawing.Point(8, 32); this._descriptionTextBox.Multiline = true; this._descriptionTextBox.Name = "_descriptionTextBox"; this._descriptionTextBox.ReadOnly = true; this._descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this._descriptionTextBox.Size = new System.Drawing.Size(348, 72); this._descriptionTextBox.TabIndex = 1; this._descriptionTextBox.Text = ""; // // _targetsLabel // this._targetsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._targetsLabel.FlatStyle = System.Windows.Forms.FlatStyle.System; this._targetsLabel.Location = new System.Drawing.Point(8, 110); this._targetsLabel.Name = "_targetsLabel"; this._targetsLabel.Size = new System.Drawing.Size(348, 17); this._targetsLabel.TabIndex = 6; this._targetsLabel.Text = "Attached resources:"; this._targetsLabel.TextAlign = System.Drawing.ContentAlignment.BottomLeft; // // _taskSubject // this._taskSubject.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._taskSubject.LinkOwnerResource = null; this._taskSubject.LinkType = 0; this._taskSubject.Location = new System.Drawing.Point(8, 8); this._taskSubject.Name = "_taskSubject"; this._taskSubject.PostfixText = ""; this._taskSubject.Resource = null; this._taskSubject.ShowIcon = true; this._taskSubject.Size = new System.Drawing.Size(348, 20); this._taskSubject.TabIndex = 0; // // ReminderForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.ClientSize = new System.Drawing.Size(364, 294); this.Controls.Add(this._taskSubject); this.Controls.Add(this._targetsLabel); this.Controls.Add(this._descriptionTextBox); this.Controls.Add(this._controlPanel); this.Controls.Add(this._targetList); this.KeyPreview = true; this.MaximizeBox = true; this.MinimizeBox = true; this.MinimumSize = new System.Drawing.Size(360, 320); this.Name = "ReminderForm"; this.ShowInTaskbar = true; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Reminder"; this.TopMost = true; this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ReminderForm_KeyDown); this.Closing += new System.ComponentModel.CancelEventHandler(this.ReminderForm_Closing); this._controlPanel.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.topLabel = new System.Windows.Forms.Label(); this.tabsViews = new System.Windows.Forms.TabControl(); this.newButton = new System.Windows.Forms.Button(); this.newFolderButton = new System.Windows.Forms.Button(); this.removeButton = new System.Windows.Forms.Button(); this.editButton = new System.Windows.Forms.Button(); this.copyButton = new System.Windows.Forms.Button(); this.okButton = new System.Windows.Forms.Button(); this.cancelButton = new System.Windows.Forms.Button(); this.helpButton = new System.Windows.Forms.Button(); this.SuspendLayout(); // // topLabel // this.topLabel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.topLabel.Location = new System.Drawing.Point(8, 8); this.topLabel.Name = "topLabel"; this.topLabel.Size = new System.Drawing.Size(80, 16); this.topLabel.TabIndex = 0; this.topLabel.Text = "Available views"; // // tabViews // this.tabsViews.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.tabsViews.Location = new System.Drawing.Point(4, 28); this.tabsViews.Name = "tabsViews"; this.tabsViews.SelectedIndex = 0; this.tabsViews.Size = new System.Drawing.Size(240, 284); this.tabsViews.TabIndex = 11; this.tabsViews.SelectedIndexChanged += new EventHandler(tabViews_SelectedIndexChanged); #region Tab Pages Creation TabPage pageAll = CreateTab("General", new ExclusiveTypedViewsFilter(RemovedViews)); tabsViews.Controls.Add(pageAll); viewsTree = (ResourceListView2)pageAll.Tag; // first as default // Collect all resource types whose views are exclusive // and create a separate tab page out of each of them. IResourceList allTypes = Core.ResourceStore.GetAllResources("ResourceType"); foreach (IResource type in allTypes) { string name = type.GetStringProp(Core.Props.Name); if (!String.IsNullOrEmpty(name) && ResourceTypeHelper.IsBaseResourceTypeActive(name) && Core.ResourceTreeManager.AreViewsExclusive(name)) { TabPage page = CreateTab(name + "s", new TypedViewsFilter(name, RemovedViews)); tabsViews.Controls.Add(page); } } #endregion Tab Pages Creation // // newButton // this.newButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.newButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.newButton.Size = new Size(80, 24); this.newButton.Location = new System.Drawing.Point(255, 48); this.newButton.Name = "newButton"; this.newButton.TabIndex = 20; this.newButton.Text = "&New View..."; this.newButton.Click += new System.EventHandler(this.newButton_Click); // // newFolderButton // this.newFolderButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.newFolderButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.newFolderButton.Size = new Size(80, 24); this.newFolderButton.Location = new System.Drawing.Point(255, 80); this.newFolderButton.Name = "newFolderButton"; this.newFolderButton.TabIndex = 30; this.newFolderButton.Text = "New &Folder..."; this.newFolderButton.Click += new EventHandler(newFolderButton_Click); // // editButton // this.editButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.editButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.editButton.Size = new Size(80, 24); this.editButton.Location = new System.Drawing.Point(255, 112); this.editButton.Name = "editButton"; this.editButton.TabIndex = 40; this.editButton.Text = "&Edit..."; this.editButton.Click += new System.EventHandler(this.editButton_Click); // // copyButton // this.copyButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.copyButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.copyButton.Size = new Size(80, 24); this.copyButton.Location = new System.Drawing.Point(255, 144); this.copyButton.Name = "copyButton"; this.copyButton.TabIndex = 50; this.copyButton.Text = "&Copy View"; this.copyButton.Click += new EventHandler(copyButton_Click); // // removeButton // this.removeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.removeButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.removeButton.Size = new Size(80, 24); this.removeButton.Location = new System.Drawing.Point(255, 176); this.removeButton.Name = "removeButton"; this.removeButton.TabIndex = 60; this.removeButton.Text = "&Delete..."; this.removeButton.Click += new System.EventHandler(this.removeButton_Click); // // okButton // this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.okButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.okButton.Location = new System.Drawing.Point(95, 322); this.okButton.Name = "okButton"; this.okButton.TabIndex = 60; this.okButton.Text = "OK"; this.okButton.Click += new System.EventHandler(this.okButton_Click); // // cancelButton // this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.cancelButton.Location = new System.Drawing.Point(175, 322); this.cancelButton.Name = "cancelButton"; this.cancelButton.TabIndex = 70; this.cancelButton.Text = "Cancel"; this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); // // helpButton // this.helpButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.helpButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.helpButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.helpButton.Location = new System.Drawing.Point(255, 322); this.helpButton.Name = "helpButton"; this.helpButton.TabIndex = 80; this.helpButton.Text = "Help"; this.helpButton.Click += new EventHandler(helpButton_Click); // // ViewsManagerForm // this.AcceptButton = this.okButton; this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.CancelButton = this.cancelButton; this.ClientSize = new System.Drawing.Size(340, 356); this.MinimumSize = new System.Drawing.Size(250, 300); this.Controls.Add(this.okButton); this.Controls.Add(this.newButton); this.Controls.Add(this.newFolderButton); this.Controls.Add(this.tabsViews); this.Controls.Add(this.topLabel); this.Controls.Add(this.removeButton); this.Controls.Add(this.editButton); this.Controls.Add(this.copyButton); this.Controls.Add(this.cancelButton); this.Controls.Add(this.helpButton); this.KeyPreview = true; this.Name = "ViewsManagerForm"; this.Text = "Views Manager"; this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.KeyDownHandler); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this._lvResources = new GUIControls.ResourceListView2(); this.panel1 = new System.Windows.Forms.Panel(); this._lblHint = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // _lvResources // this._lvResources.AllowDrop = true; this._lvResources.Dock = System.Windows.Forms.DockStyle.Fill; this._lvResources.EmptyDropHandler = new DnDHandler(this); this._lvResources.FullRowSelect = true; this._lvResources.RootResource = _root; this._lvResources.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; this._lvResources.HideSelection = false; this._lvResources.Location = new System.Drawing.Point(0, 18); this._lvResources.Name = "_lvResources"; this._lvResources.Size = new System.Drawing.Size(356, 72); this._lvResources.TabIndex = 0; this._lvResources.KeyDown += new System.Windows.Forms.KeyEventHandler(this._lvResources_KeyDown); this._lvResources.ResourceDrop += new GUIControls.ResourceDragEventHandler(this._lvResources_ResourceDrop); this._lvResources.ResourceDragOver += new ResourceDragEventHandler(_lvResources_ResourceDragOver); // // panel1 // this.panel1.Controls.Add(this._lblHint); this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(356, 18); this.panel1.TabIndex = 1; // // _lblHint // this._lblHint.AllowDrop = true; this._lblHint.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._lblHint.FlatStyle = System.Windows.Forms.FlatStyle.System; this._lblHint.Location = new System.Drawing.Point(4, 2); this._lblHint.Name = "_lblHint"; this._lblHint.Size = new System.Drawing.Size(348, 23); this._lblHint.TabIndex = 0; this._lblHint.Text = "Drop resources to add them to the clipboard"; this._lblHint.DragEnter += new System.Windows.Forms.DragEventHandler(this._lblHint_DragEnter); this._lblHint.DragDrop += new System.Windows.Forms.DragEventHandler(this._lblHint_DragDrop); // // ResourceClipboardForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.ClientSize = new System.Drawing.Size(356, 90); this.Controls.Add(this._lvResources); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; this.Name = "ResourceClipboardForm"; this.Text = "Resource Clipboard"; this.Closing += new System.ComponentModel.CancelEventHandler(this.ResourceClipboardForm_Closing); this.panel1.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this._selectFolderDialog = new System.Windows.Forms.FolderBrowserDialog(); this._folderList = new JetBrains.Omea.GUIControls.ResourceListView2(); this._addBtn = new System.Windows.Forms.Button(); this._deleteBtn = new System.Windows.Forms.Button(); this._statusBox = new System.Windows.Forms.ComboBox(); this._foldersTooltip = new System.Windows.Forms.ToolTip(this.components); this.SuspendLayout(); // // _folderList // this._folderList.AllowColumnReorder = false; this._folderList.AllowDrop = true; this._folderList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._folderList.AutoScroll = true; this._folderList.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this._folderList.ColumnSchemeProvider = null; this._folderList.ContextProvider = this._folderList; this._folderList.DataProvider = null; this._folderList.ExecuteDoubleClickAction = false; this._folderList.FullRowSelect = true; this._folderList.HeaderContextMenu = null; this._folderList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Clickable; this._folderList.InPlaceEdit = false; this._folderList.Location = new System.Drawing.Point(0, 24); this._folderList.MultiLineView = false; this._folderList.MultiSelect = false; this._folderList.Name = "_folderList"; this._folderList.RowDelimiters = false; this._folderList.Size = new System.Drawing.Size(288, 223); this._folderList.TabIndex = 0; this._folderList.KeyDown += new System.Windows.Forms.KeyEventHandler(this._folderList_KeyDown); this._folderList.Resize += new System.EventHandler(this._folderList_Resize); this._folderList.HandleCreated += new System.EventHandler(this._folderList_ListHandleCreated); this._folderList.ColumnSizeChanged += new System.EventHandler(this._folderList_ColumnSizeChanged); this._folderList.SelectionChanged += new System.EventHandler(this._folderList_SelectedIndexChanged); // // _addBtn // this._addBtn.FlatStyle = System.Windows.Forms.FlatStyle.System; this._addBtn.Location = new System.Drawing.Point(0, 0); this._addBtn.Name = "_addBtn"; this._addBtn.TabIndex = 1; this._addBtn.Text = "&Add..."; this._addBtn.Click += new System.EventHandler(this._addBtn_Click); // // _deleteBtn // this._deleteBtn.FlatStyle = System.Windows.Forms.FlatStyle.System; this._deleteBtn.Location = new System.Drawing.Point(80, 0); this._deleteBtn.Name = "_deleteBtn"; this._deleteBtn.TabIndex = 2; this._deleteBtn.Text = "&Remove"; this._deleteBtn.Enabled = false; this._deleteBtn.Click += new System.EventHandler(this._deleteBtn_Click); // // _statusBox // this._statusBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this._statusBox.Location = new System.Drawing.Point(192, 0); this._statusBox.Name = "_statusBox"; this._statusBox.Size = new System.Drawing.Size(90, 21); this._statusBox.TabIndex = 3; this._statusBox.Visible = false; this._statusBox.Leave += new System.EventHandler(this._statusBox_Leave); // // SetFoldersForm // this.Controls.Add(this._statusBox); this.Controls.Add(this._deleteBtn); this.Controls.Add(this._addBtn); this.Controls.Add(this._folderList); this.Name = "SetFoldersForm"; this.Size = new System.Drawing.Size(288, 248); this.ResumeLayout(false); }
public ResourceListView2TestForm(IResourceDataProvider provider, bool isTree) { // // Required for Windows Form Designer support // InitializeComponent(); _resourceListView = new ResourceListView2(); _resourceListView.Dock = DockStyle.Fill; _resourceListView.AllowDrop = true; _resourceListView.InPlaceEdit = true; if (isTree) { _resourceListView.AddTreeStructureColumn(); _resourceListView.HideSelection = true; } else { //_resourceListView.AddCheckBoxColumn(); _resourceListView.HeaderStyle = ColumnHeaderStyle.Clickable; _resourceListView.AllowColumnReorder = true; } _resourceListView.AddIconColumn(); if (isTree) { RichTextColumn rtCol = new RichTextColumn(); rtCol.AddNodeDecorator(new UnreadNodeDecorator()); rtCol.SizeToContent = true; _resourceListView.Columns.Add(rtCol); } else { /* * DisplayColumnManager dcm = (DisplayColumnManager) Core.DisplayColumnManager; * ColumnDescriptor[] columns = dcm.GetDefaultColumns( Core.ResourceBrowser.VisibleResources ); * foreach( ColumnDescriptor colDesc in columns ) * { * int[] propIds = dcm.PropNamesToIDs( colDesc.PropNames, true ); * bool isCustom = false; * for( int i=0; i<propIds.Length; i++ ) * { * if ( dcm.GetCustomColumn( propIds [i] ) != null ) * { * isCustom = true; * break; * } * } * * if ( isCustom ) * { * AddCustomColumn( dcm, propIds ); * } * else * { * ResourceListView2Column column = _resourceListView.AddColumn( propIds [0] ); * column.Width = colDesc.Width; * } * } */ _resourceListView.FullRowSelect = true; } /* * int propId = Core.ResourceStore.GetPropId( "Annotation" ); * ICustomColumn col = (Core.DisplayColumnManager as DisplayColumnManager).GetCustomColumn( propId ); * _resourceListView.AddCustomColumn( col ); */ _resourceListView.DataProvider = provider; Controls.Add(_resourceListView); Controls.SetChildIndex(_resourceListView, 0); _nameFilter = new ResourceNameJetFilter(""); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.labelChooseConditions = new System.Windows.Forms.Label(); this.treeConditions = new ResourceListView2(); this.buttonOK = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); this.buttonHelp = new System.Windows.Forms.Button(); this.SuspendLayout(); // // labelChooseConditions // this.labelChooseConditions.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelChooseConditions.Location = new System.Drawing.Point(4, 4); this.labelChooseConditions.Name = "labelChooseConditions"; this.labelChooseConditions.Size = new System.Drawing.Size(112, 16); this.labelChooseConditions.TabIndex = 0; this.labelChooseConditions.Text = "Available Conditions:"; // // treeConditions // this.treeConditions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.treeConditions.Location = new System.Drawing.Point(0, 24); this.treeConditions.Name = "treeConditions"; this.treeConditions.Size = new System.Drawing.Size(282, 360); this.treeConditions.TabIndex = 1; this.treeConditions.DoubleClick += new HandledEventHandler(this.treeConditions_DoubleClick); this.treeConditions.JetListView.SelectionStateChanged += new StateChangeEventHandler(Selection_SelectionStateChanged); this.treeConditions.OpenProperty = Core.Props.Open; this.treeConditions.AllowSameViewDrag = false; this.treeConditions.AddTreeStructureColumn(); this.treeConditions.AddIconColumn(); ResourceListView2Column column = this.treeConditions.AddColumn(ResourceProps.DisplayName); column.SizeToContent = true; column.Text = "Conditions"; // // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonOK.FlatStyle = System.Windows.Forms.FlatStyle.System; this.buttonOK.Location = new System.Drawing.Point(32, 392); this.buttonOK.Name = "buttonOK"; this.buttonOK.TabIndex = 2; this.buttonOK.Text = "OK"; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); // // buttonCancel // this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.buttonCancel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.buttonCancel.Location = new System.Drawing.Point(116, 392); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.TabIndex = 3; this.buttonCancel.Text = "Cancel"; // // buttonHelp // this.buttonHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonHelp.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.buttonHelp.FlatStyle = System.Windows.Forms.FlatStyle.System; this.buttonHelp.Location = new System.Drawing.Point(200, 392); this.buttonHelp.Name = "buttonHelp"; this.buttonHelp.TabIndex = 4; this.buttonHelp.Text = "Help"; this.buttonHelp.Click += new System.EventHandler(this.HelpButton_Click); // // ChooseConditionForm // this.AcceptButton = this.buttonOK; this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.CancelButton = this.buttonCancel; this.ClientSize = new System.Drawing.Size(280, 421); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); this.Controls.Add(this.treeConditions); this.Controls.Add(this.labelChooseConditions); this.Controls.Add(this.buttonHelp); this.Name = "ChooseConditionForm"; this.Text = "Select Condition(s)"; this.ResumeLayout(false); }