Example #1
0
        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);
        }
Example #2
0
        private void mbtnConfig_Click(object sender, EventArgs e)
        {
            if (project.IsReady == false)
                return;

            ConfigWindow wnd = new ConfigWindow(project);
            wnd.ShowDialog();

            if (project.ShouldReloadDevice)
                hardwareExplorerWin.LoadDataForChip(project.Device);

            if (project.ShouldReloadFiles)
                fileTreeWin.PopulateList(project, editorList);

            if (project.ShouldReloadClock)
                hardwareExplorerWin.ClockFreq = project.ClockFreq;

            project.ShouldReloadFiles = false;
            project.ShouldReloadDevice = false;
            project.ShouldReloadClock = false;
        }