예제 #1
0
        private void Button1_Click_1(object sender, EventArgs e)
        {
            FirmwareHelper firmware = new FirmwareHelper();

            firmware.DirectoryCopy(@"C:\NewFirmware\MarlinBackup", @"C:\NewFirmware\Marlin", true);
            firmware.UpdateNewFirmware(this, Path.Combine(txtBxcurrentFirmware.Text, "configuration.h"), Path.Combine(txtBxNewFirmware.Text, "configuration.h"));
        }
예제 #2
0
        private void UpdateGui()
        {
            DelegateVisible(webBrowserMarlinHelp, false);

            FirmwareHelper firmware = new FirmwareHelper {
                FileName = Path.Combine(txtBxNewFirmware.Text, "configuration.h")
            };

            DelegateVisible(webBrowserMarlinHelp, true);
            webBrowserMarlinHelp.Url = new Uri("http://marlinfw.org/docs/configuration/configuration.html#configuring-marlin-1.1");
            // Load comboBoxes
            marlinComboBoxMOTHERBOARD.Clear();
            foreach (ComboboxItem comboboxItem in firmware.GetAllBoards())
            {
                marlinComboBoxMOTHERBOARD.AddComboItems(comboboxItem);
            }

            marlinComboBoxTEMP_SENSOR_0.Clear();
            marlinComboBoxTEMP_SENSOR_1.Clear();
            marlinComboBoxTEMP_SENSOR_2.Clear();
            marlinComboBoxTEMP_SENSOR_3.Clear();
            marlinComboBoxTEMP_SENSOR_4.Clear();
            marlinComboBoxTEMP_SENSOR_BED.Clear();
            foreach (ComboboxItem comboboxItem in firmware.GetTempSensors())
            {
                marlinComboBoxTEMP_SENSOR_0.AddComboItems(comboboxItem);
                marlinComboBoxTEMP_SENSOR_1.AddComboItems(comboboxItem);
                marlinComboBoxTEMP_SENSOR_2.AddComboItems(comboboxItem);
                marlinComboBoxTEMP_SENSOR_3.AddComboItems(comboboxItem);
                marlinComboBoxTEMP_SENSOR_4.AddComboItems(comboboxItem);
                marlinComboBoxTEMP_SENSOR_BED.AddComboItems(comboboxItem);
            }

            marlinComboBoxLCD_LANGUAGE.Clear();
            foreach (ComboboxItem comboboxItem in firmware.GetLanguages())
            {
                marlinComboBoxLCD_LANGUAGE.AddComboItems(comboboxItem);
            }

            marlinComboBoxDISPLAY_CHARSET_HD44780.Clear();
            foreach (ComboboxItem comboboxItem in firmware.GetHD44780Charset())
            {
                marlinComboBoxDISPLAY_CHARSET_HD44780.AddComboItems(comboboxItem);
            }



            firmware.UpdateNewFirmware(this, Path.Combine(txtBxcurrentFirmware.Text, "configuration.h"), Path.Combine(txtBxNewFirmware.Text, "configuration.h"));

            webBrowserMarlinHelp.Visible = true;
        }