private void LoadRegisteredProfiles() { RegisteredTypes types = RegisteredTypes.Load(); foreach (ProfileInfo pi in types.Types) { RegisteredTypeProfile rtp = new RegisteredTypeProfile(pi); AddProfile(rtp); } }
private void ProfileSelected(object sender, Gui.Wizard.PageEventArgs e) { IXEditNetProfile tmp = null; if (treeView1.SelectedNode == null) { MessageBox.Show(this, "Please select a wizard to create a new document", "Select Profile", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } object o = treeView1.SelectedNode.Tag; if (o is IXEditNetProfile) { tmp = (IXEditNetProfile)o; } else if (o is ProfileInfo) { tmp = new RegisteredTypeProfile((ProfileInfo)o); } if (tmp != null && tmp == currentProfile) { return; // use previous wizard instance } currentProfile = tmp; if (currentProfile == null) { throw new InvalidOperationException("Tag for selected node is null!"); } while (wizard1.Pages.Count > 1) { wizard1.Pages.RemoveAt(1); } wizardPlugin = currentProfile.GetCreateWizardPlugin(); if (wizardPlugin == null) { OnWizardFinished(new EventArgs()); return; } wizard1.Pages.AddRange(wizardPlugin.Pages); wizard1.PageIndex = 0; e.Page = wizard1.Pages[1]; }
private void ProfileSelected(object sender, Gui.Wizard.PageEventArgs e) { IXEditNetProfile tmp=null; if ( treeView1.SelectedNode == null ) { MessageBox.Show(this, "Please select a wizard to create a new document", "Select Profile", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } object o=treeView1.SelectedNode.Tag; if ( o is IXEditNetProfile ) tmp=(IXEditNetProfile) o; else if ( o is ProfileInfo ) tmp=new RegisteredTypeProfile((ProfileInfo) o); if ( tmp != null && tmp == currentProfile ) return; // use previous wizard instance currentProfile=tmp; if ( currentProfile == null ) throw new InvalidOperationException("Tag for selected node is null!"); while ( wizard1.Pages.Count > 1 ) wizard1.Pages.RemoveAt(1); wizardPlugin=currentProfile.GetCreateWizardPlugin(); if ( wizardPlugin == null ) { OnWizardFinished(new EventArgs()); return; } wizard1.Pages.AddRange(wizardPlugin.Pages); wizard1.PageIndex=0; e.Page=wizard1.Pages[1]; }
private void LoadRegisteredProfiles() { RegisteredTypes types=RegisteredTypes.Load(); foreach ( ProfileInfo pi in types.Types ) { RegisteredTypeProfile rtp=new RegisteredTypeProfile(pi); AddProfile(rtp); } }