Esempio n. 1
0
        public void AddMap(string path, string key, bool swf = true)
        {
            try
            {
                MapFrame form;

                if (maps.Count > 0)
                {
                    form = new MapFrame(maps.OrderByDescending(x => x.ID).ToArray()[0].ID + 1, path, key, swf);
                }
                else
                {
                    form = new MapFrame(10000, path, key, swf);
                }

                form.Location = new Point((maps.Count + 1) * 5, (maps.Count + 1) * 5);

                form.TopLevel = false;
                maps.Add(form);
                panel3.Controls.Add(form);
                form.Visible = true;

                form.RefreshMap(true);
            }
            catch { }
        }
Esempio n. 2
0
        private void toolStripMenuItem3_Click(object sender, EventArgs e)
        {
            try
            {
                MapFrame form;

                if (maps.Count > 0)
                {
                    form = new MapFrame(maps.OrderByDescending(x => x.ID).ToArray()[0].ID + 1);
                }
                else
                {
                    form = new MapFrame(10000);
                }

                form.Location = new Point((maps.Count + 1) * 5, (maps.Count + 1) * 5);

                form.TopLevel = false;
                maps.Add(form);
                panel3.Controls.Add(form);
                form.Visible = true;

                form.RefreshMap(true);
            }
            catch { }
        }
Esempio n. 3
0
        public MapOptions(MapFrame owner)
        {
            InitializeComponent();

            FormOwner = owner;

            try
            {
                textBox1.Text = FormOwner.ID.ToString();

                textBox2.Text = FormOwner.continent;
                textBox5.Text = FormOwner.signature;

                textBox3.Text    = FormOwner.height.ToString();
                textBox3.Enabled = false;

                textBox4.Text    = FormOwner.width.ToString();
                textBox4.Enabled = false;

                if (FormOwner.background != null)
                {
                    Bitmap last    = new Bitmap(Image.FromFile(FormOwner.background));
                    Size   newSize = new System.Drawing.Size(100, 100);
                    Bitmap result  = new Bitmap(newSize.Width, newSize.Height);

                    using (Graphics g = Graphics.FromImage((Image)result))
                        g.DrawImage(last, 0, 0, newSize.Width, newSize.Height);

                    pictureBox1.Image = result;
                    groundPath        = FormOwner.background;
                }

                checkBox1.Checked = FormOwner.challengeAuto;
                checkBox2.Checked = FormOwner.agroAuto;
                checkBox3.Checked = FormOwner.saveAuto;
                checkBox4.Checked = FormOwner.telepAuto;
                checkBox5.Checked = FormOwner.externMap;
            }
            catch { }
        }
Esempio n. 4
0
        public MapOptions(MapFrame owner)
        {
            InitializeComponent();

            FormOwner = owner;

            try
            {
                textBox1.Text = FormOwner.ID.ToString();

                textBox2.Text = FormOwner.continent;
                textBox5.Text = FormOwner.signature;

                textBox3.Text = FormOwner.height.ToString();
                textBox3.Enabled = false;

                textBox4.Text = FormOwner.width.ToString();
                textBox4.Enabled = false;

                if (FormOwner.background != null)
                {
                    Bitmap last = new Bitmap(Image.FromFile(FormOwner.background));
                    Size newSize = new System.Drawing.Size(100, 100);
                    Bitmap result = new Bitmap(newSize.Width, newSize.Height);

                    using (Graphics g = Graphics.FromImage((Image)result))
                        g.DrawImage(last, 0, 0, newSize.Width, newSize.Height);

                    pictureBox1.Image = result;
                    groundPath = FormOwner.background;
                }

                checkBox1.Checked = FormOwner.challengeAuto;
                checkBox2.Checked = FormOwner.agroAuto;
                checkBox3.Checked = FormOwner.saveAuto;
                checkBox4.Checked = FormOwner.telepAuto;
                checkBox5.Checked = FormOwner.externMap;
            }
            catch { }
        }
Esempio n. 5
0
        public void AddMap(string path, string key, bool swf = true)
        {
            try
            {
                MapFrame form;

                if (maps.Count > 0)
                    form = new MapFrame(maps.OrderByDescending(x => x.ID).ToArray()[0].ID + 1, path, key, swf);
                else
                    form = new MapFrame(10000, path, key, swf);

                form.Location = new Point((maps.Count + 1) * 5, (maps.Count + 1) * 5);

                form.TopLevel = false;
                maps.Add(form);
                panel3.Controls.Add(form);
                form.Visible = true;

                form.RefreshMap(true);
            }
            catch { }
        }
Esempio n. 6
0
        private void toolStripMenuItem3_Click(object sender, EventArgs e)
        {
            try
            {
                MapFrame form;

                if (maps.Count > 0)
                    form = new MapFrame(maps.OrderByDescending(x => x.ID).ToArray()[0].ID + 1);
                else
                    form = new MapFrame(10000);

                form.Location = new Point((maps.Count + 1) * 5, (maps.Count + 1) * 5);

                form.TopLevel = false;
                maps.Add(form);
                panel3.Controls.Add(form);
                form.Visible = true;

                form.RefreshMap(true);
            }
            catch { }
        }