private void Add(ApplicationEntry entry) { var mnuEntry = new ToolStripMenuItem { Text = entry.Name, Tag = entry, ImageScaling = ToolStripItemImageScaling.None }; var droppedFileInfo = new RichFileInfo(entry.ExecutablePath); mnuEntry.Image = droppedFileInfo.Icon16; mnuEntry.Click += mnuEntry_Click; ctxMenuApp.Items.Add(mnuEntry); }
private void txtExecutablePath_TextChanged(object sender, EventArgs e) { var droppedFileInfo = new RichFileInfo(txtExecutablePath.Text); picAppIcon.Image = droppedFileInfo.Icon32; if (string.IsNullOrWhiteSpace(txtName.Text)) { ApplicationEntry.Name = droppedFileInfo.Name; } // set directory if (string.IsNullOrWhiteSpace(txtStartInFolder.Text)) { ApplicationEntry.StartInFolder = droppedFileInfo.StartInFolder; } }