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();
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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 { }
        }