Exemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //利用C#反射打开指定窗体
            string   stratSystem = string.Empty;
            string   stratClass  = string.Empty;
            Assembly assembly    = Assembly.GetExecutingAssembly();

            string[] t = new string[assembly.GetTypes().Length];
            stratSystem = assembly.GetName().Name.Replace(" ", "_");
            stratClass  = ConfigurationManager.AppSettings["FormName"].ToString();
            Type         type = assembly.GetType(stratSystem + "." + stratClass);
            MetroAppForm obj  = (MetroAppForm)Activator.CreateInstance(type);

            Application.Run(obj);
            //Application.Run(new Manufacturing3());
        }
Exemplo n.º 2
0
 /// <summary>
 /// Renders the MetroForm.
 /// </summary>
 /// <param name="form">Form to render.</param>
 /// <param name="e">Rendering event arguments.</param>
 public static void Paint(MetroAppForm form, PaintEventArgs e)
 {
     MetroRenderer renderer = GetRenderer(Renderers.MetroForm);
     renderer.Render(GetRenderingInfo(form, e, GetColorTable()));
 }