public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { ScriptsEditor t = new ScriptsEditor(); t.LoadScripts((List<Client.Game.Map.Script>)value); t.Dock = DockStyle.Fill; Form f = new Form { Size = new Size(800, 500) }; f.Controls.Add(t); f.ShowDialog(); return base.EditValue(context, provider, value); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { ScriptsEditor t = new ScriptsEditor(); t.LoadScripts((List <Client.Game.Map.Script>)value); t.Dock = DockStyle.Fill; Form f = new Form { Size = new Size(800, 500) }; f.Controls.Add(t); f.ShowDialog(); return(base.EditValue(context, provider, value)); }
private void scriptEditorToolStripMenuItem_Click(object sender, EventArgs e) { if (scriptEditorForm == null || scriptEditorForm.IsDisposed) { scriptEditorForm = new Form { Size = new Size(800, 500) }; ScriptsEditor s; scriptEditorForm.Controls.Add(s = new ScriptsEditor { Dock = DockStyle.Fill }); s.LoadScripts(CurrentMap.Scripts); } if (!scriptEditorForm.Visible) { scriptEditorForm.Show(); } else { scriptEditorForm.Hide(); } }
private void scriptEditorToolStripMenuItem_Click(object sender, EventArgs e) { if (scriptEditorForm == null || scriptEditorForm.IsDisposed) { scriptEditorForm = new Form { Size = new Size(800, 500) }; ScriptsEditor s; scriptEditorForm.Controls.Add(s = new ScriptsEditor { Dock = DockStyle.Fill }); s.LoadScripts(CurrentMap.Scripts); } if (!scriptEditorForm.Visible) scriptEditorForm.Show(); else scriptEditorForm.Hide(); }