diff --git a/RemoteApplicationPublisher/RemoteAppMainWindow.Designer.cs b/RemoteApplicationPublisher/RemoteAppMainWindow.Designer.cs
index 3cc52cd..cf44602 100644
--- a/RemoteApplicationPublisher/RemoteAppMainWindow.Designer.cs
+++ b/RemoteApplicationPublisher/RemoteAppMainWindow.Designer.cs
@@ -1,32 +1,32 @@
-using System.Windows.Forms;
-
-namespace RemoteApplicationPublisher
-{
- public partial class RemoteAppMainWindow
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && components != null)
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- // NOTE: The following procedure is required by the Windows Form Designer
- // It can be modified using the Windows Form Designer.
- // Do not modify it using the code editor.
- private void InitializeComponent()
- {
+using System.Windows.Forms;
+
+namespace RemoteApplicationPublisher
+{
+ public partial class RemoteAppMainWindow
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && components != null)
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ // NOTE: The following procedure is required by the Windows Form Designer
+ // It can be modified using the Windows Form Designer.
+ // Do not modify it using the code editor.
+ private void InitializeComponent()
+ {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RemoteAppMainWindow));
this.SmallIcons = new System.Windows.Forms.ImageList(this.components);
@@ -57,16 +57,16 @@ private void InitializeComponent()
this.contextSettingsMenuStrip.SuspendLayout();
this.listViewContextMenuStrip.SuspendLayout();
this.SuspendLayout();
- //
+ //
// SmallIcons
- //
+ //
this.SmallIcons.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.SmallIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("SmallIcons.ImageStream")));
this.SmallIcons.TransparentColor = System.Drawing.Color.Transparent;
this.SmallIcons.Images.SetKeyName(0, "smallicons.ico");
- //
+ //
// SmallerIcons
- //
+ //
this.SmallerIcons.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.SmallerIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("SmallerIcons.ImageStream")));
this.SmallerIcons.TransparentColor = System.Drawing.Color.Transparent;
@@ -77,11 +77,11 @@ private void InitializeComponent()
this.SmallerIcons.Images.SetKeyName(4, "properties.ico");
this.SmallerIcons.Images.SetKeyName(5, "plus.ico");
this.SmallerIcons.Images.SetKeyName(6, "minus.ico");
- //
+ //
// NoAppsLabel
- //
- this.NoAppsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
+ //
+ this.NoAppsLabel.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.NoAppsLabel.ForeColor = System.Drawing.Color.DarkGray;
this.NoAppsLabel.Location = new System.Drawing.Point(12, 144);
@@ -91,9 +91,9 @@ private void InitializeComponent()
this.NoAppsLabel.Text = "There are no RemoteApps hosted on this computer.\r\nClick + to add one.";
this.NoAppsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.NoAppsLabel.Visible = false;
- //
+ //
// ToolsMenuStrip
- //
+ //
this.ToolsMenuStrip.AllowMerge = false;
this.ToolsMenuStrip.AutoSize = false;
this.ToolsMenuStrip.BackColor = System.Drawing.Color.Transparent;
@@ -103,14 +103,14 @@ private void InitializeComponent()
this.ToolsMenuStrip.ShowItemToolTips = true;
this.ToolsMenuStrip.Size = new System.Drawing.Size(655, 37);
this.ToolsMenuStrip.TabIndex = 5;
- //
+ //
// BackupSaveFileDialog
- //
+ //
this.BackupSaveFileDialog.DefaultExt = "reg";
this.BackupSaveFileDialog.Filter = "Windows Registry file|*.reg";
- //
+ //
// panel1
- //
+ //
this.panel1.Controls.Add(this.buttonEdit);
this.panel1.Controls.Add(this.buttonSettingsMenu);
this.panel1.Controls.Add(this.buttonRemove);
@@ -119,9 +119,9 @@ private void InitializeComponent()
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(655, 37);
this.panel1.TabIndex = 8;
- //
+ //
// buttonEdit
- //
+ //
this.buttonEdit.Enabled = false;
this.buttonEdit.FlatAppearance.BorderSize = 0;
this.buttonEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -132,9 +132,9 @@ private void InitializeComponent()
this.buttonEdit.TabIndex = 3;
this.buttonEdit.UseVisualStyleBackColor = true;
this.buttonEdit.Click += new System.EventHandler(this.EditButton_Click);
- //
+ //
// buttonSettingsMenu
- //
+ //
this.buttonSettingsMenu.FlatAppearance.BorderSize = 0;
this.buttonSettingsMenu.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonSettingsMenu.Image = ((System.Drawing.Image)(resources.GetObject("buttonSettingsMenu.Image")));
@@ -144,9 +144,9 @@ private void InitializeComponent()
this.buttonSettingsMenu.TabIndex = 2;
this.buttonSettingsMenu.UseVisualStyleBackColor = true;
this.buttonSettingsMenu.Click += new System.EventHandler(this.buttonSettingsMenu_Click);
- //
+ //
// buttonRemove
- //
+ //
this.buttonRemove.Enabled = false;
this.buttonRemove.FlatAppearance.BorderSize = 0;
this.buttonRemove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -157,9 +157,9 @@ private void InitializeComponent()
this.buttonRemove.TabIndex = 1;
this.buttonRemove.UseVisualStyleBackColor = true;
this.buttonRemove.Click += new System.EventHandler(this.DeleteButton_Click);
- //
+ //
// buttonAdd
- //
+ //
this.buttonAdd.BackColor = System.Drawing.Color.Transparent;
this.buttonAdd.FlatAppearance.BorderSize = 0;
this.buttonAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -171,41 +171,41 @@ private void InitializeComponent()
this.buttonAdd.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.buttonAdd.UseVisualStyleBackColor = false;
this.buttonAdd.Click += new System.EventHandler(this.CreateButton_Click);
- //
+ //
// contextSettingsMenuStrip
- //
+ //
this.contextSettingsMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.backupApplicationsToolStripMenuItem,
this.hostOptionsToolStripMenuItem,
this.aboutToolStripMenuItem1});
this.contextSettingsMenuStrip.Name = "contextSettingsMenuStrip";
this.contextSettingsMenuStrip.Size = new System.Drawing.Size(209, 70);
- //
+ //
// backupApplicationsToolStripMenuItem
- //
+ //
this.backupApplicationsToolStripMenuItem.Name = "backupApplicationsToolStripMenuItem";
this.backupApplicationsToolStripMenuItem.Size = new System.Drawing.Size(208, 22);
this.backupApplicationsToolStripMenuItem.Text = "Backup All Applications...";
this.backupApplicationsToolStripMenuItem.Click += new System.EventHandler(this.backupApplicationsToolStripMenuItem_Click);
- //
+ //
// hostOptionsToolStripMenuItem
- //
+ //
this.hostOptionsToolStripMenuItem.Name = "hostOptionsToolStripMenuItem";
this.hostOptionsToolStripMenuItem.Size = new System.Drawing.Size(208, 22);
this.hostOptionsToolStripMenuItem.Text = "Host Options...";
this.hostOptionsToolStripMenuItem.Click += new System.EventHandler(this.HostOptionsToolStripMenuItem_Click);
- //
+ //
// aboutToolStripMenuItem1
- //
+ //
this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
this.aboutToolStripMenuItem1.Size = new System.Drawing.Size(208, 22);
this.aboutToolStripMenuItem1.Text = "About...";
this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
- //
+ //
// AppList
- //
- this.AppList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
+ //
+ this.AppList.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.AppList.BackColor = System.Drawing.Color.White;
this.AppList.BorderStyle = System.Windows.Forms.BorderStyle.None;
@@ -224,55 +224,54 @@ private void InitializeComponent()
this.AppList.TabIndex = 1;
this.AppList.UseCompatibleStateImageBehavior = false;
this.AppList.View = System.Windows.Forms.View.Details;
- this.AppList.Click += new System.EventHandler(this.AppList_SelectedIndexChanged);
- this.AppList.MouseClick += new System.Windows.Forms.MouseEventHandler(this.AppList_MouseClick);
+ this.AppList.SelectedIndexChanged += new System.EventHandler(this.AppList_SelectedIndexChanged);
this.AppList.MouseDown += new System.Windows.Forms.MouseEventHandler(this.AppList_MouseDown);
- //
+ //
// ShortName
- //
+ //
this.ShortName.Text = "Name";
this.ShortName.Width = 140;
- //
+ //
// FullName
- //
+ //
this.FullName.Text = "Full Name";
this.FullName.Width = 140;
- //
+ //
// ProgramPath
- //
+ //
this.ProgramPath.Text = "Program Path";
this.ProgramPath.Width = 120;
- //
+ //
// CommandLine
- //
+ //
this.CommandLine.Text = "CommandLine";
this.CommandLine.Width = 400;
- //
+ //
// labelSeparator1
- //
+ //
this.labelSeparator1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.labelSeparator1.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.labelSeparator1.Location = new System.Drawing.Point(0, 40);
this.labelSeparator1.Name = "labelSeparator1";
this.labelSeparator1.Size = new System.Drawing.Size(655, 1);
this.labelSeparator1.TabIndex = 10;
- //
+ //
// listViewContextMenuStrip
- //
+ //
this.listViewContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.copyToClipboardToolStripMenuItem});
this.listViewContextMenuStrip.Name = "listViewContextMenuStrip";
this.listViewContextMenuStrip.Size = new System.Drawing.Size(173, 26);
- //
+ //
// copyToClipboardToolStripMenuItem
- //
+ //
this.copyToClipboardToolStripMenuItem.Name = "copyToClipboardToolStripMenuItem";
this.copyToClipboardToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
this.copyToClipboardToolStripMenuItem.Text = "Copy To Clipboard";
this.copyToClipboardToolStripMenuItem.Click += new System.EventHandler(this.copyToClipboardToolStripMenuItem_Click);
- //
+ //
// RemoteAppMainWindow
- //
+ //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
@@ -297,11 +296,11 @@ private void InitializeComponent()
this.listViewContextMenuStrip.ResumeLayout(false);
this.ResumeLayout(false);
- }
- internal ImageList SmallIcons;
- internal ImageList SmallerIcons;
- internal Label NoAppsLabel;
- internal MenuStrip ToolsMenuStrip;
+ }
+ internal ImageList SmallIcons;
+ internal ImageList SmallerIcons;
+ internal Label NoAppsLabel;
+ internal MenuStrip ToolsMenuStrip;
internal SaveFileDialog BackupSaveFileDialog;
private Panel panel1;
private Button buttonEdit;
@@ -321,5 +320,5 @@ private void InitializeComponent()
private ContextMenuStrip listViewContextMenuStrip;
private ToolStripMenuItem copyToClipboardToolStripMenuItem;
private ToolStripMenuItem hostOptionsToolStripMenuItem;
- }
+ }
}
\ No newline at end of file
diff --git a/RemoteApplicationPublisher/RemoteAppMainWindow.cs b/RemoteApplicationPublisher/RemoteAppMainWindow.cs
index 3a9fcc9..3afad2b 100644
--- a/RemoteApplicationPublisher/RemoteAppMainWindow.cs
+++ b/RemoteApplicationPublisher/RemoteAppMainWindow.cs
@@ -7,6 +7,8 @@ namespace RemoteApplicationPublisher
{
public partial class RemoteAppMainWindow : Form
{
+ private string clipboardText = string.Empty;
+
public RemoteAppMainWindow()
{
InitializeComponent();
@@ -200,24 +202,10 @@ private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
remoteAppAboutWindow.ShowDialog();
}
- private void AppList_MouseClick(object sender, MouseEventArgs e)
- {
- // if (e.Button == MouseButtons.Right)
- // {
- // var item = AppList.HitTest(e.Location).Item;
- // if (item != null)
- // {
- // AppList.FocusedItem = item;
- // listViewContextMenuStrip.Show(AppList, e.Location);
- // }
- // }
- }
-
private void copyToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
{
if (AppList.FocusedItem != null)
{
- var clipboardText = AppList.FocusedItem.Text;
Clipboard.SetText(clipboardText);
}
}
@@ -226,11 +214,20 @@ private void AppList_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
- var hittest = AppList.HitTest(e.Location);
var item = AppList.HitTest(e.Location).Item;
if (item != null)
{
AppList.FocusedItem = item;
+ clipboardText = string.Empty;
+
+ foreach (var i in item.SubItems)
+ {
+ if (((ListViewItem.ListViewSubItem)i).Bounds.Contains(e.Location))
+ {
+ clipboardText = ((ListViewItem.ListViewSubItem)i).Text;
+ }
+ }
+
listViewContextMenuStrip.Show(AppList, e.Location);
}
}
diff --git a/RemoteApplicationPublisher/RemoteAppMainWindow.resx b/RemoteApplicationPublisher/RemoteAppMainWindow.resx
index d88df16..cf8392c 100644
--- a/RemoteApplicationPublisher/RemoteAppMainWindow.resx
+++ b/RemoteApplicationPublisher/RemoteAppMainWindow.resx
@@ -65,7 +65,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAKBAAAAJNU0Z0AUkBTAMBAQAB
- sAECAbABAgEgAQABIAEABP8BIQEACP8BQgFNATYHAAE2AwABKAMAAYADAAEg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