예제 #1
0
        private void butSelected_Click(object sender, EventArgs e)
        {
            List <SetupWizard.SetupWizClass> listSetupClasses = new List <SetupWizard.SetupWizClass>();

            foreach (int rowNum in gridMain.SelectedIndices)
            {
                ODGridRow selectedRow = gridMain.Rows[rowNum];
                if (selectedRow.Tag.GetType().BaseType != typeof(OpenDental.SetupWizard.SetupWizClass))
                {
                    continue;
                }
                SetupWizard.SetupWizClass setupWizClass = (SetupWizard.SetupWizClass)selectedRow.Tag;
                SetupWizard.SetupIntro    intro         = new SetupWizard.SetupIntro(setupWizClass.Name, setupWizClass.GetDescript);
                SetupWizard.SetupComplete complete      = new SetupWizard.SetupComplete(setupWizClass.Name);
                listSetupClasses.Add(intro);
                listSetupClasses.Add(setupWizClass);
                listSetupClasses.Add(complete);
            }
            FormSetupWizardProgress FormSWP = new FormSetupWizardProgress(listSetupClasses, false);

            FormSWP.ShowDialog();
        }
예제 #2
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            //Show a "Congatulations, you've already finished this!" section for finished sections.
            ODGridRow clickedRow = gridMain.Rows[e.Row];
            FormSetupWizardProgress          FormSWP;
            List <SetupWizard.SetupWizClass> listSetupClasses = new List <SetupWizard.SetupWizClass>();

            if (clickedRow.Tag.GetType().BaseType != typeof(SetupWizard.SetupWizClass))              //category clicked
            {
                foreach (SetupWizard.SetupWizClass setupWizClass in _listSetupWizItems)              //for each row, add the row and an intro and complete class.
                {
                    if (setupWizClass.GetCategory == (ODSetupCategory)clickedRow.Tag)
                    {
                        SetupWizard.SetupIntro    intro    = new SetupWizard.SetupIntro(setupWizClass.Name, setupWizClass.GetDescript);
                        SetupWizard.SetupComplete complete = new SetupWizard.SetupComplete(setupWizClass.Name);
                        listSetupClasses.Add(intro);
                        listSetupClasses.Add(setupWizClass);
                        listSetupClasses.Add(complete);
                    }
                }
                FormSWP = new FormSetupWizardProgress(listSetupClasses, true);
                FormSWP.ShowDialog();
            }
            else               //single row clicked
            {
                SetupWizard.SetupWizClass setupWizClass = (SetupWizard.SetupWizClass)clickedRow.Tag;
                SetupWizard.SetupIntro    intro         = new SetupWizard.SetupIntro(setupWizClass.Name, setupWizClass.GetDescript);
                SetupWizard.SetupComplete complete      = new SetupWizard.SetupComplete(setupWizClass.Name);
                listSetupClasses.Add(intro);
                listSetupClasses.Add(setupWizClass);
                listSetupClasses.Add(complete);
                FormSWP = new FormSetupWizardProgress(listSetupClasses, false);
                FormSWP.ShowDialog();
            }
            FillGrid();
        }