public frmProjIDE(AVRProject myProject, EnviroSettings mySettings) { this.myProject = myProject; this.mySettings = mySettings; InitializeComponent(); myBuilder = new ProjectBuilder(myProject, txtOutputMsg, listErrWarn); myBuilder.DoneWork += new ProjectBuilder.EventHandler(myBuilder_DoneWork); myBurner = new ProjectBurner(myProject); serialPortControlPanel = new SerialPortPanel("com0", 9600); tabSerialPort.Controls.Add(serialPortControlPanel); serialPortControlPanel.SerialPortException += new SerialPortPanel.SerialPortErrorHandler(serialPortControlPanel_SerialPortException); myEditorTabsPanel = new EditorTabsPanel(myProject, mySettings); splitFileTreeEditorTabs.Panel2.Controls.Add(myEditorTabsPanel); try { helpToolStripMenuItem.DropDownItems.Add(MenuWebLink.GetMenuLinkRoot("Resources", "helplinks.xml")); } catch (Exception ex) { txtOutputMsg.Text += "Failed to Load Help->Resource Links\r\n" + ex.ToString(); } FillRecentProjects(); RefreshFileTree(); }
public BurnerPanel(AVRProject project) { allowEvents = false; InitializeComponent(); this.BackColor = System.Drawing.SystemColors.Control; this.project = project; projBurner = new ProjectBurner(project); dropProg.Items.Clear(); dropProg.Items.AddRange(ProjectBurner.GetAvailProgrammers(true)); dropPart.Items.Clear(); if (dropProg.Items.Count > 0) { dropPart.Items.AddRange(ProjectBurner.GetAvailParts((string)dropProg.Items[0], true)); } dropBaud.SelectedIndex = 0; ProjToForm(); }
public frmProjConfig(AVRProject myProj, EnviroSettings mySettings) { InitializeComponent(); this.myProj = myProj; this.mySettings = mySettings; myBurner = new ProjectBurner(myProj); for (int i = 0; i < dropPart.Items.Count; i++) { string str = (string)dropPart.Items[i]; str = str.Substring(str.IndexOf('=') + 2); str = str.Substring(0, str.IndexOf(' ')); dropPart.Items[i] = str.Trim(); } for (int i = 0; i < dropProg.Items.Count; i++) { string str = (string)dropProg.Items[i]; str = str.Substring(0, str.IndexOf('=')); dropProg.Items[i] = str.Trim(); } doNotAllowClose = false; PopulateForm(); }
public BurnerPanel(AVRProject project) { allowEvents = false; InitializeComponent(); this.BackColor = System.Drawing.SystemColors.Control; this.project = project; projBurner = new ProjectBurner(project); dropProg.Items.Clear(); dropProg.Items.AddRange(ProjectBurner.GetAvailProgrammers(true)); dropPart.Items.Clear(); if (dropProg.Items.Count > 0) dropPart.Items.AddRange(ProjectBurner.GetAvailParts((string)dropProg.Items[0], true)); dropBaud.SelectedIndex = 0; ProjToForm(); }
private void HandleNewOpenProj(AVRProject newProj) { //LoadWaitWindow lww = new LoadWaitWindow(); //lww.Show(); EnableButtons(); // close all editors List<EditorPanel> toClose = new List<EditorPanel>(editorList.Values); foreach (EditorPanel i in toClose) { i.Close(false); } this.project = newProj; // reassign project curProj = this.project; projBurner = new ProjectBurner(project); // set title this.Text = project.FileNameNoExt + " - AVR Project IDE"; editorList.Clear(); searchWin.Clear(); FillRecentProjects(); //lww.Close(); if (project.HasBeenConfigged == false) { ConfigWindow wnd = new ConfigWindow(project); wnd.ShowDialog(); } hardwareExplorerWin.LoadDataForChip(project.Device); hardwareExplorerWin.ClockFreq = project.ClockFreq; fileTreeWin.PopulateList(newProj, editorList); ReloadLastOpened(); KeywordScanner.LaunchScan(project, editorList); }
public IDEWindow(AVRProject project) { // assign references this.project = project; InitializeComponent(); this.Icon = GraphicsResx.mainicon; DisableButtons(); // create panel windows, attach events, etc etc fileTreeWin = new FileTreePanel(); fileTreeWin.OpenNode += new FileTreePanel.OpenFileEvent(fileTreeWin_OpenNode); hardwareExplorerWin = new HardwareExplorer(); searchWin = new SearchPanel(editorList); searchWin.GotoResult += new SearchPanel.SearchResultDoubleClickedEvent(searchWin_GotoResult); serialWin = new SerialPortPanel(SettingsManagement.PortName, SettingsManagement.BaudRate); serialWin.SerialPortException += new SerialPortPanel.SerialPortErrorHandler(serialWin_SerialPortException); usbWin = new UsbPanel(); messageWin = new MessagePanel(); messageWin.GotoError += new MessagePanel.OnClickError(messageWin_GotoError); disassemViewer = new DisassemblyViewer(); #if DEBUGGERWINTEST debuggerWin = new DebuggerPanel(this); #endif if (project.IsReady) { EnableButtons(); //projBuilder = new ProjectBuilder(project, messageWin.MyTextBox, messageWin.MyListView, messageWin.MyErrorOnlyListView); //projBuilder.DoneWork += new ProjectBuilder.EventHandler(projBuilder_DoneWork); projBurner = new ProjectBurner(project); } // fill help menu with a list of bookmarks to websites try { helpToolStripMenuItem.DropDownItems.Add(MenuWebLink.GetMenuLinkRoot("Resources")); } catch (Exception ex) { messageWin.MessageBoxModify(TextBoxChangeMode.AppendNewLine, "Error Loading Web Links:, " + ex.Message); } messageWin.MessageBoxModify(TextBoxChangeMode.AppendNewLine, "Default Arduino Core Path: " + SettingsManagement.ArduinoCorePath); messageWin.MessageBoxModify(TextBoxChangeMode.AppendNewLine, "Arduino Library Path: " + SettingsManagement.ArduinoLibPath); messageWin.MessageBoxModify(TextBoxChangeMode.AppendNewLine, "AppData Path: " + SettingsManagement.AppDataPath); messageWin.MessageBoxModify(TextBoxChangeMode.AppendNewLine, "AppInstall Path: " + SettingsManagement.AppInstallPath); messageWin.MessageBoxModify(TextBoxChangeMode.AppendNewLine, "Build Version: " + SettingsManagement.Version); messageWin.MessageBoxModify(TextBoxChangeMode.AppendNewLine, "Environment Version: " + Environment.Version); messageWin.MessageBoxModify(TextBoxChangeMode.AppendNewLine, "OS: " + Environment.OSVersion); hardwareExplorerWin.ClockFreq = project.ClockFreq; FillRecentProjects(); timerBackup.Interval = SettingsManagement.BackupInterval * 1000; timerBackup.Enabled = true; try { if (System.Net.Dns.GetHostName().ToUpperInvariant().Contains("FRANK")) progressBar1.Visible = true; } catch { } }