Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (Properties.Settings.Default.UpgradeRequired)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.UpgradeRequired = false;
                Properties.Settings.Default.Save();
            }

            mainForm = new Form1();
            LSWConsole.Initialize();
            Application.Run(mainForm);
        }
Ejemplo n.º 2
0
        public void PopulateConsole()
        {
            panel1.Controls.Clear();

            List <LSWCCLog> logs = LSWConsole.GetAllLogs();

            for (int i = 0; i < logs.Count; i++)
            {
                Panel panel = new Panel();
                panel.Parent   = panel1;
                panel.Size     = new Size(panel1.Size.Width - 20, 32);
                panel.Location = new Point(10, i * 40 + 10);

                PictureBox pb = new PictureBox();
                pb.Size     = new Size(32, 32);
                pb.Location = new Point(0, 0);
                switch (logs[i].type)
                {
                case LSWCCLogType.Error:
                    pb.Image = Bitmap.FromHicon(SystemIcons.Error.Handle);
                    break;

                case LSWCCLogType.Warning:
                    pb.Image = Bitmap.FromHicon(SystemIcons.Warning.Handle);
                    break;

                case LSWCCLogType.Debug:
                    pb.Image = Bitmap.FromHicon(SystemIcons.Information.Handle);
                    break;
                }

                Label l = new Label();
                l.Location = new Point(40, 8);
                l.Size     = new Size(panel1.Size.Width - 60, 32);
                l.Text     = logs[i].message;

                panel.Controls.Add(pb);
                panel.Controls.Add(l);
                panel1.Controls.Add(panel);
            }
        }
Ejemplo n.º 3
0
 public static void CheckForErrors()
 {
     LSWConsole.ClearAllLogs();
     if (string.IsNullOrWhiteSpace(animations))
     {
         LSWConsole.LogError(0, "Character contains no animations.");
     }
     if (formalName != null && formalName.Length == 0)
     {
         LSWConsole.LogError(1, "Character's formal name is invalid.");
     }
     if (!File.Exists(ghgFile))
     {
         LSWConsole.LogError(2, "Could not locate GHG file: " + ghgFile);
     }
     if (!File.Exists(ghgLrFile))
     {
         LSWConsole.LogError(3, "Could not locate LR GHG file: " + ghgLrFile);
     }
     mainForm.button8.Text = "Errors: " + LSWConsole.GetErrorCount();
 }