mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-21 03:11:40 +00:00
Added "Place Things" action (available in Sectors/Linedefs/Vertices menus). When used from Linedefs or Vertices mode, it will place things on top of vertices. When used from Sectors mode, it will place things inside of selected sectors.
Updated documentation.
This commit is contained in:
parent
fc57c3e331
commit
117e5e5911
10 changed files with 337 additions and 125 deletions
|
@ -905,6 +905,12 @@
|
|||
<td><div align="center"></div></td>
|
||||
<td>Allows you to choose options or pasting and then pastes the current contents of the clipboard into the map as a new selection.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="placethings" id="placethings"></a>Place Things</td>
|
||||
<td><div align="center"></div></td>
|
||||
<td><div align="center"></div></td>
|
||||
<td>Creates things of given type and places them inside of selected sectors or on top of selected vertices.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Redo</td>
|
||||
<td><div align="center">Ctrl+Y</div></td>
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
<li><a href="classic_modes/mode_drawcurve.html"><span class="style1"><strong>[new]</strong></span> Draw Curve mode</a>.</li>
|
||||
<li><a href="classic_modes/mode_drawbridge.html">Bridge mode</a>.</li>
|
||||
<li><a href="classic_modes/mode_snapelements.html">Snap map elements mode</a>.</li>
|
||||
<li><span class="style5">[new]</span> You can place things on top of selected vertices in Vertices and Linedefs modes and inside of selected sectors in Sectors mode useing "<a href="../actions.html#placethings">Place Things</a>" action.</li>
|
||||
<li><span class="style5">[new]</span> You can set, which textures to use when drawing new geometry using "<strong><a href="../actions.html#setdefaulttextures">Set Default Textures</a></strong>" action, available in <strong>Edit</strong> menu (by default, the editor uses textures from closest sector when drawing a new one).
|
||||
<input class="spoilerbutton" type="button" onclick="ToggleSpoiler(this);" href="javascript:void(0);" value="Show image"/>
|
||||
<div style="display: none; margin: 0px; padding: 6px; border: 1px inset;"> <img src="classic_modes/setdefaulttextures.jpg" alt="" /></div>
|
||||
|
|
|
@ -24,6 +24,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -166,9 +167,62 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
protected virtual void updateSelectionInfo() {
|
||||
General.Interface.DisplayStatus(StatusType.Selection, string.Empty);
|
||||
}
|
||||
|
||||
//mxd
|
||||
protected void placeThingsAtPositions(List<Vector2D> positions) {
|
||||
if (positions.Count < 1) {
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "This action requires selection of some description!");
|
||||
return;
|
||||
}
|
||||
|
||||
General.Map.UndoRedo.CreateUndo("Place " + (positions.Count > 1 ? "things" : "thing"));
|
||||
List<Thing> things = new List<Thing>();
|
||||
|
||||
// Create things
|
||||
foreach (Vector2D pos in positions) {
|
||||
Thing t = General.Map.Map.CreateThing();
|
||||
if(t != null) {
|
||||
General.Settings.ApplyDefaultThingSettings(t);
|
||||
t.Move(pos);
|
||||
t.UpdateConfiguration();
|
||||
t.Selected = true;
|
||||
t.SnapToAccuracy(); // Snap to map format accuracy
|
||||
things.Add(t);
|
||||
}
|
||||
}
|
||||
|
||||
//Operation failed?..
|
||||
if (things.Count < 1) {
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "This action requires selection of some description!");
|
||||
General.Map.UndoRedo.WithdrawUndo();
|
||||
return;
|
||||
}
|
||||
|
||||
//Show realtime thing edit dialog
|
||||
General.Interface.OnEditFormValuesChanged += thingEditForm_OnValuesChanged;
|
||||
if (General.Interface.ShowEditThings(things) == DialogResult.Cancel) {
|
||||
General.Map.UndoRedo.WithdrawUndo();
|
||||
} else {
|
||||
General.Interface.DisplayStatus(StatusType.Info, "Placed " + things.Count + " things.");
|
||||
}
|
||||
General.Interface.OnEditFormValuesChanged -= thingEditForm_OnValuesChanged;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Events (mxd)
|
||||
|
||||
//mxd
|
||||
private void thingEditForm_OnValuesChanged(object sender, EventArgs e) {
|
||||
// Update things filter
|
||||
General.Map.ThingsFilter.Update();
|
||||
|
||||
// Update entire display
|
||||
General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Actions
|
||||
|
||||
[BeginAction("placevisualstart")]
|
||||
|
|
|
@ -1220,6 +1220,35 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
[BeginAction("placethings")] //mxd
|
||||
public void PlaceThings() {
|
||||
// Make list of selected linedefs
|
||||
ICollection<Linedef> lines = General.Map.Map.GetSelectedLinedefs(true);
|
||||
List<Vector2D> positions = new List<Vector2D>();
|
||||
|
||||
if(lines.Count == 0) {
|
||||
if (highlighted != null && !highlighted.IsDisposed) {
|
||||
lines.Add(highlighted);
|
||||
} else {
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "This action requires selection of some description!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Make list of vertex positions
|
||||
foreach(Linedef l in lines) {
|
||||
if(!positions.Contains(l.Start.Position)) positions.Add(l.Start.Position);
|
||||
if(!positions.Contains(l.End.Position)) positions.Add(l.End.Position);
|
||||
}
|
||||
|
||||
if(positions.Count < 1) {
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "Unable to get vertex positions from selection!");
|
||||
return;
|
||||
}
|
||||
|
||||
placeThingsAtPositions(positions);
|
||||
}
|
||||
|
||||
//mxd
|
||||
[BeginAction("alignfloortofront")]
|
||||
public void AlignFloorToFront() {
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
|
@ -217,14 +216,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This highlights a new item
|
||||
protected void Highlight(Sector s)
|
||||
{
|
||||
bool completeredraw = false;
|
||||
|
||||
// Often we can get away by simply undrawing the previous
|
||||
// highlight and drawing the new highlight. But if associations
|
||||
// are or were drawn we need to redraw the entire display.
|
||||
|
||||
// Previous association highlights something?
|
||||
if((highlighted != null) && (highlighted.Tag > 0)) completeredraw = true;
|
||||
bool completeredraw = (highlighted != null) && (highlighted.Tag > 0);
|
||||
|
||||
// Set highlight association
|
||||
if(s != null)
|
||||
|
@ -1714,6 +1711,36 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Redraw
|
||||
General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
[BeginAction("placethings")] //mxd
|
||||
public void PlaceThings() {
|
||||
// Make list of selected sectors
|
||||
ICollection<Sector> sectors = General.Map.Map.GetSelectedSectors(true);
|
||||
List<Vector2D> positions = new List<Vector2D>();
|
||||
|
||||
if(sectors.Count == 0) {
|
||||
if(highlighted != null && !highlighted.IsDisposed) {
|
||||
sectors.Add(highlighted);
|
||||
} else {
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "This action requires selection of some description!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Make list of suitable positions
|
||||
foreach(Sector s in sectors) {
|
||||
List<LabelPositionInfo> list = Tools.FindLabelPositions(s);
|
||||
if(list.Count > 0 && !positions.Contains(list[0].position))
|
||||
positions.Add(list[0].position);
|
||||
}
|
||||
|
||||
if(positions.Count < 1) {
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "Unable to get vertex positions from selection!");
|
||||
return;
|
||||
}
|
||||
|
||||
placeThingsAtPositions(positions);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -885,6 +885,29 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
[BeginAction("placethings")] //mxd
|
||||
public void PlaceThings() {
|
||||
// Make list of selected vertices
|
||||
ICollection<Vertex> selected = General.Map.Map.GetSelectedVertices(true);
|
||||
if (selected.Count == 0) {
|
||||
if (highlighted != null && !highlighted.IsDisposed){
|
||||
selected.Add(highlighted);
|
||||
} else {
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "This action requires selection of some description!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
List<Vector2D> positions = new List<Vector2D>(selected.Count);
|
||||
foreach (Vertex v in selected)
|
||||
if (!positions.Contains(v.Position)) positions.Add(v.Position);
|
||||
placeThingsAtPositions(positions);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Action assist (mxd)
|
||||
|
||||
//mxd
|
||||
private void mergeLines(ICollection<Vertex> selected, Linedef ld1, Linedef ld2, Vertex v) {
|
||||
Vertex v1 = (ld1.Start == v) ? ld1.End : ld1.Start;
|
||||
|
|
|
@ -30,6 +30,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
this.menustrip = new System.Windows.Forms.MenuStrip();
|
||||
this.linedefsmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.placethingsl = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.selectsinglesideditem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectdoublesideditem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
|
@ -45,6 +47,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.alignCeilingToFrontItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.alignCeilingToBackItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.sectorsmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.placethingss = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.joinsectorsitem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mergesectorsitem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
|
@ -52,6 +56,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectInSectorsItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.vertsmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.placethingsv = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.globalstrip = new System.Windows.Forms.ToolStrip();
|
||||
this.manualstrip = new System.Windows.Forms.ToolStrip();
|
||||
this.buttoncopyproperties = new System.Windows.Forms.ToolStripButton();
|
||||
|
@ -78,7 +84,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.menustrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.linedefsmenu,
|
||||
this.sectorsmenu,
|
||||
this.thingsmenu});
|
||||
this.thingsmenu,
|
||||
this.vertsmenu});
|
||||
this.menustrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.menustrip.Name = "menustrip";
|
||||
this.menustrip.Size = new System.Drawing.Size(423, 24);
|
||||
|
@ -88,6 +95,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// linedefsmenu
|
||||
//
|
||||
this.linedefsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.placethingsl,
|
||||
this.toolStripSeparator2,
|
||||
this.selectsinglesideditem,
|
||||
this.selectdoublesideditem,
|
||||
this.toolStripMenuItem4,
|
||||
|
@ -104,6 +113,19 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.linedefsmenu.Visible = false;
|
||||
this.linedefsmenu.DropDownOpening += new System.EventHandler(this.linedefsmenu_DropDownOpening);
|
||||
//
|
||||
// placethingsl
|
||||
//
|
||||
this.placethingsl.Name = "placethingsl";
|
||||
this.placethingsl.Size = new System.Drawing.Size(205, 22);
|
||||
this.placethingsl.Tag = "placethings";
|
||||
this.placethingsl.Text = "&Place Things...";
|
||||
this.placethingsl.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(202, 6);
|
||||
//
|
||||
// selectsinglesideditem
|
||||
//
|
||||
this.selectsinglesideditem.Name = "selectsinglesideditem";
|
||||
|
@ -213,6 +235,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// sectorsmenu
|
||||
//
|
||||
this.sectorsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.placethingss,
|
||||
this.toolStripSeparator1,
|
||||
this.joinsectorsitem,
|
||||
this.mergesectorsitem,
|
||||
this.toolStripMenuItem2});
|
||||
|
@ -221,10 +245,23 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.sectorsmenu.Text = "&Sectors";
|
||||
this.sectorsmenu.Visible = false;
|
||||
//
|
||||
// placethingss
|
||||
//
|
||||
this.placethingss.Name = "placethingss";
|
||||
this.placethingss.Size = new System.Drawing.Size(150, 22);
|
||||
this.placethingss.Tag = "placethings";
|
||||
this.placethingss.Text = "&Place Things...";
|
||||
this.placethingss.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(147, 6);
|
||||
//
|
||||
// joinsectorsitem
|
||||
//
|
||||
this.joinsectorsitem.Name = "joinsectorsitem";
|
||||
this.joinsectorsitem.Size = new System.Drawing.Size(149, 22);
|
||||
this.joinsectorsitem.Size = new System.Drawing.Size(150, 22);
|
||||
this.joinsectorsitem.Tag = "joinsectors";
|
||||
this.joinsectorsitem.Text = "&Join Sectors";
|
||||
this.joinsectorsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -232,7 +269,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// mergesectorsitem
|
||||
//
|
||||
this.mergesectorsitem.Name = "mergesectorsitem";
|
||||
this.mergesectorsitem.Size = new System.Drawing.Size(149, 22);
|
||||
this.mergesectorsitem.Size = new System.Drawing.Size(150, 22);
|
||||
this.mergesectorsitem.Tag = "mergesectors";
|
||||
this.mergesectorsitem.Text = "&Merge Sectors";
|
||||
this.mergesectorsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -240,7 +277,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(146, 6);
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(147, 6);
|
||||
this.toolStripMenuItem2.Visible = false;
|
||||
//
|
||||
// thingsmenu
|
||||
|
@ -280,6 +317,23 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.selectInSectorsItem.Text = "&Select Things in Selected Sectors";
|
||||
this.selectInSectorsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// vertsmenu
|
||||
//
|
||||
this.vertsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.placethingsv});
|
||||
this.vertsmenu.Name = "vertsmenu";
|
||||
this.vertsmenu.Size = new System.Drawing.Size(60, 20);
|
||||
this.vertsmenu.Text = "Vertices";
|
||||
this.vertsmenu.Visible = false;
|
||||
//
|
||||
// placethingsv
|
||||
//
|
||||
this.placethingsv.Name = "placethingsv";
|
||||
this.placethingsv.Size = new System.Drawing.Size(150, 22);
|
||||
this.placethingsv.Tag = "placethings";
|
||||
this.placethingsv.Text = "&Place Things...";
|
||||
this.placethingsv.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// globalstrip
|
||||
//
|
||||
this.globalstrip.Location = new System.Drawing.Point(0, 24);
|
||||
|
@ -537,5 +591,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private System.Windows.Forms.ToolStripMenuItem alignFloorToBackItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem alignCeilingToFrontItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem alignCeilingToBackItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem vertsmenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem placethingsv;
|
||||
private System.Windows.Forms.ToolStripMenuItem placethingsl;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem placethingss;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
}
|
||||
}
|
|
@ -149,6 +149,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(sourcemode == typeof(LinedefsMode)) HideAllMenusExcept(linedefsmenu);
|
||||
else if(sourcemode == typeof(SectorsMode)) HideAllMenusExcept(sectorsmenu);
|
||||
else if(sourcemode == typeof(ThingsMode)) HideAllMenusExcept(thingsmenu); //mxd
|
||||
else if(sourcemode == typeof(VerticesMode)) HideAllMenusExcept(vertsmenu); //mxd
|
||||
else HideAllMenus();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,141 +1,141 @@
|
|||
<?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.
|
||||
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.
|
||||
-->
|
||||
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: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>
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
<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>
|
||||
<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>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menustrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="menustrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="globalstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="globalstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>118, 17</value>
|
||||
<value>118, 17</value>
|
||||
</metadata>
|
||||
<metadata name="manualstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="manualstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>210, 17</value>
|
||||
<value>210, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -139,7 +139,7 @@ increasesubdivlevel
|
|||
//mxd
|
||||
decreasesubdivlevel
|
||||
{
|
||||
title = "Decrease Sudivision Level";
|
||||
title = "Decrease Sudivision Level";
|
||||
category = "drawing";
|
||||
description = "Decreases subdivision level in Rectangle and Ellipse Drawing Modes.";
|
||||
allowkeys = true;
|
||||
|
@ -151,7 +151,7 @@ decreasesubdivlevel
|
|||
//mxd
|
||||
increasebevel
|
||||
{
|
||||
title = "Increase Corners Bevel";
|
||||
title = "Increase Corners Bevel";
|
||||
category = "drawing";
|
||||
description = "Increase corners bevel in Rectangle Drawing Modes. Bevel can be negative.";
|
||||
allowkeys = true;
|
||||
|
@ -163,7 +163,7 @@ increasebevel
|
|||
//mxd
|
||||
decreasebevel
|
||||
{
|
||||
title = "Decrease Corners Bevel";
|
||||
title = "Decrease Corners Bevel";
|
||||
category = "drawing";
|
||||
description = "Decreases corners bevel in Rectangle Drawing Modes. Bevel can be negative.";
|
||||
allowkeys = true;
|
||||
|
@ -175,7 +175,7 @@ decreasebevel
|
|||
//mxd
|
||||
bridgemode
|
||||
{
|
||||
title = "Bridge Mode";
|
||||
title = "Bridge Mode";
|
||||
category = "drawing";
|
||||
description = "Select two lines or two series of lines, then activate this tool to draw a bezier path between them.";
|
||||
allowkeys = true;
|
||||
|
@ -187,7 +187,7 @@ bridgemode
|
|||
//mxd
|
||||
snapvertstogrid
|
||||
{
|
||||
title = "Snap Selected Map Elements to Grid";
|
||||
title = "Snap Selected Map Elements to Grid";
|
||||
category = "edit";
|
||||
description = "Snaps selected map elements to grid.";
|
||||
allowkeys = true;
|
||||
|
@ -195,6 +195,17 @@ snapvertstogrid
|
|||
allowscroll = false;
|
||||
}
|
||||
|
||||
//mxd
|
||||
placethings
|
||||
{
|
||||
title = "Place Things";
|
||||
category = "edit";
|
||||
description = "Creates things of given type and places them inside of selected sectors or on top of selected vertices.";
|
||||
allowkeys = true;
|
||||
allowmouse = false;
|
||||
allowscroll = false;
|
||||
}
|
||||
|
||||
//mxd
|
||||
classicpaintselect
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue