Пример #1
0
 private void btCh_Click(object sender, EventArgs e)
 {
     if (selectedId != 0)
     {
         ServicesForm rf = new ServicesForm(selectedId, (MainForm)Application.OpenForms["MainForm"]);
         rf.ShowDialog();
     }
 }
Пример #2
0
        /// <summary>
        /// Runs this instance.
        /// </summary>
        public void Run()
        {
            this.AddTraceHeader("ServicesController", "Run");

            if (this.VisualStudioService.IsMvvmCrossSolution)
            {
                string templatesPath = this.SettingsService.ServicesTemplatesPath;

                List <ItemTemplateInfo> itemTemplateInfos = this.VisualStudioService.GetFolderTemplateInfos(templatesPath, "Services");

                ServicesForm form = new ServicesForm(this.GetViewModelNames(), itemTemplateInfos, this.SettingsService.DisplayLogo);

                form.ShowDialog();

                if (form.Continue)
                {
                    this.WriteStatusBarMessage("Ninja Coder is running....");

                    Project project = this.VisualStudioService.CoreProject;

                    if (project != null)
                    {
                        List <string> messages = this.servicesService.AddServices(
                            this.VisualStudioService,
                            form.RequiredTemplates,
                            form.ImplementInViewModel,
                            form.IncludeUnitTests);

                        //// show the readme.
                        this.ShowReadMe("Add Services", messages);

                        this.WriteStatusBarMessage("Ninja Coder has completed the adding of the services.");
                    }
                    else
                    {
                        TraceService.WriteError("ServicesController::AddServices Cannot find Core project");
                    }
                }
            }
            else
            {
                this.ShowNotMvvmCrossSolutionMessage();
            }
        }
Пример #3
0
        public static void openServicesForm()
        {
            ServicesForm servicesForm = new ServicesForm();

            servicesForm.ShowDialog();
        }
Пример #4
0
        private void btNew_Click(object sender, EventArgs e)
        {
            ServicesForm sf = new ServicesForm((MainForm)Application.OpenForms["MainForm"]);

            sf.ShowDialog();
        }