コード例 #1
0
        protected void LoadWizards()
        {
            wizards.Clear();
            if (!System.IO.Directory.Exists(WizardFolder))
            {
#if MAC
                Console.WriteLine("Plugins Folder \"" + this.WizardFolder + "\" was not found.");
#endif
                return;
            }

            string[] plugins = System.IO.Directory.GetFiles(WizardFolder, "*.wizard.dll");
#if MAC
            Console.WriteLine("Found " + plugins.Length.ToString() + " Plugins");
#endif
            foreach (string plugin in plugins)
            {
#if MAC
                Console.WriteLine(plugin);
#endif
                object[] objs = SimPe.LoadFileWrappers.LoadPlugins(plugin, typeof(IWizardEntry));
                foreach (object o in objs)
                {
                    IWizardEntry bid = (IWizardEntry)o;
                    wizards.Add(bid);
                }
            }
        }
コード例 #2
0
        Panel BuildWizardPanel(IWizardEntry we)
        {
            Panel pn = new Panel();

            pn.Parent = pnwizard;
            pn.Width  = pnwizard.Width - 148;
            pn.Left   = 24;
            pn.Height = 64;


            PictureBox pb = new PictureBox();

            pb.Parent  = pn;
            pb.Width   = 64;
            pb.Height  = 64;
            pb.Left    = 0;
            pb.Top     = 0;
            pb.Image   = we.WizardImage;
            pb.Visible = true;

            LinkLabel lb1 = new LinkLabel();

            lb1.Parent       = pn;
            lb1.Left         = pb.Width + 8;
            lb1.Top          = 0;
            lb1.AutoSize     = true;
            lb1.Text         = we.WizardCaption;
            lb1.Font         = new Font("Georgia", (float)10, FontStyle.Bold | FontStyle.Italic);
            lb1.LinkColor    = Color.FromArgb(0xE5, 0x53, 0x00);
            lb1.Tag          = we;
            lb1.LinkClicked += new LinkLabelLinkClickedEventHandler(StartWizard);
            lb1.Visible      = true;
            //lb1.Enabled = we.CanContinue;

            Label lb2 = new Label();

            lb2.Parent    = pn;
            lb2.AutoSize  = false;
            lb2.Left      = pb.Width + 8;
            lb2.Top       = lb1.Top + lb1.Height;
            lb2.Width     = pn.Width - lb2.Left - 16;
            lb2.Height    = pn.Height - lb2.Top;
            lb2.Font      = new Font("Verdana", (float)8);
            lb2.ForeColor = Color.DarkGray;
            lb2.Text      = we.WizardDescription;
            lb2.Visible   = true;


            return(pn);
        }