Mud Designer:

- Added a new designer that I will begin working on and testing UITypeEditors with. Future plan is to migrate all editors into a single editor relying heavily on UITypeEditors to flesh it out.
 - Selecting the Script property within the Designer.cs form executes the UIScriptEditor class and installs the UIScriptControl into the Designers control collection.
 - Clicking close on the Designer.cs GUI showcases clearing the controls of custom UITypeEditors and how the results of the editing is saved into the object that the PropertyGrid is editing.

Mud Engine:
 - Added a UIScriptControl User Control that the UIScriptEditor TypeEditor uses to install directly into the new Test Designer.
This commit is contained in:
Scionwest_cp 2010-01-03 20:48:25 -08:00
parent 90b7ca1a87
commit ee3a8c2b60
10 changed files with 562 additions and 43 deletions

95
Mud Designer/Designer.Designer.cs generated Normal file
View file

@ -0,0 +1,95 @@
namespace MudDesigner
{
partial class Designer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.ControlContainer = new System.Windows.Forms.SplitContainer();
this.button1 = new System.Windows.Forms.Button();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.ControlContainer.Panel2.SuspendLayout();
this.ControlContainer.SuspendLayout();
this.SuspendLayout();
//
// ControlContainer
//
this.ControlContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.ControlContainer.Location = new System.Drawing.Point(0, 0);
this.ControlContainer.Name = "ControlContainer";
//
// ControlContainer.Panel2
//
this.ControlContainer.Panel2.Controls.Add(this.propertyGrid1);
this.ControlContainer.Panel2.Controls.Add(this.button1);
this.ControlContainer.Size = new System.Drawing.Size(797, 625);
this.ControlContainer.SplitterDistance = 538;
this.ControlContainer.TabIndex = 0;
//
// button1
//
this.button1.Dock = System.Windows.Forms.DockStyle.Top;
this.button1.Location = new System.Drawing.Point(0, 0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(255, 23);
this.button1.TabIndex = 1;
this.button1.Text = "Close";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// propertyGrid1
//
this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyGrid1.Location = new System.Drawing.Point(0, 23);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.Size = new System.Drawing.Size(255, 602);
this.propertyGrid1.TabIndex = 2;
//
// Designer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.ClientSize = new System.Drawing.Size(797, 625);
this.Controls.Add(this.ControlContainer);
this.Name = "Designer";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Mud Designer Replacement Test";
this.ControlContainer.Panel2.ResumeLayout(false);
this.ControlContainer.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
internal System.Windows.Forms.SplitContainer ControlContainer;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PropertyGrid propertyGrid1;
}
}

29
Mud Designer/Designer.cs Normal file
View file

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MudDesigner.MudEngine.GameObjects.Environment;
using MudDesigner.MudEngine.GameObjects;
namespace MudDesigner
{
public partial class Designer : Form
{
Room r = new Room();
public Designer()
{
InitializeComponent();
propertyGrid1.SelectedObject = r;
}
private void button1_Click(object sender, EventArgs e)
{
ControlContainer.Panel1.Controls.Clear();
}
}
}

120
Mud Designer/Designer.resx Normal file
View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -160,5 +160,20 @@ namespace MudDesigner.Editors
{
System.Diagnostics.Process.Start("http://muddesigner.dailyforum.net");
}
private void btnTest_Click(object sender, EventArgs e)
{
Designer form = new Designer();
Program.CurrentEditor = form;
form.Show();
this.Hide();
while (form.Created)
Application.DoEvents();
form = null;
this.Show();
}
}
}

View file

@ -30,6 +30,9 @@
{
this.components = new System.ComponentModel.Container();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.label2 = new System.Windows.Forms.Label();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.label1 = new System.Windows.Forms.Label();
this.btnLogo = new System.Windows.Forms.Button();
this.tabEditors = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
@ -57,9 +60,7 @@
this.txtScript = new System.Windows.Forms.RichTextBox();
this.tabVariables = new System.Windows.Forms.TabPage();
this.Help = new System.Windows.Forms.ToolTip(this.components);
this.label1 = new System.Windows.Forms.Label();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.label2 = new System.Windows.Forms.Label();
this.btnTest = new System.Windows.Forms.Button();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
@ -99,6 +100,40 @@
this.splitContainer1.SplitterDistance = 154;
this.splitContainer1.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Black;
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(267, 131);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(227, 13);
this.label2.TabIndex = 3;
this.label2.Text = "to leave feedback and help build a community!";
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.BackColor = System.Drawing.Color.Black;
this.linkLabel1.Location = new System.Drawing.Point(160, 131);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(110, 13);
this.linkLabel1.TabIndex = 2;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "Mud Designer Forums";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Black;
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(7, 131);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(157, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Developers please visit the new";
//
// btnLogo
//
this.btnLogo.BackColor = System.Drawing.Color.Black;
@ -145,6 +180,7 @@
this.flowLayoutPanel1.Controls.Add(this.btnCurrencyEditor);
this.flowLayoutPanel1.Controls.Add(this.btnRealmExplorer);
this.flowLayoutPanel1.Controls.Add(this.btnZoneBuilder);
this.flowLayoutPanel1.Controls.Add(this.btnTest);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
@ -413,39 +449,20 @@
this.Help.ReshowDelay = 100;
this.Help.ToolTipTitle = "Toolkit Help";
//
// label1
// btnTest
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Black;
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(7, 131);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(157, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Developers please visit the new";
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.BackColor = System.Drawing.Color.Black;
this.linkLabel1.Location = new System.Drawing.Point(160, 131);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(110, 13);
this.linkLabel1.TabIndex = 2;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "Mud Designer Forums";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Black;
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(267, 131);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(227, 13);
this.label2.TabIndex = 3;
this.label2.Text = "to leave feedback and help build a community!";
this.btnTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnTest.Location = new System.Drawing.Point(3, 64);
this.btnTest.Name = "btnTest";
this.btnTest.Size = new System.Drawing.Size(147, 55);
this.btnTest.TabIndex = 5;
this.btnTest.Text = "New All-In-One Test Designer";
this.Help.SetToolTip(this.btnTest, "The Zone Builder provides tools to create and manage your MUDs\r\nZones & Rooms. Cr" +
"eate Rooms, link them together via Doors and\r\nconnect Zones together either with" +
"in the same Realm or cross-realms.");
this.btnTest.UseVisualStyleBackColor = true;
this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
//
// ToolkitLauncher
//
@ -514,6 +531,7 @@
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Button btnTest;
}
}

View file

@ -85,6 +85,12 @@
<Compile Include="Editors\ScriptEditor.Designer.cs">
<DependentUpon>ScriptEditor.cs</DependentUpon>
</Compile>
<Compile Include="Designer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Designer.Designer.cs">
<DependentUpon>Designer.cs</DependentUpon>
</Compile>
<Compile Include="MudEngine\FileSystem\SaveDataTypes.cs" />
<Compile Include="MudEngine\GameManagement\GameScript.cs" />
<Compile Include="MudEngine\GameObjects\Bag.cs" />
@ -134,6 +140,12 @@
</Compile>
<Compile Include="MudEngine\FileSystem\FileManager.cs" />
<Compile Include="MudEngine\GameManagement\QuestSetup.cs" />
<Compile Include="MudEngine\UITypeEditors\UIScriptControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="MudEngine\UITypeEditors\UIScriptControl.Designer.cs">
<DependentUpon>UIScriptControl.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Editors\CurrencyEditor.resx">
@ -168,6 +180,14 @@
<DependentUpon>ProjectSettings.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Designer.resx">
<DependentUpon>Designer.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="MudEngine\UITypeEditors\UIScriptControl.resx">
<DependentUpon>UIScriptControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

View file

@ -0,0 +1,58 @@
namespace MudDesigner.MudEngine.UITypeEditors
{
partial class UIScriptControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.SuspendLayout();
//
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(599, 518);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
//
// UIScriptControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.richTextBox1);
this.Name = "UIScriptControl";
this.Size = new System.Drawing.Size(599, 518);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.RichTextBox richTextBox1;
}
}

View file

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MudDesigner.MudEngine.GameObjects;
namespace MudDesigner.MudEngine.UITypeEditors
{
public partial class UIScriptControl : UserControl
{
internal string Script
{
get
{
return richTextBox1.Text;
}
}
public UIScriptControl(BaseObject obj)
{
InitializeComponent();
richTextBox1.Text = obj.Script;
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -33,17 +33,31 @@ namespace MudDesigner.MudEngine.UITypeEditors
return null;
}
MudDesigner.Editors.ScriptEditor frm = new MudDesigner.Editors.ScriptEditor(baseObj);
frm.Show();
string script = "";
while (frm.Created)
if (Program.CurrentEditor is Designer)
{
script = frm.Script;
System.Windows.Forms.Application.DoEvents();
UIScriptControl control = new UIScriptControl(baseObj);
control.Dock = DockStyle.Fill;
Designer frm = (Designer)Program.CurrentEditor;
frm.ControlContainer.Panel1.Controls.Clear();
frm.ControlContainer.Panel1.Controls.Add(control);
string script = "";
while (control.Created)
{
if (!frm.ControlContainer.Panel1.Controls.Contains(control))
break;
Application.DoEvents();
script = control.Script;
}
control = null;
frm = null;
return script;
}
return script;
return null;
}
public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)