protected void ShowLinkContextMenu(ResourceLinkLabel linkLabel, ResourceLinkLabelEventArgs e) { ActionContext context = new ActionContext(ActionContextKind.ContextMenu, this, e.Resource.ToResourceList()); context.SetLinkTarget(linkLabel.LinkType, _resourceList [0]); Core.ActionManager.ShowResourceContextMenu(context, linkLabel, e.Point.X, e.Point.Y); }
/** * Creates a resource link label for the pool. */ private Control OnCreateResourceLinkLabel() { ResourceLinkLabel linkLabel = new ResourceLinkLabel(); linkLabel.LinkContextMenu += linkLabel_LinkContextMenu; linkLabel.ResourceChanged += HandleLinkedResourceChanged; linkLabel.BackColor = Color.FromArgb(0, DefaultBackColor); return(linkLabel); }
private void OnDisposeResourceLinkLabel(Control ctl) { ResourceLinkLabel linkLabel = ctl as ResourceLinkLabel; if (linkLabel != null) { linkLabel.LinkContextMenu -= linkLabel_LinkContextMenu; linkLabel.ResourceChanged -= HandleLinkedResourceChanged; } }
/// <summary> /// When a link in the chevron menu is clicked, performs regular processing /// of the click. /// </summary> private void OnChevronMenuItemClick(object sender, ChevronBar.ChevronMenuItemClickEventArgs args) { ResourceLinkLabel lbl = args.ClickedControl as ResourceLinkLabel; if (lbl != null) { HandleLinkLabelClick(lbl); } else { OrganizeShortcuts(); } }
/** * Adds an icon and label for a single resource. */ private ResourceLinkLabel AddResourceLabel(IResource linkRes, int linkType, IResource linkOwnerRes, int curY) { ResourceLinkLabel linkLabel = (ResourceLinkLabel)_resourceLinkLabelPool.GetControl(); linkLabel.Resource = linkRes; linkLabel.LinkOwnerResource = linkOwnerRes; linkLabel.LinkType = Math.Abs(linkType); linkLabel.Bounds = new Rectangle(_linkLabelX, curY, Width - _linkLabelX - 4, (int)(19 * Core.ScaleFactor.Height)); linkLabel.EndEllipsis = true; return(linkLabel); }
private static string OnGetChevronMenuText(Control ctl) { ResourceLinkLabel lbl = ctl as ResourceLinkLabel; if (lbl != null) { IResource shortcut = lbl.Resource.GetLinkProp(ShortcutProps.Target); if (shortcut != null && !shortcut.HasProp(ShortcutProps.Renamed) && !shortcut.HasProp(ShortcutProps.TabID)) { return(lbl.Resource.DisplayName); } } return(ctl.Text); }
public void SameLinkNameFilterTest() { IResource email = _storage.NewResource("Email"); IResource person = _storage.NewResource("Person"); IResource person2 = _storage.NewResource("AltPerson"); email.AddLink(_propAuthor, person); email.AddLink(_propAltAuthor, person2); _linksBar.DisplayLinks(email, new HidePersonFilter()); Assert.AreEqual(3, _linksBar.Controls.Count); Assert.IsTrue(_linksBar.Controls [1].Visible); Assert.AreEqual(4, _linksBar.Controls [1].Left); Assert.AreEqual("Author:", _linksBar.Controls [1].Text); ResourceLinkLabel person2Label = _linksBar.Controls [2] as ResourceLinkLabel; Assert.IsNotNull(person2Label); Assert.AreEqual(person2, person2Label.Resource); }
/// <summary> /// For the link labels which are wider than the links pane, shows their /// full text in the tooltips. /// </summary> private void UpdateLinkLabelTooltips() { foreach (Control control in _borderPanel.Controls) { if (control is ResourceLinkLabel) { ResourceLinkLabel linkLabel = (ResourceLinkLabel)control; linkLabel.NameLabel.Width = Width - 4 - linkLabel.NameLabel.Left - linkLabel.Left; string linkTooltip = (string)linkLabel.Tag; if (linkTooltip != null) { _toolTip.SetToolTip(linkLabel.NameLabel, linkTooltip); } else if (linkLabel.Left + linkLabel.PreferredWidth > this.Width) { _toolTip.SetToolTip(linkLabel.NameLabel, linkLabel.NameLabel.Text); } else { _toolTip.SetToolTip(linkLabel.NameLabel, null); } } else if (control is JetLinkLabel) { JetLinkLabel linkLabel = (JetLinkLabel)control; linkLabel.Width = Width - 4 - linkLabel.Left; if (linkLabel.Left + linkLabel.PreferredWidth > this.Width) { _toolTip.SetToolTip(linkLabel, linkLabel.Text); } else { _toolTip.SetToolTip(linkLabel, null); } } } }
/// <summary> /// When a link is clicked, opens the webpage if it's a Web link, or displays /// the resource in context if it's a resource link. /// </summary> private static void HandleLinkLabelClick(ResourceLinkLabel lbl) { if (lbl.Resource.IsDeleted) { return; } if (lbl.Resource.Type == "Weblink") { Core.UIManager.OpenInNewBrowserWindow(lbl.Resource.GetStringProp("URL")); } else { IResource shortcut = (IResource)lbl.Tag; IUIManager uiManager = Core.UIManager; uiManager.BeginUpdateSidebar(); if (shortcut.HasProp(ShortcutProps.Workspace)) { Core.WorkspaceManager.ActiveWorkspace = shortcut.GetLinkProp(ShortcutProps.Workspace); } else { Core.WorkspaceManager.ActiveWorkspace = null; } if (shortcut.HasProp(ShortcutProps.TabID)) { Core.TabManager.CurrentTabId = shortcut.GetStringProp(ShortcutProps.TabID); } uiManager.EndUpdateSidebar(); ActionContext context = new ActionContext(ActionContextKind.Other, null, lbl.Resource.ToResourceList()); if (!Core.ActionManager.ExecuteLinkClickAction(context)) { uiManager.DisplayResourceInContext(lbl.Resource); } } }
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); }
private void linkLabel_LinkContextMenu(object sender, ResourceLinkLabelEventArgs e) { ResourceLinkLabel linkLabel = (ResourceLinkLabel)sender; ShowLinkContextMenu(linkLabel, e); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { _btnNewCategory = new System.Windows.Forms.Button(); _categoryTree = new JetBrains.Omea.GUIControls.ResourceTreeView(); _btnOk = new System.Windows.Forms.Button(); _btnCancel = new System.Windows.Forms.Button(); _btnDeleteCategory = new System.Windows.Forms.Button(); _btnRenameCategory = new System.Windows.Forms.Button(); _btnCheckAsPrevious = new Button(); _lblCategoriesFor = new Label(); _lblResource = new JetBrains.Omea.GUIControls.ResourceLinkLabel(); _lblPrevCats = new Label(); _chkFilterByWorkspace = new System.Windows.Forms.CheckBox(); SuspendLayout(); // // _lblCategoriesFor // this._lblCategoriesFor.AutoSize = true; this._lblCategoriesFor.FlatStyle = System.Windows.Forms.FlatStyle.System; this._lblCategoriesFor.Location = new System.Drawing.Point(4, 6); this._lblCategoriesFor.Name = "_lblCategoriesFor"; this._lblCategoriesFor.Size = new System.Drawing.Size(74, 17); this._lblCategoriesFor.TabIndex = 6; this._lblCategoriesFor.Text = "Categories for"; // // _lblResource // this._lblResource.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right); this._lblResource.ClickableLink = false; this._lblResource.ExecuteDoubleClickAction = false; this._lblResource.LinkOwnerResource = null; this._lblResource.LinkType = 0; this._lblResource.Location = new System.Drawing.Point(84, 4); this._lblResource.Name = "_lblResource"; this._lblResource.PostfixText = ""; this._lblResource.Resource = null; this._lblResource.ShowIcon = true; this._lblResource.Size = new System.Drawing.Size(23, 20); this._lblResource.TabIndex = 7; // // _categoryTree // this._categoryTree.AllowDrop = true; this._categoryTree.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._categoryTree.DoubleBuffer = false; this._categoryTree.DropOnEmpty = true; this._categoryTree.HideSelection = false; this._categoryTree.ImageIndex = -1; this._categoryTree.LabelEdit = true; this._categoryTree.Location = new System.Drawing.Point(8, 28); this._categoryTree.MultiSelect = false; this._categoryTree.Name = "_categoryTree"; this._categoryTree.NodePainter = null; this._categoryTree.ParentProperty = 0; this._categoryTree.ResourceChildProvider = null; this._categoryTree.SelectedImageIndex = -1; this._categoryTree.SelectedNodes = new System.Windows.Forms.TreeNode[0]; this._categoryTree.ShowRootResource = false; this._categoryTree.Size = new System.Drawing.Size(156, 216); this._categoryTree.TabIndex = 0; this._categoryTree.ThreeStateCheckboxes = false; this._categoryTree.ResourceDrop += new JetBrains.Omea.GUIControls.ResourceDragEventHandler(this._categoryTree_ResourceDrop); this._categoryTree.ResourceDragOver += new JetBrains.Omea.GUIControls.ResourceDragEventHandler(this._categoryTree_ResourceDragOver); this._categoryTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this._categoryTree_AfterSelect); this._categoryTree.ResourceAdded += new System.Windows.Forms.TreeViewEventHandler(this._categoryTree_ResourceAdded); this._categoryTree.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.OnCategoryLabelEdit); this._categoryTree.AfterThreeStateCheck += new ThreeStateCheckEventHandler(_categoryTree_AfterThreeStateCheck); // // _btnNewCategory // this._btnNewCategory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._btnNewCategory.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btnNewCategory.Location = new System.Drawing.Point(172, 28); this._btnNewCategory.Name = "_btnNewCategory"; this._btnNewCategory.TabIndex = 1; this._btnNewCategory.Text = "&New..."; this._btnNewCategory.Click += new System.EventHandler(this.OnAddCategory); // // _btnDeleteCategory // this._btnDeleteCategory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._btnDeleteCategory.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btnDeleteCategory.Location = new System.Drawing.Point(172, 57); this._btnDeleteCategory.Name = "_btnDeleteCategory"; this._btnDeleteCategory.TabIndex = 2; this._btnDeleteCategory.Text = "&Delete"; this._btnDeleteCategory.Click += new System.EventHandler(this.OnDeleteCategory); // // _btnRenameCategory // this._btnRenameCategory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._btnRenameCategory.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btnRenameCategory.Location = new System.Drawing.Point(172, 86); this._btnRenameCategory.Name = "_btnRenameCategory"; this._btnRenameCategory.TabIndex = 3; this._btnRenameCategory.Text = "&Rename"; this._btnRenameCategory.Click += new System.EventHandler(this.OnRenameCategoryClick); // // _btnCheckAsPrevious // _btnCheckAsPrevious.Anchor = (AnchorStyles.Top | AnchorStyles.Right); _btnCheckAsPrevious.FlatStyle = FlatStyle.System; _btnCheckAsPrevious.Location = new Point(172, 132); _btnCheckAsPrevious.Name = "_btnCheckAsPrevious"; _btnCheckAsPrevious.TabIndex = 4; _btnCheckAsPrevious.Visible = false; _btnCheckAsPrevious.Text = "&Check As"; _btnCheckAsPrevious.Click += new System.EventHandler(OnCheckAsPreviousCaseClick); // // _lblPrevCats // _lblPrevCats.Anchor = (AnchorStyles.Top | AnchorStyles.Right); _lblPrevCats.AutoSize = true; _lblPrevCats.FlatStyle = System.Windows.Forms.FlatStyle.System; _lblPrevCats.Location = new System.Drawing.Point(172, 158); _lblPrevCats.Name = "_lblPrevCats"; _lblPrevCats.Size = new System.Drawing.Size(80, 17); _lblPrevCats.TabStop = false; _lblPrevCats.Text = "Previous:"; // // _chkFilterByWorkspace // this._chkFilterByWorkspace.FlatStyle = System.Windows.Forms.FlatStyle.System; this._chkFilterByWorkspace.Location = new System.Drawing.Point(8, 224); this._chkFilterByWorkspace.Name = "_chkFilterByWorkspace"; this._chkFilterByWorkspace.Size = new System.Drawing.Size(200, 20); this._chkFilterByWorkspace.TabIndex = 8; this._chkFilterByWorkspace.Text = "Filter non-workspace categories"; this._chkFilterByWorkspace.Visible = false; this._chkFilterByWorkspace.Checked = _filterCheckState; this._chkFilterByWorkspace.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left); this._chkFilterByWorkspace.CheckedChanged += new EventHandler(_chkFilterByWorkspace_CheckedChanged); // // _btnOk // this._btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this._btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; this._btnOk.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btnOk.Location = new System.Drawing.Point(88, 254); this._btnOk.Name = "_btnOk"; this._btnOk.TabIndex = 5; this._btnOk.Text = "OK"; this._btnOk.Click += new System.EventHandler(this._btnOk_Click); // // _btnCancel // this._btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this._btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this._btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btnCancel.Location = new System.Drawing.Point(172, 254); this._btnCancel.Name = "_btnCancel"; this._btnCancel.TabIndex = 5; this._btnCancel.Text = "Cancel"; // // CategoryEditor // this.AcceptButton = this._btnOk; this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.CancelButton = this._btnCancel; this.ClientSize = new System.Drawing.Size(256, 287); this.Controls.Add(this._lblResource); this.Controls.Add(this._lblCategoriesFor); this.Controls.Add(this._btnNewCategory); this.Controls.Add(this._btnRenameCategory); this.Controls.Add(this._btnDeleteCategory); this.Controls.Add(_btnCheckAsPrevious); this.Controls.Add(_lblPrevCats); // this.Controls.Add( _boxPrevCats ); this.Controls.Add(this._btnCancel); this.Controls.Add(this._btnOk); this.Controls.Add(this._categoryTree); this.Controls.Add(this._chkFilterByWorkspace); this.Name = "CategoryEditor"; this.Text = "Assign Categories"; if (_wspFilter != null) { _categoryTree.Height = _categoryTree.Height - 30; _chkFilterByWorkspace.Visible = true; if (_chkFilterByWorkspace.Checked) { _categoryTree.AddNodeFilter(_wspFilter); } } 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._lblMessage = new JetBrains.Omea.GUIControls.JetLinkLabel(); this.label1 = new System.Windows.Forms.Label(); this._lblResource = new JetBrains.Omea.GUIControls.ResourceLinkLabel(); this._btnOK = new System.Windows.Forms.Button(); this._btnReadNext = new System.Windows.Forms.Button(); this.SuspendLayout(); // // _lblMessage // this._lblMessage.ClickableLink = false; this._lblMessage.Cursor = System.Windows.Forms.Cursors.Default; this._lblMessage.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))); this._lblMessage.ForeColor = System.Drawing.SystemColors.ControlText; this._lblMessage.Location = new System.Drawing.Point(8, 8); this._lblMessage.Name = "_lblMessage"; this._lblMessage.Size = new System.Drawing.Size(0, 0); this._lblMessage.TabIndex = 0; // // label1 // this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System; this.label1.Location = new System.Drawing.Point(8, 32); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(100, 16); this.label1.TabIndex = 1; this.label1.Text = "Received resource:"; // // _lblResource // this._lblResource.Cursor = System.Windows.Forms.Cursors.Default; this._lblResource.ForeColor = System.Drawing.SystemColors.ControlText; this._lblResource.LinkOwnerResource = null; this._lblResource.LinkType = 0; this._lblResource.Location = new System.Drawing.Point(8, 52); this._lblResource.Name = "_lblResource"; this._lblResource.PostfixText = ""; this._lblResource.ResourceLinkClicked += new CancelEventHandler(_lblResource_OnResourceLinkClicked); this._lblResource.Size = new System.Drawing.Size(23, 20); this._lblResource.TabIndex = 2; // // _btnOK // this._btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this._btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this._btnOK.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btnOK.Location = new System.Drawing.Point(192, 76); this._btnOK.Name = "_btnOK"; this._btnOK.Size = new System.Drawing.Size(92, 23); this._btnOK.TabIndex = 3; this._btnOK.Text = "Close"; // // _btnReadNext // this._btnReadNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this._btnReadNext.FlatStyle = System.Windows.Forms.FlatStyle.System; this._btnReadNext.Location = new System.Drawing.Point(80, 76); this._btnReadNext.Name = "_btnReadNext"; this._btnReadNext.Size = new System.Drawing.Size(92, 23); this._btnReadNext.TabIndex = 4; this._btnReadNext.Text = "Read Next"; this._btnReadNext.Visible = false; this._btnReadNext.Click += new System.EventHandler(this._btnReadNext_Click); // // NotificationMessageDlg // this.AcceptButton = this._btnOK; this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.CancelButton = this._btnOK; this.ClientSize = new System.Drawing.Size(292, 106); this.Controls.Add(this._btnReadNext); this.Controls.Add(this._btnOK); this.Controls.Add(this._lblResource); this.Controls.Add(this.label1); this.Controls.Add(this._lblMessage); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Name = "NotificationMessageDlg"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Notification Message"; this.Closed += new System.EventHandler(this.NotificationMessageDlg_Closed); this.ResumeLayout(false); }
/// <summary> /// Fills the chevron bar with shortcut links. /// </summary> public void RebuildShortcutBar() { if (_resourcesWithShortcuts != null) { _resourcesWithShortcuts.ResourceDeleting -= OnResourceWithShortcutDeleting; _resourcesWithShortcuts.Dispose(); } _chevronBar.ClearControls(); using (new LayoutSuspender(_chevronBar)) { IResourceList shortcuts = Core.ResourceStore.GetAllResources("Shortcut"); shortcuts.Sort(new int[] { ShortcutProps.Order }, true); _numShortcuts = shortcuts.Count; foreach (IResource shortcut in shortcuts) { if (shortcut.IsDeleting) { continue; } IResource target = shortcut.GetLinkProp(ShortcutProps.Target); if (target == null || target.IsDeleting) { // delete the shortcut when its target is deleted new ResourceProxy(shortcut).Delete(); continue; } if (!Core.ResourceStore.ResourceTypes[target.Type].OwnerPluginLoaded) { continue; } ResourceLinkLabel lbl = new ResourceLinkLabel(); lbl.Resource = target; if (shortcut.HasProp("Name")) { lbl.Text = shortcut.GetStringProp("Name"); if (target.DisplayName != lbl.Text) { _tooltip.SetToolTip(lbl.NameLabel, target.DisplayName); } } lbl.Tag = shortcut; lbl.ResourceLinkClicked += OnResourceLinkClicked; lbl.LinkContextMenu += OnResourceLinkContextMenu; lbl.ResourceDragOver += OnResourceLinkDragOver; lbl.ResourceDrop += OnResourceLinkDrop; lbl.Width = lbl.PreferredWidth + 4; _chevronBar.AddControl(lbl); _maxOrder = shortcut.GetIntProp(ShortcutProps.Order); } _chevronBar.AddHiddenControl(_lblOrganize); } _resourcesWithShortcuts = Core.ResourceStore.FindResourcesWithPropLive(null, ShortcutProps.Target); _resourcesWithShortcuts.ResourceDeleting += OnResourceWithShortcutDeleting; if (_site != null) { _site.PerformLayout(this); } PerformLayout(); }