private void FieldPropertiesPage_WizardNext(object sender, WizardPageEventArgs e)
        {
            _settings.DateTimeColumn = (string)cmbDateTimeColumn.SelectedItem;

            string error = null;

            if (String.IsNullOrEmpty(_settings.DateTimeColumn))
            {
                error = "Specify Date/Time column";
            }
            else if (!_settings.ColumnDatas.Any(c => c.ImportColumn &&
                                                c.ColumnName != _settings.DateTimeColumn))
            {
                error = "Select at least one column to import";
            }
            else if (_settings.ColumnDatas.Where(c => c.ImportColumn && c.ColumnName != _settings.DateTimeColumn)
                     .Any(c => c.Site == null || c.Variable == null))
            {
                error = "Specify Site and Variable for all columns to import";
            }

            if (!string.IsNullOrEmpty(error))
            {
                e.Cancel = true;
                MessageBox.Show(this, error, "Validation", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #2
0
 private void PerformSplit_WizardNewStart(object sender, WizardPageEventArgs e)
 {
     AppOptions.RestoreOptions();
     AppOptions.splitOpts.SplitNonCountStatus = new List <SegStatus>();
     AppOptions.splitOpts.SplitNonCountStatus.Add(SegStatus.ApprovedSignOff);
     AppOptions.splitOpts.SplitNonCountStatus.Add(SegStatus.ApprovedTranslation);
 }
Пример #3
0
 private void SelectExperimenterPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     if (experimentersList.SelectedIndex >= 0)
     {
         Experimenter.Active = (Experimenter)experimentersList.Items[experimentersList.SelectedIndex];
     }
 }
Пример #4
0
        private void ClassInformation_WizardNext(object sender, WizardPageEventArgs e)
        {
            if (!FormValid())
            {
                e.Cancel = true;
                return;
            }

            Save();
        }
Пример #5
0
 private void FileOptionsPage_WizardBack(object sender, WizardPageEventArgs e)
 {
     if (AppOptions.isMerge)
     {
         saveMergeData();
     }
     else
     {
         saveSplitData();
     }
 }
Пример #6
0
 private void FormatOptionsPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     if (string.IsNullOrEmpty(tbSeparator.Text))
     {
         MessageBox.Show(this, "Decimal separator should be non-empty.", "Error", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
         e.Cancel = true;
         return;
     }
     _settings.ValuesNumberDecimalSeparator = tbSeparator.Text;
 }
Пример #7
0
 private void LoadExperimentPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     if (Experiment.Active != null)
     {
         if (Experiment.Active.UseExperimenters)
         {
             e.NewPage = "SelectExperimenterPage";
         }
         else
         {
             e.NewPage = "SelectSubjectPage";
         }
     }
 }
Пример #8
0
        private void DataLayerPage_WizardNext(object sender, WizardPageEventArgs e)
        {
            var layerName = chbCreateNewLayer.Checked ? tbNewLayer.Text : cmbLayers.Text;

            if (String.IsNullOrWhiteSpace(layerName))
            {
                MessageBox.Show(this, "Please enter name of layer to import.", "Error", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
                e.Cancel = true;
                return;
            }

            _context.Settings.LayerName = layerName;
        }
Пример #9
0
        private void OptionsPage_WizardPreNext(object sender, WizardPageEventArgs e)
        {
            // validation
            string validMsg = validateInput();

            if (validMsg.Length == 0)
            {
                this.AllowNext = true;
            }
            else
            {
                this.AllowNext = false;
                MessageBox.Show(validMsg, Properties.Resources.SplitSettingsTitle);
            }
        }
Пример #10
0
        public override void OnWizardNext(object sender, WizardPageEventArgs e)
        {
            if (!IsValid())
            {
                e.Cancel = true;
                return;
            }
            else
            {
                ProgressDialog      dlgProgresss = new ProgressDialog();
                BrokerServiceClient client       = GetWizard().Tag as BrokerServiceClient;

                UpdateMpps();
                dlgProgresss.Title       = "Update MPPS";
                dlgProgresss.Description = "Updating...";
                dlgProgresss.Action      = () =>
                {
                    client.UpdateMPPS(MainForm.Mpps.MPPSSOPInstanceUID, MainForm.Mpps);
                };

                if (dlgProgresss.ShowDialog(this) == DialogResult.Cancel)
                {
                    if (dlgProgresss.Exception != null)
                    {
                        e.Cancel = true;
                        Messager.ShowError(this, dlgProgresss.Exception);
                    }
                }

                dlgProgresss.Title       = "Update Patient";
                dlgProgresss.Description = "Updating...";
                dlgProgresss.Action      = () =>
                {
                    client.UpdatePatient(MainForm.Mpps.Patient.PatientID, MainForm.Mpps.Patient.IssuerOfPatientID, MainForm.Mpps.Patient);
                };

                if (dlgProgresss.ShowDialog(this) == DialogResult.Cancel)
                {
                    if (dlgProgresss.Exception != null)
                    {
                        e.Cancel = true;
                        Messager.ShowError(this, dlgProgresss.Exception);
                    }
                }
            }
            base.OnWizardNext(sender, e);
        }
Пример #11
0
        private void dbContextPage_WizardNext(object sender, WizardPageEventArgs e)
        {
            if (!IsFormValid())
            {
                e.Cancel = true;
                return;
            }

            if (_doneTest)
            {
                data.Columns.Clear();

                foreach (var column in Columns)
                {
                    data.Columns.Add(new CRO_DataColumn()
                    {
                        ColumnName = column.Key,
                        VariableType = column.Value,
                        DisplayName = column.Key,
                        IsPrimary = false,
                        IsSelected = true
                    });
                }

                data.ContextName = cmbContexts.Text;
                data.Query = txtCommand.Text;

                Project p = getProject(((IBaseData)WizardDataStore.Data).FileLocation);

                p.Globals["Context"] = cmbContexts.Text;
                p.Globals["Command"] = txtCommand.Text;
                p.Globals["ConnectionString"] = txtConnectionString.Text;

                p.Globals.set_VariablePersists("Context", true);
                p.Globals.set_VariablePersists("Command", true);
                p.Globals.set_VariablePersists("ConnectionString", true);
            }
            else
            {
                ValidationHelper.ShowErrorMessage("You need to run 'Test' before you process", "Please run 'Test'.");
                e.Cancel = true;
                return;
            }
        }
Пример #12
0
        private void WelcomePage_WizardNext(object sender, WizardPageEventArgs e)
        {
            for (int i = GetWizard().Pages.Count; i > 2; i--)
            {
                GetWizard().Pages.RemoveAt(GetWizard().Pages.Count - 1);
            }

            if (rbSplit.Checked)
            {
                AppOptions.isMerge = false;
                GetWizard().Pages.Add(new OptionsPage());
                GetWizard().Pages.Add(new PerformSplit());
            }
            else
            {
                AppOptions.isMerge = true;
                GetWizard().Pages.Add(new PerformMerge());
            }
        }
        /// <summary>
        /// Performs the actions after displaying a wizard page.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">An instance of <see cref="WizardPageEventArgs"/> with event data.</param>
        private void wsdlWizardCtrl_AfterPageDisplayed(object sender, WizardPageEventArgs e)
        {
            if (e.Page == wizardPageBasicMetadata)
            {
                tbServiceName.Focus();
                return;
            }

            if (e.Page == wizardPageAdditionalOptions)
            {
                if (ptvServiceOperations.PaneNodes.Count > 0)
                    ptvServiceOperations.SelectedPaneNode = ptvServiceOperations.PaneNodes[0];
            }
        }
Пример #14
0
 private void ConnectToDevicePage_WizardNext(object sender, WizardPageEventArgs e)
 {
     timer.Enabled = false;
 }
Пример #15
0
 private void WhenPage2IsShown(object sender, WizardPageEventArgs e)
 {
     MessageBox.Show(@"Showing page 2");
 }
Пример #16
0
        public override void OnWizardNext(object sender, WizardPageEventArgs e)
        {
            if (!IsValid())
            {
                e.Cancel = true;
                return;
            }
            else
            {
                ProgressDialog     dlgProgresss = new ProgressDialog();
                CustomBrokerClient client       = GetWizard().Tag as CustomBrokerClient;

                //
                // See if the user wants to update are add.  The user will only be asked if the originally did a search but
                // changed one of the patient ids.
                //
                if (_Update && (comboBoxPatientId.Text != _OriginalPatientId))
                {
                    DialogResult r = Messager.ShowQuestion(this, "You searched for a patient but have changed some of the identifying information.  " +
                                                           "Would you like to update this patient with the new information? \r\n\r\nClicking No will add a new patient.",
                                                           MessageBoxButtons.YesNo);
                    _Update = r == DialogResult.Yes;
                }

                UpdatePatient();
                dlgProgresss.Title       = _Update ? "Update patient" : "Add Patient";
                dlgProgresss.Description = _Update ? "Updating..." : "Adding...";
                dlgProgresss.Action      = () =>
                {
                    if (_Update)
                    {
                        client.UpdatePatient(_OriginalPatientId, _OriginalIssuerOfPatientId, _Patient);
                    }
                    else
                    {
                        client.AddPatient(_Patient);
                    }
                };

                if (dlgProgresss.ShowDialog(this) == DialogResult.Cancel)
                {
                    if (dlgProgresss.Exception != null)
                    {
                        e.Cancel = true;
                        Messager.ShowError(this, dlgProgresss.Exception);
                    }
                }
                else
                {
                    if (_Update)
                    {
                        UpdatePatient(_OriginalPatientId, _OriginalIssuerOfPatientId, _Patient.PatientID, _Patient.IssuerOfPatientID);
                    }
                    else
                    {
                        comboBoxPatientId.Items.Add(new PatientKey()
                        {
                            PatientId = _Patient.PatientID, IssurerOfPatientId = _Patient.IssuerOfPatientID
                        });
                    }

                    comboBoxPatientId.Text = _Patient.PatientID;
                    if (_Patient != null)
                    {
                        _OriginalPatientId         = _Patient.PatientID;
                        _OriginalIssuerOfPatientId = _Patient.IssuerOfPatientID;
                    }
                    else
                    {
                        e.Cancel = true;
                        ParentWizard.Reset();
                    }
                }
            }

            base.OnWizardNext(sender, e);
        }
 void MiddlePage_WizardNext(object sender, WizardPageEventArgs e)
 {
     r.Close();
 }
Пример #18
0
 private void OptionsPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     _settings.ThemeName = cbTheme.Text;
 }
Пример #19
0
 private void ClassInformation_WizardBack(object sender, WizardPageEventArgs e)
 {
     Save();
 }
 private void SelectExperimentPage_WizardNext(object sender, WizardPageEventArgs e)
 {
 }
Пример #21
0
        public override void OnWizardNext(object sender, WizardPageEventArgs e)
        {
            if (!IsValid())
            {
                e.Cancel = true;
                return;
            }
            else
            {
                ProgressDialog      dlgProgresss = new ProgressDialog();
                BrokerServiceClient client       = GetWizard().Tag as BrokerServiceClient;

                if (_Update && comboBoxRequestedId.Text != _OriginalRequestedProcedureId)
                {
                    DialogResult r = Messager.ShowQuestion(this, "You searched for a requested procedure but have changed some of the identifying information.  " +
                                                           "Would you like to update this requested procedure with the new information?\r\n\r\nClicking No will add a new requested procedure.",
                                                           MessageBoxButtons.YesNo);
                    _Update = r == DialogResult.Yes;
                }

                UpdateRequestedProcedure();
                dlgProgresss.Title       = _Update ? "Update Requested Procedure" : "Add Requested Procedure";
                dlgProgresss.Description = _Update ? "Updating..." : "Adding...";
                dlgProgresss.Action      = () =>
                {
                    if (_Update)
                    {
                        client.UpdateRequestedProcedure(_ImagingServiceRequest.AccessionNumber, _OriginalRequestedProcedureId, RequestedProcedure);
                    }

                    else
                    {
                        client.AddRequestedProcedure(_ImagingServiceRequest.AccessionNumber, RequestedProcedure);
                    }
                };

                if (dlgProgresss.ShowDialog(this) == DialogResult.Cancel)
                {
                    if (dlgProgresss.Exception != null)
                    {
                        e.Cancel = true;
                        Messager.ShowError(this, dlgProgresss.Exception);
                    }
                }
                else
                {
                    if (_Update)
                    {
                        int index = comboBoxRequestedId.Items.IndexOf(_OriginalRequestedProcedureId);

                        if (index != -1)
                        {
                            comboBoxRequestedId.Items.Remove(_OriginalRequestedProcedureId);
                        }
                    }
                    comboBoxRequestedId.Items.Add(RequestedProcedure.RequestedProcedureID);
                    comboBoxRequestedId.Text      = RequestedProcedure.RequestedProcedureID;
                    _OriginalRequestedProcedureId = RequestedProcedure.RequestedProcedureID;
                }
            }

            base.OnWizardNext(sender, e);
        }
Пример #22
0
 private void SelectSubjectPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     InitializeSubject();
 }
Пример #23
0
        public override void OnWizardNext(object sender, WizardPageEventArgs e)
        {
            if (!IsValid())
            {
                e.Cancel = true;
                return;
            }
            else
            {
                ProgressDialog     dlgProgresss = new ProgressDialog();
                CustomBrokerClient client       = GetWizard().Tag as CustomBrokerClient;

                //
                // See if the user wants to update are add.  The user will only be asked if the originally did a search but
                // changed one of the patient ids.
                //
                if (_Update && (comboBoxAccessionNumber.Text != _OriginalAccessionNumber))
                {
                    DialogResult r = Messager.ShowQuestion(this, "You searched for an imaging service request but have changed the accession number.  " +
                                                           "Would you like to update this imaging service request with the accession number?  " +
                                                           "\r\n\r\nClicking No will add a new imaging service request.", MessageBoxButtons.YesNo);
                    _Update = r == DialogResult.Yes;
                }

                UpdateImagingServiceRequest();
                dlgProgresss.Title       = _Update ? "Update Imaging Service Request" : "Add Imaging Service Request";
                dlgProgresss.Description = _Update ? "Updating..." : "Adding...";
                dlgProgresss.Action      = () =>
                {
                    if (_Update)
                    {
                        client.UpdateImagingServiceRequest(_OriginalAccessionNumber, _Patient.PatientID, _Patient.IssuerOfPatientID, _ImagingServiceRequest);
                    }
                    else
                    {
                        client.AddImagingServiceRequest(_Patient.PatientID, _Patient.IssuerOfPatientID, _ImagingServiceRequest);
                    }
                };

                if (dlgProgresss.ShowDialog(this) == DialogResult.Cancel)
                {
                    if (dlgProgresss.Exception != null)
                    {
                        e.Cancel = true;
                        Messager.ShowError(this, dlgProgresss.Exception);
                    }
                }
                else
                {
                    if (_Update)
                    {
                        int index = comboBoxAccessionNumber.Items.IndexOf(_OriginalAccessionNumber);

                        if (index != -1)
                        {
                            comboBoxAccessionNumber.Items.Remove(_OriginalAccessionNumber);
                        }
                    }
                    comboBoxAccessionNumber.Items.Add(_ImagingServiceRequest.AccessionNumber);
                    comboBoxAccessionNumber.Text = _ImagingServiceRequest.AccessionNumber;
                    _OriginalAccessionNumber     = _ImagingServiceRequest.AccessionNumber;
                }
            }
            base.OnWizardNext(sender, e);
        }
Пример #24
0
 private void OptionsPage_WizardBack(object sender, WizardPageEventArgs e)
 {
     saveOptions();
 }
Пример #25
0
 void EditPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     Access.Username = username.Text;
     Access.Password = password.Text;
     Access.Domain   = domain.Text;
 }