Пример #1
0
        void PropertiesClicked(object sender, EventArgs e)
        {
            using (var pd = new PropertiesDialog())
            {
                pd.TitleBox.Text  = surface1.Map.Title;
                pd.DescBox.Text   = surface1.Map.Description;
                pd.AuthorBox.Text = surface1.Map.Author;
                pd.MapVisibilityComboBox.SelectedIndex = pd.MapVisibilityComboBox.FindStringExact(Enum.GetName(typeof(MapVisibility), surface1.Map.Visibility));

                if (DialogResult.OK != pd.ShowDialog())
                {
                    return;
                }

                surface1.Map.Title       = pd.TitleBox.Text;
                surface1.Map.Description = pd.DescBox.Text;
                surface1.Map.Author      = pd.AuthorBox.Text;
                surface1.Map.Visibility  = (MapVisibility)Enum.Parse(typeof(MapVisibility), pd.MapVisibilityComboBox.SelectedItem.ToString());
            }
        }
Пример #2
0
        void PropertiesClicked(object sender, EventArgs e)
        {
            using (var pd = new PropertiesDialog())
            {
                pd.title.Text            = surface1.Map.Title;
                pd.desc.Text             = surface1.Map.Description;
                pd.author.Text           = surface1.Map.Author;
                pd.selectable.Checked    = surface1.Map.Selectable;
                pd.useAsShellmap.Checked = surface1.Map.UseAsShellmap;

                if (DialogResult.OK != pd.ShowDialog())
                {
                    return;
                }

                surface1.Map.Title         = pd.title.Text;
                surface1.Map.Description   = pd.desc.Text;
                surface1.Map.Author        = pd.author.Text;
                surface1.Map.Selectable    = pd.selectable.Checked;
                surface1.Map.UseAsShellmap = pd.useAsShellmap.Checked;
            }
        }
Пример #3
0
        void PropertiesClicked(object sender, EventArgs e)
        {
            using (var pd = new PropertiesDialog())
            {
                pd.title.Text = surface1.Map.Title;
                pd.desc.Text = surface1.Map.Description;
                pd.author.Text = surface1.Map.Author;
                pd.selectable.Checked = surface1.Map.Selectable;
                pd.useAsShellmap.Checked = surface1.Map.UseAsShellmap;

                if (DialogResult.OK != pd.ShowDialog())
                    return;

                surface1.Map.Title = pd.title.Text;
                surface1.Map.Description = pd.desc.Text;
                surface1.Map.Author = pd.author.Text;
                surface1.Map.Selectable = pd.selectable.Checked;
                surface1.Map.UseAsShellmap = pd.useAsShellmap.Checked;
            }
        }
Пример #4
0
        void PropertiesClicked(object sender, EventArgs e)
        {
            using (var pd = new PropertiesDialog())
            {
                pd.TitleBox.Text = surface1.Map.Title;
                pd.DescBox.Text = surface1.Map.Description;
                pd.AuthorBox.Text = surface1.Map.Author;
                pd.MapVisibilityComboBox.SelectedIndex = pd.MapVisibilityComboBox.FindStringExact(Enum.GetName(typeof(MapVisibility), surface1.Map.Visibility));

                if (DialogResult.OK != pd.ShowDialog())
                    return;

                surface1.Map.Title = pd.TitleBox.Text;
                surface1.Map.Description = pd.DescBox.Text;
                surface1.Map.Author = pd.AuthorBox.Text;
                surface1.Map.Visibility = (MapVisibility)Enum.Parse(typeof(MapVisibility), pd.MapVisibilityComboBox.SelectedItem.ToString());
            }
        }