diff --git a/VSLXshared/DataModel/VsItem.cs b/VSLXshared/DataModel/VsItem.cs
index f83d9ed..acaa67e 100644
--- a/VSLXshared/DataModel/VsItem.cs
+++ b/VSLXshared/DataModel/VsItem.cs
@@ -102,6 +102,9 @@ public VsItem(string name, string path, DateTime? modified) : this()
[JsonIgnore]
public bool Warning { get; set; }
+ ///
+ /// Gets or sets a value indicating whether is favorite.
+ ///
public bool IsFavorite { get; set; }
///
diff --git a/VSLauncherX/MainDialog.Designer.cs b/VSLauncherX/MainDialog.Designer.cs
index d741d8b..ba7a13f 100644
--- a/VSLauncherX/MainDialog.Designer.cs
+++ b/VSLauncherX/MainDialog.Designer.cs
@@ -44,6 +44,7 @@ private void InitializeComponent()
txtFilter = new TextBoxEx();
btnAddFolder = new Button();
btnImportFolder = new Button();
+ btnImportSoP = new Button();
btnImportVS = new Button();
btnRefresh = new Button();
spacer = new Label();
@@ -76,11 +77,10 @@ private void InitializeComponent()
renameToolStripMenuItem = new ToolStripMenuItem();
removeToolStripMenuItem = new ToolStripMenuItem();
settingsToolStripMenuItem = new ToolStripMenuItem();
+ toolStripMenuItem4 = new ToolStripSeparator();
+ favoriteToolStripMenuItem = new ToolStripMenuItem();
statusStrip1 = new StatusStrip();
mainStatusLabel = new ToolStripStatusLabel();
- favoriteToolStripMenuItem = new ToolStripMenuItem();
- toolStripMenuItem4 = new ToolStripSeparator();
- btnImportSoP = new Button();
toolStripMenuItem1 = new ToolStripSeparator();
toolStripMenuItem2 = new ToolStripSeparator();
flowLayoutPanel2 = new FlowLayoutPanel();
@@ -100,12 +100,12 @@ private void InitializeComponent()
// toolStripMenuItem1
//
toolStripMenuItem1.Name = "toolStripMenuItem1";
- toolStripMenuItem1.Size = new Size(177, 6);
+ toolStripMenuItem1.Size = new Size(145, 6);
//
// toolStripMenuItem2
//
toolStripMenuItem2.Name = "toolStripMenuItem2";
- toolStripMenuItem2.Size = new Size(177, 6);
+ toolStripMenuItem2.Size = new Size(145, 6);
//
// flowLayoutPanel2
//
@@ -173,6 +173,18 @@ private void InitializeComponent()
btnImportFolder.UseVisualStyleBackColor = true;
btnImportFolder.Click += mainImportFolder_Click;
//
+ // btnImportSoP
+ //
+ btnImportSoP.Image = (Image)resources.GetObject("btnImportSoP.Image");
+ btnImportSoP.Location = new Point(578, 1);
+ btnImportSoP.Margin = new Padding(1);
+ btnImportSoP.Name = "btnImportSoP";
+ btnImportSoP.Size = new Size(32, 32);
+ btnImportSoP.TabIndex = 2;
+ tooltipForButtons.SetToolTip(btnImportSoP, "Add a solution or project");
+ btnImportSoP.UseVisualStyleBackColor = true;
+ btnImportSoP.Click += mainImportSoP_Click;
+ //
// btnImportVS
//
btnImportVS.Image = (Image)resources.GetObject("btnImportVS.Image");
@@ -556,14 +568,14 @@ private void InitializeComponent()
//
ctxMenu.Items.AddRange(new ToolStripItem[] { addToolStripMenuItem, toolStripMenuItem3, runToolStripMenuItem, runAsAdminToolStripMenuItem, renameToolStripMenuItem, toolStripMenuItem1, removeToolStripMenuItem, toolStripMenuItem2, settingsToolStripMenuItem, toolStripMenuItem4, favoriteToolStripMenuItem });
ctxMenu.Name = "ctxMenu";
- ctxMenu.Size = new Size(181, 204);
+ ctxMenu.Size = new Size(149, 182);
ctxMenu.Opening += ctxMenu_Opening;
//
// addToolStripMenuItem
//
addToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { newGroupToolStripMenuItem, fromFolderToolStripMenuItem, solutionProjectToolStripMenuItem });
addToolStripMenuItem.Name = "addToolStripMenuItem";
- addToolStripMenuItem.Size = new Size(180, 22);
+ addToolStripMenuItem.Size = new Size(148, 22);
addToolStripMenuItem.Text = "Add...";
//
// newGroupToolStripMenuItem
@@ -590,43 +602,55 @@ private void InitializeComponent()
// toolStripMenuItem3
//
toolStripMenuItem3.Name = "toolStripMenuItem3";
- toolStripMenuItem3.Size = new Size(177, 6);
+ toolStripMenuItem3.Size = new Size(145, 6);
//
// runToolStripMenuItem
//
runToolStripMenuItem.Name = "runToolStripMenuItem";
- runToolStripMenuItem.Size = new Size(180, 22);
+ runToolStripMenuItem.Size = new Size(148, 22);
runToolStripMenuItem.Text = "Run";
runToolStripMenuItem.Click += runToolStripMenuItem_Click;
//
// runAsAdminToolStripMenuItem
//
runAsAdminToolStripMenuItem.Name = "runAsAdminToolStripMenuItem";
- runAsAdminToolStripMenuItem.Size = new Size(180, 22);
+ runAsAdminToolStripMenuItem.Size = new Size(148, 22);
runAsAdminToolStripMenuItem.Text = "Run as Admin";
runAsAdminToolStripMenuItem.Click += runAsAdminToolStripMenuItem_Click;
//
// renameToolStripMenuItem
//
renameToolStripMenuItem.Name = "renameToolStripMenuItem";
- renameToolStripMenuItem.Size = new Size(180, 22);
+ renameToolStripMenuItem.Size = new Size(148, 22);
renameToolStripMenuItem.Text = "Rename...";
renameToolStripMenuItem.Click += renameToolStripMenuItem_Click;
//
// removeToolStripMenuItem
//
removeToolStripMenuItem.Name = "removeToolStripMenuItem";
- removeToolStripMenuItem.Size = new Size(180, 22);
+ removeToolStripMenuItem.Size = new Size(148, 22);
removeToolStripMenuItem.Text = "Remove...";
removeToolStripMenuItem.Click += removeToolStripMenuItem_Click;
//
// settingsToolStripMenuItem
//
settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
- settingsToolStripMenuItem.Size = new Size(180, 22);
+ settingsToolStripMenuItem.Size = new Size(148, 22);
settingsToolStripMenuItem.Text = "Settings...";
settingsToolStripMenuItem.Click += settingsToolStripMenuItem_Click;
//
+ // toolStripMenuItem4
+ //
+ toolStripMenuItem4.Name = "toolStripMenuItem4";
+ toolStripMenuItem4.Size = new Size(145, 6);
+ //
+ // favoriteToolStripMenuItem
+ //
+ favoriteToolStripMenuItem.Name = "favoriteToolStripMenuItem";
+ favoriteToolStripMenuItem.Size = new Size(148, 22);
+ favoriteToolStripMenuItem.Text = "Favorite";
+ favoriteToolStripMenuItem.Click += favoriteToolStripMenuItem_Click;
+ //
// statusStrip1
//
statusStrip1.Items.AddRange(new ToolStripItem[] { mainStatusLabel });
@@ -642,29 +666,6 @@ private void InitializeComponent()
mainStatusLabel.Size = new Size(193, 17);
mainStatusLabel.Text = "Lets do something incredible today";
//
- // favoriteToolStripMenuItem
- //
- favoriteToolStripMenuItem.Name = "favoriteToolStripMenuItem";
- favoriteToolStripMenuItem.Size = new Size(180, 22);
- favoriteToolStripMenuItem.Text = "Favorite";
- favoriteToolStripMenuItem.Click += favoriteToolStripMenuItem_Click;
- //
- // toolStripMenuItem4
- //
- toolStripMenuItem4.Name = "toolStripMenuItem4";
- toolStripMenuItem4.Size = new Size(177, 6);
- //
- // btnImportSoP
- //
- btnImportSoP.Image = (Image)resources.GetObject("btnImportSoP.Image");
- btnImportSoP.Location = new Point(578, 1);
- btnImportSoP.Margin = new Padding(1);
- btnImportSoP.Name = "btnImportSoP";
- btnImportSoP.Size = new Size(32, 32);
- btnImportSoP.TabIndex = 2;
- btnImportSoP.UseVisualStyleBackColor = true;
- btnImportSoP.Click += mainImportSoP_Click;
- //
// MainDialog
//
this.AutoScaleDimensions = new SizeF(7F, 15F);
diff --git a/VSLauncherX/MainDialog.cs b/VSLauncherX/MainDialog.cs
index 2846e20..7ded242 100644
--- a/VSLauncherX/MainDialog.cs
+++ b/VSLauncherX/MainDialog.cs
@@ -360,13 +360,13 @@ private void RebuildTaskbarItems(VsFolder? folder = null)
{
AddItemToTaskbar(item);
}
- if(item is VsFolder f)
+ if (item is VsFolder f)
{
RebuildTaskbarItems(f);
}
}
- if(folder is null || folder == this.solutionGroups)
+ if (folder is null || folder == this.solutionGroups)
{
this.TaskbarJumpList.Refresh();
}
@@ -1314,11 +1314,25 @@ private void mainPanel_Resize(object sender, EventArgs e)
private void ctxMenu_Opening(object sender, System.ComponentModel.CancelEventArgs e)
{
// if the currently selected item is a group, enable the "Add..." menu item, otherwise remove it
- this.ctxMenu.Items[0].Enabled = this.olvFiles.SelectedObject is VsFolder || this.olvFiles.SelectedObject is null;
- if(this.olvFiles.SelectedObject is VsItem i)
+ this.addToolStripMenuItem.Enabled = this.olvFiles.SelectedObject is VsFolder || this.olvFiles.SelectedObject is null;
+ bool bOther = true;
+
+ if (this.olvFiles.SelectedObject is VsItem i)
{
this.favoriteToolStripMenuItem.Checked = i.IsFavorite;
}
+ if(this.olvFiles.SelectedObject is null)
+ {
+ // disable all other menu items
+ bOther = false;
+ }
+
+ this.runToolStripMenuItem.Enabled = bOther;
+ this.runAsAdminToolStripMenuItem.Enabled = bOther;
+ this.renameToolStripMenuItem.Enabled = bOther;
+ this.removeToolStripMenuItem.Enabled = bOther;
+ this.settingsToolStripMenuItem.Enabled = bOther;
+ this.favoriteToolStripMenuItem.Enabled = bOther;
}
///
diff --git a/VSLauncherX/MainDialog.resx b/VSLauncherX/MainDialog.resx
index 9d5fc57..e55a1d1 100644
--- a/VSLauncherX/MainDialog.resx
+++ b/VSLauncherX/MainDialog.resx
@@ -160,17 +160,16 @@
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
- wgAADsIBFShKgAAAAkhJREFUSEvtk8+LEmEYxz3U/zHqIfwBHSLqoBZGMYeygxeJig4LES2rkCExpN4K
- giKQ8OBli6aWlZIkKARzqRgNTAliy6RDsBtF0I4/Bk8+vc+z804zOsQKdqoXPszzPr7v9zPzzujQNA3+
- JiRoNBpQKBTmCmYaAmyEw+G5gpn/BX/EVrD1U50L/6Cg3+vT4sFgAD21b7vGjK1AFEVQt3pTi3l49e5r
- eP/qI9VcNrmWMyWoVqvQ6XRgOBxaJDxcTpfgvHCFSB24BkqpSf3Nja/QbL6Fhw9WCKyxNyVA3q2tw7ry
- CbShRhK7cM7jG8+g1WpBJBIBp9NpAXuBQADy+fxvwZqs0MYlb8ZyDHbhyK1Ld8Dn8xmh6XQaKpWK0fP7
- /XQDOEiAd8Q3c4k5PLewDPf1+YJwGfbt3W+EZzIZGI/HFKYoCni9XuqHQiEYjUZWwcvVN3DBLRE4x+uT
- 2xV6H8XrT6l3UjhlCVd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wAwABAQEAAQgG
+ AAGYAQEBmAEBARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMAAUADAAEwAwABAQEAAQgG
AAEMGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEAAfABygGmAQABMwUAATMB
AAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEAAYABfAH/AQACUAH/AQAB
kwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFmAwABmQMAAcwCAAEzAwAC
diff --git a/VSLauncherX/Resources/Images24/ImportSoP.png b/VSLauncherX/Resources/Images24/ImportSoP.png
index 0a36791..63ce671 100644
Binary files a/VSLauncherX/Resources/Images24/ImportSoP.png and b/VSLauncherX/Resources/Images24/ImportSoP.png differ