public void LoadItem(MenuItem item) { _item = item; if (item == null) { Clear(); return; } keyLabel.Text = item.ViewKey; assemblyLabel.Text = item.Assembly; viewLabel.Text = item.ControlName; modelLabel.Text = item.Model; zoomLabel.Text = item.IsZoomable ? "Yes" : "No"; solutionLinkLabel.Text = item.SolutionName; var solutionExists = !item.SolutionName.IsNullOrTrimmedEmpty(); solutionPictureBox.Visible = solutionExists; if (solutionExists) { solutionPictureBox.BackgroundImage = IconUtility.IconForPath(item.SolutionPath); } }
private void LoadSolution(MenuItem item, bool closeAfter, bool edit) { if (item == null || item.SolutionPath == string.Empty) return; const string vsPath = @"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"; const string notepadPath = @"C:\Program Files (x86)\Notepad++\notepad++.exe"; Process.Start(edit ? notepadPath : vsPath, item.SolutionPath); if (closeAfter) { MenuItem.CopyItemProperty(item.ControlName); Close(); } }