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);
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 private void SelectExperimenterPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     if (experimentersList.SelectedIndex >= 0)
     {
         Experimenter.Active = (Experimenter)experimentersList.Items[experimentersList.SelectedIndex];
     }
 }
Ejemplo n.º 4
0
        private void ClassInformation_WizardNext(object sender, WizardPageEventArgs e)
        {
            if (!FormValid())
            {
                e.Cancel = true;
                return;
            }

            Save();
        }
Ejemplo n.º 5
0
 private void FileOptionsPage_WizardBack(object sender, WizardPageEventArgs e)
 {
     if (AppOptions.isMerge)
     {
         saveMergeData();
     }
     else
     {
         saveSplitData();
     }
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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";
         }
     }
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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];
            }
        }
Ejemplo n.º 14
0
 private void ConnectToDevicePage_WizardNext(object sender, WizardPageEventArgs e)
 {
     timer.Enabled = false;
 }
Ejemplo n.º 15
0
 private void WhenPage2IsShown(object sender, WizardPageEventArgs e)
 {
     MessageBox.Show(@"Showing page 2");
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 17
0
 void MiddlePage_WizardNext(object sender, WizardPageEventArgs e)
 {
     r.Close();
 }
Ejemplo n.º 18
0
 private void OptionsPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     _settings.ThemeName = cbTheme.Text;
 }
Ejemplo n.º 19
0
 private void ClassInformation_WizardBack(object sender, WizardPageEventArgs e)
 {
     Save();
 }
 private void SelectExperimentPage_WizardNext(object sender, WizardPageEventArgs e)
 {
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 22
0
 private void SelectSubjectPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     InitializeSubject();
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 24
0
 private void OptionsPage_WizardBack(object sender, WizardPageEventArgs e)
 {
     saveOptions();
 }
Ejemplo n.º 25
0
 void EditPage_WizardNext(object sender, WizardPageEventArgs e)
 {
     Access.Username = username.Text;
     Access.Password = password.Text;
     Access.Domain   = domain.Text;
 }