Esempio n. 1
0
 static void Main(String[] args)
 {
     if (args.Length == 4)
     {
         Application.SetCompatibleTextRenderingDefault(false);
         MainIO main = new MainIO(true);
         main.readMapFile(args[0]);
         main.createRegionPatchFile(args[1], args[2], args[3], true, true, true, true, true, true);
         main.close();
     }
     else
     {
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         Application.Run(new Form1());
     }
 }
Esempio n. 2
0
        private void btnRead_Click(object sender, EventArgs e)
        {
            if (!File.Exists(tbSrcMap.Text))
            {
                MessageBox.Show("Datei nicht gefunden!");
                return;
            }

            main.readMapFile(tbSrcMap.Text);

            pnlRegions.Controls.Clear();
            if (main.getRegions().Count == 0)
            {
                Label lblRegion = new Label();
                lblRegion.AutoSize = true;
                lblRegion.Text     = "Keine Regionen gefunden!";
                lblRegion.Location = new Point(12, 11);
                pnlRegions.Controls.Add(lblRegion);
                return;
            }
            int num = 0;

            foreach (KeyValuePair <string, PatchRegion> kvp in main.getRegions())
            {
                Label lblRegion = new Label();
                lblRegion.AutoSize = true;
                lblRegion.Text     = kvp.Key;
                lblRegion.Location = new Point(12, 11 + 25 * num);
                Button btnSave = new Button();
                btnSave.Text     = "Speichern";
                btnSave.Tag      = kvp.Key;
                btnSave.Click   += btnSave_Click;
                btnSave.Location = new Point(220, 6 + 25 * num);
                pnlRegions.Controls.Add(lblRegion);
                pnlRegions.Controls.Add(btnSave);

                num++;
            }
        }