Beispiel #1
0
        private void addLayerButton_Click(object sender, EventArgs e)
        {
            NewLayerForm form = new NewLayerForm();
            form.ShowDialog();

            if (form.OKPressed)
            {
                TileLayer tileLayer = new TileLayer(
                    int.Parse(form.width.Text),
                    int.Parse(form.height.Text));

                layerDict.Add(form.name.Text, tileLayer);
                tileMap.layers.Add(tileLayer);
                layerListBox.Items.Add(form.name.Text);

                AdjustScrollBars();
            }
        }
Beispiel #2
0
        private void addLayerButton_Click(object sender, EventArgs e)
        {
            NewLayerForm form = new NewLayerForm();
            if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                TileLayer tileLayer = new TileLayer(
                                int.Parse(form.width.Text),
                                int.Parse(form.height.Text));

                tileMap.Layers.Add(tileLayer);
                tileLayerDictionary.Add(form.name.Text, tileLayer);
                layerListBox.Items.Add(form.name.Text);

                AdjustScrollbars(tileMap);
            }
        }