コード例 #1
0
    public static bool FillMissingParameters()
    {
        bool success = true;

        foreach (Parameter parameter in ColumnHelper.ColumnCollection.Parameters)
        {
            if (parameter.Value == "")
            {
                OutputHandler.WriteToLog("Mandatory Parameters not filled.");

                if (!GenericHelper.IsUserInteractive())
                {
                    success = false;
                    break;
                }

                FillParameterForm form = new FillParameterForm();
                form.SetNameValue(parameter.Name);


                DialogResult result = form.ShowDialog();

                if (result == DialogResult.Cancel)
                {
                    success = false;
                    break;
                }
            }
        }

        return(success);
    }
コード例 #2
0
    private bool Next()
    {
        bool success = FillParameterForm.CheckForUniqueParameterNames();

        if (success)
        {
            success = FillParameterForm.FillMissingParameters();
        }

        if (success)
        {
            FireInputHandlingBeginEvent();
            nextButton.Enabled = false;

            bool startImport = ImportNewTraceFiles();

            if (startImport)
            {
                _lastImportedFiles.Clear();
                success = StartImport();
            }

            if (success)
            {
                _databaseOperation.SetForceRecalculateTotalRows(true);
                success = FireShowDataViewEvent(startImport);
            }

            nextButton.Enabled = true;
            FireInputHandlingEndEvent();
        }

        return(success);
    }
コード例 #3
0
    private void StartRecordingMode()
    {
        bool success = FillParameterForm.CheckForUniqueParameterNames();

        if (success)
        {
            success = FillParameterForm.FillMissingParameters();
        }

        if (success)
        {
            TraceRecordingForm form = new TraceRecordingForm();
            form.Initialize(_databaseOperation, _recordingMode);
            form.ShowDialog();

            success = form.GetSuccess();

            if (success)
            {
                inputSourceUserControl1.SetImportNew(true);
                _databaseOperation.SetForceRecalculateTotalRows(true);
                InputSourceUserControl1_ShowDataViewEvent(true, false, false, false);
            }
        }
    }
コード例 #4
0
    private void MainForm_CustomColumnsChangedEvent()
    {
        if (WindowState == FormWindowState.Minimized)
        {
            WindowState = FormWindowState.Normal;
        }

        bool success = FillParameterForm.CheckForUniqueParameterNames();

        if (success)
        {
            success = FillParameterForm.FillMissingParameters();
        }

        if (success)
        {
            SetForegroundWindow((int)Handle);

            dataViewUserControl1.HandleColumns(false);
            HandleDataViewerAfterCustomColumnsChange();
        }
    }
コード例 #5
0
    private void Next()
    {
        FireInputHandlingBeginEvent();
        nextButton.Enabled = false;

        bool startImport = ImportNewSessions();

        if (startImport)
        {
            bool success = IsCustomColumnsWindowClosed(true);

            if (success)
            {
                success = FillParameterForm.CheckForUniqueParameterNames();
            }

            if (success)
            {
                success = FillParameterForm.FillMissingParameters();
            }

            if (success)
            {
                _lastImportedSessions.Clear();
                StartImport();

                DisableColumnsNotInImportTables();

                _databaseOperation.SetForceRecalculateTotalRows(true);
                FireShowDataViewEvent(true, false, false);
            }
        }

        nextButton.Enabled = true;
        FireInputHandlingEndEvent();
    }