Exemplo n.º 1
0
    private bool CheckAndSaveValues()
    {
        if (CheckRuns() && CheckTimeBetweenRuns() && CheckTaskCollectionPath() && CheckStylesheetCollectionPath() && CheckLogDirPath())
        {
            WorkloadManagerConfigHandler.WorkloadManagerRuns                          = runsTextBox.Text;
            WorkloadManagerConfigHandler.WorkloadManagerTimeBetweenRuns               = timeBetweenRunsTextBox.Text;
            WorkloadManagerConfigHandler.WorkloadManagerCustomTaskCollection          = customTaskCollectionCheckBox.Checked.ToString();
            WorkloadManagerConfigHandler.WorkloadManagerCustomStylesheetCollection    = customStylesheetCollectionCheckBox.Checked.ToString();
            WorkloadManagerConfigHandler.WorkloadManagerTaskCollectionPath            = taskCollectionTextBox.Text;
            WorkloadManagerConfigHandler.WorkloadManagerStylesheetCollectionPath      = stylesheetCollectionTextBox.Text;
            WorkloadManagerConfigHandler.WorkloadManagerIncludeResultXml              = includeLogCheckBox.Checked.ToString();
            WorkloadManagerConfigHandler.WorkloadManagerIncludeTransformedStylesheets = includeStylesheetsCheckBox.Checked.ToString();
            WorkloadManagerConfigHandler.WorkloadManagerLogDirectory                  = logDirTextBox.Text;
            WorkloadManagerConfigHandler.WorkloadManagerHiddenMode                    = hiddenModeToolStripMenuItem.Checked.ToString();

            WorkloadManagerConfigHandler.SaveConfig();
            return(true);
        }

        return(false);
    }
Exemplo n.º 2
0
    private void Initialize()
    {
        MinimumSize = new Size(700, 500);          // error in .NET

        WorkloadManagerConfigHandler.LoadConfig();
        Text = string.Format("{0} - Workload mode", GenericHelper.ApplicationName);

        runsTextBox.Text            = WorkloadManagerConfigHandler.WorkloadManagerRuns;
        timeBetweenRunsTextBox.Text = WorkloadManagerConfigHandler.WorkloadManagerTimeBetweenRuns;

        customTaskCollectionCheckBox.Checked       = Convert.ToBoolean(WorkloadManagerConfigHandler.WorkloadManagerCustomTaskCollection);
        customStylesheetCollectionCheckBox.Checked = Convert.ToBoolean(WorkloadManagerConfigHandler.WorkloadManagerCustomStylesheetCollection);
        includeLogCheckBox.Checked         = Convert.ToBoolean(WorkloadManagerConfigHandler.WorkloadManagerIncludeResultXml);
        includeStylesheetsCheckBox.Checked = Convert.ToBoolean(WorkloadManagerConfigHandler.WorkloadManagerIncludeTransformedStylesheets);

        taskCollectionTextBox.Text       = WorkloadManagerConfigHandler.WorkloadManagerTaskCollectionPath;
        stylesheetCollectionTextBox.Text = WorkloadManagerConfigHandler.WorkloadManagerStylesheetCollectionPath;
        logDirTextBox.Text = WorkloadManagerConfigHandler.WorkloadManagerLogDirectory;

        hiddenModeToolStripMenuItem.Checked = Convert.ToBoolean(WorkloadManagerConfigHandler.WorkloadManagerHiddenMode);

        runLabel.Text    = "";
        runLabel.Visible = true;
    }