public DebuggerPanel(IDEWindow parent) { this.parent = parent; InitializeComponent(); this.Icon = GraphicsResx.debug; this.numServerPort.Minimum = 1; this.numServerPort.Maximum = UInt16.MaxValue; numServerPort.Value = Math.Max(numServerPort.Minimum, Math.Min(numServerPort.Maximum, Convert.ToDecimal(SettingsManagement.LastGDBPort))); this.dropHardwareSelection.SelectedIndex = 0; this.dropHardwareSelection.SelectedIndex = dropHardwareSelection.Items.IndexOf(SettingsManagement.LastICEHardware); if (this.dropHardwareSelection.SelectedIndex < 0) { this.dropHardwareSelection.SelectedIndex = 0; } this.dropHardwareSelection.SelectedIndexChanged += new EventHandler(dropHardwareSelection_SelectedIndexChanged); numBitRate.Value = Math.Max(numBitRate.Minimum, Math.Min(numBitRate.Maximum, Convert.ToDecimal(SettingsManagement.LastJTAGFreq))); dropHardwareSelection_SelectedIndexChanged(null, null); this.txtAVaRICEOtherOpts.Text = SettingsManagement.LastICEOptions; this.txtJTAGPort.Text = SettingsManagement.LastJTAGPort; DisableButtons(); if (CheckForAVARICE() == false) { this.Enabled = false; } }
public ExternalTool(string text, string cmd, string args, string dir, IDEWindow editor) { this.wind = editor; if (text == null) { text = ""; } if (cmd == null) { cmd = ""; } if (args == null) { args = ""; } if (dir == null) { dir = ""; } this.mbtn.Text = text; this.cmdStr = cmd; this.argsStr = args; this.dirStr = dir; this.mbtn.Click += new EventHandler(mbtn_Click); }
public static ToolStripMenuItem GetExternalToolsRoot(IDEWindow wind) { ToolStripMenuItem root = new ToolStripMenuItem("External Tools"); root.Image = GraphicsResx.tool_icon_png; XmlDocument xDoc = new XmlDocument(); if (File.Exists(SettingsManagement.AppDataPath + "ext_tools.xml") == false) { try { File.WriteAllText(SettingsManagement.AppDataPath + "ext_tools.xml", Properties.Resources.ext_tools); xDoc.Load(SettingsManagement.AppDataPath + "ext_tools.xml"); } catch { xDoc.LoadXml(Properties.Resources.ext_tools); } } else { try { xDoc.Load(SettingsManagement.AppDataPath + "ext_tools.xml"); } catch (XmlException ex) { MessageBox.Show("Error while reading ext_tools.xml: " + ex.Message); return(root); } catch (Exception ex) { MessageBox.Show("Error while reading ext_tools.xml: " + ex.Message); return(root); } } try { XmlElement xDocEle = xDoc.DocumentElement; foreach (XmlElement xEle in xDocEle.GetElementsByTagName("Tool")) { ExternalTool link = new ExternalTool(xEle.GetAttribute("text"), xEle.GetAttribute("cmd"), xEle.GetAttribute("args"), xEle.GetAttribute("dir"), wind); link.mbtn.Image = GraphicsResx.tool_icon_png; toolList.Add(link); root.DropDownItems.Add(link.mbtn); } } catch (Exception ex) { ErrorReportWindow.Show(ex, "Error while creating external tool buttons"); } return(root); }
public EditorPanel(ProjectFile file, AVRProject project, IDEWindow parent) { InitializeComponent(); this.parent = parent; this.file = file; this.project = project; SettingsManagement.LoadEditorState(this); this.Icon = GraphicsResx.file; }