Beispiel #1
0
        public void setPrevSettings()
        {
            List <SettingsObject> prevSettings = mainSettings.getPrevSettings(formIndex);

            if (prevSettings == null)
            {
                txtFilamentColor.Text   = "";
                txtFilamentCost.Text    = "";
                txtFilamentDensity.Text = "";
                txtFilamentNotes.Text   = "";
                return;
            }
            foreach (SettingsObject x in prevSettings)
            {
                if (x.get_gSO() == "filament_colour")
                {
                    txtFilamentColor.Text = x.get_config_Value();
                }
                else if (x.get_gSO() == "filament_cost")
                {
                    txtFilamentCost.Text = x.get_config_Value();
                }
                else if (x.get_gSO() == "filament_density")
                {
                    txtFilamentDensity.Text = x.get_config_Value();
                }
                else if (x.get_gSO() == "filament_notes")
                {
                    txtFilamentNotes.Text = x.get_config_Value();
                }
            }
        }
Beispiel #2
0
        public void setPrevSettings()
        {
            List <SettingsObject> prevSettings = mainSettings.getPrevSettings(formIndex);

            if (prevSettings == null)
            {
                cbBedShape.SelectedIndex          = 0;
                cbPrintersSupported.SelectedIndex = 0;
                txtPrinterNotes.Text = "";
                return;
            }
            foreach (SettingsObject x in prevSettings)
            {
                if (x.get_gSO() == "bed_shape")
                {
                    cbBedShape.Text = x.get_config_Value();
                }
                else if (x.get_gSO() == "printer_settings_id")
                {
                    cbPrintersSupported.SelectedItem = x.get_config_Value();
                }
                else if (x.get_gSO() == "printer_notes")
                {
                    txtPrinterNotes.Text = x.get_config_Value();
                }
            }
        }
Beispiel #3
0
        public void setPrevSettings()
        {
            List <SettingsObject> prevSettings = mainSettings.getPrevSettings(formIndex);

            if (prevSettings == null)
            {
                txtNotes.Text = "";

                return;
            }
            foreach (SettingsObject x in prevSettings)
            {
                if (x.get_gSO() == "notes")
                {
                    txtNotes.Text = x.get_config_Value();
                }
            }
        }