Esempio n. 1
0
 public SetupForm(IValueAccessor sc)
 {
     InitializeComponent();
     StepConfig           = sc;
     txt_url.Text         = sc.ReadString("BlazonURL", "");
     txt_temp.Text        = sc.ReadString("BlazonTempDIR", "");
     numericUpDown1.Value = Convert.ToDecimal(sc.ReadDouble("WaitTime", 5));
     chk_Clean.Checked    = sc.ReadBoolean("CleanUp", false);
 }
Esempio n. 2
0
        public override bool SetupCodeModule(Control parentWindow, IValueAccessor stepConfiguration)
        {
            //Setup the code module
            using (SetupForm s = new SetupForm())
            {
                //First read the existing values
                s.tempPath    = stepConfiguration.ReadString("TempPath");
                s.Compression = stepConfiguration.ReadDouble("Compression");
                if (s.ShowDialog() == DialogResult.OK)
                {
                    stepConfiguration.WriteString("TempPath", s.tempPath);
                    stepConfiguration.WriteDouble("Compression", s.Compression);
                    return(true);
                }
            }

            // No changes were made.
            return(false);
        }