Added plugins for StoryWriter and the associated WinForms UI (not ported yet)
This commit is contained in:
parent
214ed306a6
commit
b54e23c510
@ -0,0 +1,95 @@
|
||||
namespace UniversalEditor.Editors
|
||||
{
|
||||
partial class StoryEditor
|
||||
{
|
||||
/// <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.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.tv = new System.Windows.Forms.TreeView();
|
||||
this.lv = new System.Windows.Forms.ListView();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.tv);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.lv);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(616, 306);
|
||||
this.splitContainer1.SplitterDistance = 205;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// tv
|
||||
//
|
||||
this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tv.Location = new System.Drawing.Point(0, 0);
|
||||
this.tv.Name = "tv";
|
||||
this.tv.Size = new System.Drawing.Size(205, 306);
|
||||
this.tv.TabIndex = 0;
|
||||
this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect);
|
||||
//
|
||||
// lv
|
||||
//
|
||||
this.lv.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lv.Location = new System.Drawing.Point(0, 0);
|
||||
this.lv.Name = "lv";
|
||||
this.lv.Size = new System.Drawing.Size(407, 306);
|
||||
this.lv.TabIndex = 0;
|
||||
this.lv.UseCompatibleStateImageBehavior = false;
|
||||
//
|
||||
// StoryEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "StoryEditor";
|
||||
this.Size = new System.Drawing.Size(616, 306);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.TreeView tv;
|
||||
private System.Windows.Forms.ListView lv;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using UniversalEditor.ObjectModels.StoryWriter.Story;
|
||||
using UniversalEditor.UserInterface.WindowsForms;
|
||||
|
||||
namespace UniversalEditor.Editors
|
||||
{
|
||||
public partial class StoryEditor : Editor
|
||||
{
|
||||
public StoryEditor()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnObjectModelChanged(EventArgs e)
|
||||
{
|
||||
StoryObjectModel story = (base.ObjectModel as StoryObjectModel);
|
||||
|
||||
base.OnObjectModelChanged(e);
|
||||
|
||||
tv.Nodes.Clear();
|
||||
|
||||
TreeNode tnUniverse = tv.Nodes.Add("tnUniverse", "Universe", "generic-folder-closed");
|
||||
|
||||
TreeNode tnCharacters = tnUniverse.Nodes.Add("tnCharacters", "Characters", "generic-folder-closed");
|
||||
foreach (Character chara in story.Characters)
|
||||
{
|
||||
TreeNode tn = new TreeNode();
|
||||
tn.Text = chara.Name;
|
||||
tn.ImageKey = "character";
|
||||
tnCharacters.Nodes.Add(tn);
|
||||
}
|
||||
|
||||
tnUniverse.Nodes.Add("tnDevices", "Devices", "generic-folder-closed");
|
||||
tnUniverse.Nodes.Add("tnLocations", "Locations", "generic-folder-closed");
|
||||
tnUniverse.Nodes.Add("tnOrganizations", "Organizations", "generic-folder-closed");
|
||||
tnUniverse.Nodes.Add("tnVehicles", "Vehicles", "generic-folder-closed");
|
||||
|
||||
tv.Nodes.Add("tnBooks", "Books", "generic-folder-closed");
|
||||
|
||||
tv.ExpandAll();
|
||||
}
|
||||
|
||||
private void tv_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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>
|
||||
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("UniversalEditor.Plugins.StoryWriter.UserInterface.WinForms")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("UniversalEditor.Plugins.StoryWriter.UserInterface.WinForms")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("bfff9c74-41b4-4698-ab71-8c0f7c200a21")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{F635B40D-4BC1-48CB-9FFD-38076D569640}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>UniversalEditor</RootNamespace>
|
||||
<AssemblyName>UniversalEditor.Plugins.StoryWriter.UserInterface.WindowsForms</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\..\Output\Debug\Plugins\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\..\Output\Debug\Plugins\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Editors\StoryEditor.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Editors\StoryEditor.Designer.cs">
|
||||
<DependentUpon>StoryEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Libraries\UniversalEditor.Core\UniversalEditor.Core.csproj">
|
||||
<Project>{2d4737e6-6d95-408a-90db-8dff38147e85}</Project>
|
||||
<Name>UniversalEditor.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Libraries\UniversalEditor.UserInterface\UniversalEditor.UserInterface.csproj">
|
||||
<Project>{8622ebc4-8e20-476e-b284-33d472081f5c}</Project>
|
||||
<Name>UniversalEditor.UserInterface</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Plugins\UniversalEditor.Essential\UniversalEditor.Essential.csproj">
|
||||
<Project>{30467e5c-05bc-4856-aadc-13906ef4cadd}</Project>
|
||||
<Name>UniversalEditor.Essential</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Plugins\UniversalEditor.Plugins.StoryWriter\UniversalEditor.Plugins.StoryWriter.csproj">
|
||||
<Project>{7c861d40-8214-4dc5-89d1-129f267c1d1b}</Project>
|
||||
<Name>UniversalEditor.Plugins.StoryWriter</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Libraries\UniversalEditor.UserInterface.WindowsForms\UniversalEditor.UserInterface.WindowsForms.csproj">
|
||||
<Project>{bcbb72bd-0ecb-4ff2-8d91-e466361fb6f9}</Project>
|
||||
<Name>UniversalEditor.UserInterface.WindowsForms</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Editors\StoryEditor.resx">
|
||||
<DependentUpon>StoryEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using UniversalEditor.DataFormats.Markup.XML;
|
||||
|
||||
namespace UniversalEditor.DataFormats.StoryWriter.Story.StoryXML
|
||||
{
|
||||
public class StoryXMLDataFormat : XMLDataFormat
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace UniversalEditor.ObjectModels.StoryWriter.Story
|
||||
{
|
||||
public class Book
|
||||
{
|
||||
public class BookCollection
|
||||
: System.Collections.ObjectModel.Collection<Book>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private Chapter.ChapterCollection mvarChapters = new Chapter.ChapterCollection();
|
||||
public Chapter.ChapterCollection Chapters { get { return mvarChapters; } }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace UniversalEditor.ObjectModels.StoryWriter.Story
|
||||
{
|
||||
public class Chapter
|
||||
{
|
||||
|
||||
public class ChapterCollection
|
||||
: System.Collections.ObjectModel.Collection<Chapter>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace UniversalEditor.ObjectModels.StoryWriter.Story
|
||||
{
|
||||
public class Character
|
||||
{
|
||||
public class CharacterCollection
|
||||
: System.Collections.ObjectModel.Collection<Character>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private string mvarGivenName = String.Empty;
|
||||
public string GivenName { get { return mvarGivenName; } set { mvarGivenName = value; } }
|
||||
|
||||
private string mvarMiddleName = String.Empty;
|
||||
public string MiddleName { get { return mvarMiddleName; } set { mvarMiddleName = value; } }
|
||||
|
||||
private string mvarFamilyName = String.Empty;
|
||||
public string FamilyName { get { return mvarFamilyName; } set { mvarFamilyName = value; } }
|
||||
|
||||
private Gender mvarGender = null;
|
||||
public Gender Gender { get { return mvarGender; } set { mvarGender = value; } }
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(mvarGivenName);
|
||||
if (!String.IsNullOrEmpty(mvarMiddleName))
|
||||
{
|
||||
sb.Append(" ");
|
||||
sb.Append(mvarMiddleName);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(mvarFamilyName))
|
||||
{
|
||||
sb.Append(" ");
|
||||
sb.Append(mvarFamilyName);
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
mvarGivenName = String.Empty;
|
||||
mvarMiddleName = String.Empty;
|
||||
mvarFamilyName = String.Empty;
|
||||
|
||||
string[] values = value.Split(new char[] { ' ' }, 3);
|
||||
if (values.Length > 0)
|
||||
{
|
||||
mvarGivenName = values[0];
|
||||
if (values.Length > 1)
|
||||
{
|
||||
if (values.Length > 2)
|
||||
{
|
||||
mvarMiddleName = values[1];
|
||||
mvarFamilyName = values[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
mvarFamilyName = values[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace UniversalEditor.ObjectModels.StoryWriter.Story
|
||||
{
|
||||
public class Gender
|
||||
{
|
||||
public class GenderCollection
|
||||
: System.Collections.ObjectModel.Collection<Gender>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static Gender mvarMasculine = new Gender(new Guid("{0CA5B741-4DFE-4A10-A51D-A29A4503DF62}"), "Masculine", "he", "they", "his", "their", "him", "them");
|
||||
public static Gender Masculine { get { return mvarMasculine; } }
|
||||
|
||||
private static Gender mvarFeminine = new Gender(new Guid("{231A45E1-5DCC-4C6C-892C-AE6F69CAAE36}"), "Feminine", "she", "they", "hers", "their", "her", "them");
|
||||
public static Gender Feminine { get { return mvarFeminine; } }
|
||||
|
||||
private static Gender mvarNeutral = new Gender(new Guid("{6E90BE20-B142-4902-B560-5B3A77546B17}"), "Neutral", "it", "them", "its", "theirs", "it", "them");
|
||||
public static Gender Neutral { get { return mvarNeutral; } }
|
||||
|
||||
public Gender()
|
||||
{
|
||||
|
||||
}
|
||||
public Gender(Guid id, string name)
|
||||
{
|
||||
mvarID = id;
|
||||
mvarName = name;
|
||||
}
|
||||
public Gender(Guid id, string name, string singularSubject, string pluralSubject, string singularPossessive, string pluralPossessive, string singularObject, string pluralObject)
|
||||
{
|
||||
mvarID = id;
|
||||
mvarName = name;
|
||||
mvarSingularSubject = singularSubject;
|
||||
mvarSingularPossessive = singularPossessive;
|
||||
mvarSingularObject = singularObject;
|
||||
mvarPluralSubject = pluralSubject;
|
||||
mvarPluralPossessive = pluralPossessive;
|
||||
mvarPluralObject = pluralObject;
|
||||
}
|
||||
|
||||
private Guid mvarID = Guid.Empty;
|
||||
public Guid ID { get { return mvarID; } set { mvarID = value; } }
|
||||
|
||||
private string mvarName = String.Empty;
|
||||
public string Name { get { return mvarName; } set { mvarName = value; } }
|
||||
|
||||
private string mvarSingularSubject = String.Empty;
|
||||
/// <summary>
|
||||
/// He, she, it.
|
||||
/// </summary>
|
||||
public string SingularSubject { get { return mvarSingularSubject; } set { mvarSingularSubject = value; } }
|
||||
|
||||
private string mvarPluralSubject = String.Empty;
|
||||
/// <summary>
|
||||
/// they
|
||||
/// </summary>
|
||||
public string PluralSubject { get { return mvarPluralSubject; } set { mvarPluralSubject = value; } }
|
||||
|
||||
private string mvarSingularPossessive = String.Empty;
|
||||
/// <summary>
|
||||
/// His, hers, its.
|
||||
/// </summary>
|
||||
public string SingularPossessive { get { return mvarSingularPossessive; } set { mvarSingularPossessive = value; } }
|
||||
|
||||
private string mvarPluralPossessive = String.Empty;
|
||||
/// <summary>
|
||||
/// Theirs
|
||||
/// </summary>
|
||||
public string PluralPossessive { get { return mvarPluralPossessive; } set { mvarPluralPossessive = value; } }
|
||||
|
||||
private string mvarSingularObject = String.Empty;
|
||||
/// <summary>
|
||||
/// Him, her, it.
|
||||
/// </summary>
|
||||
public string SingularObject { get { return mvarSingularObject; } set { mvarSingularObject = value; } }
|
||||
|
||||
private string mvarPluralObject = String.Empty;
|
||||
/// <summary>
|
||||
/// Them
|
||||
/// </summary>
|
||||
public string PluralObject { get { return mvarPluralObject; } set { mvarPluralObject = value; } }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace UniversalEditor.ObjectModels.StoryWriter.Story
|
||||
{
|
||||
public class StoryObjectModel
|
||||
{
|
||||
private Character.CharacterCollection mvarCharacters = new Character.CharacterCollection();
|
||||
/// <summary>
|
||||
/// All the characters available to draw from within this story.
|
||||
/// </summary>
|
||||
public Character.CharacterCollection Characters { get { return mvarCharacters; } }
|
||||
|
||||
private Book.BookCollection mvarBooks = new Book.BookCollection();
|
||||
/// <summary>
|
||||
/// The books collected in this story.
|
||||
/// </summary>
|
||||
public Book.BookCollection Books { get { return mvarBooks; } }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("UniversalEditor.Plugins.StoryWriter")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("UniversalEditor.Plugins.StoryWriter")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("6a679edc-b271-4b5c-a763-2c2fa6d7489a")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{7C861D40-8214-4DC5-89D1-129F267C1D1B}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>UniversalEditor</RootNamespace>
|
||||
<AssemblyName>UniversalEditor.Plugins.StoryWriter</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Output\Debug\Plugins\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\Output\Release\Plugins\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DataFormats\StoryWriter\Story\StoryXML\StoryXMLDataFormat.cs" />
|
||||
<Compile Include="ObjectModels\StoryWriter\Story\Book.cs" />
|
||||
<Compile Include="ObjectModels\StoryWriter\Story\Chapter.cs" />
|
||||
<Compile Include="ObjectModels\StoryWriter\Story\Character.cs" />
|
||||
<Compile Include="ObjectModels\StoryWriter\Story\Gender.cs" />
|
||||
<Compile Include="ObjectModels\StoryWriter\Story\StoryObjectModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Libraries\UniversalEditor.Core\UniversalEditor.Core.csproj">
|
||||
<Project>{2d4737e6-6d95-408a-90db-8dff38147e85}</Project>
|
||||
<Name>UniversalEditor.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\UniversalEditor.Essential\UniversalEditor.Essential.csproj">
|
||||
<Project>{30467e5c-05bc-4856-aadc-13906ef4cadd}</Project>
|
||||
<Name>UniversalEditor.Essential</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@ -125,6 +125,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.Sof
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.SoftwareDevelopment.UserInterface.WindowsForms", "Engines\WindowsForms\Plugins\UniversalEditor.Plugins.SoftwareDevelopment.UserInterface.WindowsForms\UniversalEditor.Plugins.SoftwareDevelopment.UserInterface.WindowsForms.csproj", "{094E86E4-903B-493C-91EF-4597658748A9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.StoryWriter", "Plugins\UniversalEditor.Plugins.StoryWriter\UniversalEditor.Plugins.StoryWriter.csproj", "{7C861D40-8214-4DC5-89D1-129F267C1D1B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.StoryWriter.UserInterface.WindowsForms", "Engines\WindowsForms\Plugins\UniversalEditor.Plugins.StoryWriter.UserInterface.WindowsForms\UniversalEditor.Plugins.StoryWriter.UserInterface.WindowsForms.csproj", "{F635B40D-4BC1-48CB-9FFD-38076D569640}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -335,6 +339,14 @@ Global
|
||||
{094E86E4-903B-493C-91EF-4597658748A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{094E86E4-903B-493C-91EF-4597658748A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{094E86E4-903B-493C-91EF-4597658748A9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7C861D40-8214-4DC5-89D1-129F267C1D1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7C861D40-8214-4DC5-89D1-129F267C1D1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7C861D40-8214-4DC5-89D1-129F267C1D1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7C861D40-8214-4DC5-89D1-129F267C1D1B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F635B40D-4BC1-48CB-9FFD-38076D569640}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F635B40D-4BC1-48CB-9FFD-38076D569640}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F635B40D-4BC1-48CB-9FFD-38076D569640}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F635B40D-4BC1-48CB-9FFD-38076D569640}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -377,6 +389,7 @@ Global
|
||||
{B2DFA94A-A468-48A1-AB31-04EE432E7B2B} = {71CFF024-26F7-4626-A526-B435FDF8D64E}
|
||||
{A968C097-44CE-42BA-B66C-CB3A871EE117} = {71CFF024-26F7-4626-A526-B435FDF8D64E}
|
||||
{CC5C9010-83EF-491D-9262-2CED509D895D} = {71CFF024-26F7-4626-A526-B435FDF8D64E}
|
||||
{7C861D40-8214-4DC5-89D1-129F267C1D1B} = {71CFF024-26F7-4626-A526-B435FDF8D64E}
|
||||
{FE016EA3-DC31-4A92-8B0A-8C746EC117E1} = {46041F27-7C1C-4209-B72B-251EDB5D4C61}
|
||||
{ED627DF7-3E78-4428-AB31-810BA1586E62} = {46041F27-7C1C-4209-B72B-251EDB5D4C61}
|
||||
{C1F34183-7A2F-41A6-9958-F6F329099654} = {A846CA33-9CAA-4237-B14F-8721DBA89442}
|
||||
@ -394,6 +407,7 @@ Global
|
||||
{EE70D9BB-52FB-4BF5-A704-06F4881301CF} = {D3CE7A47-3989-4B6D-9867-0EA3C8DD7AB1}
|
||||
{F19919B7-1D51-4972-8E4A-E59D68D4926A} = {D3CE7A47-3989-4B6D-9867-0EA3C8DD7AB1}
|
||||
{094E86E4-903B-493C-91EF-4597658748A9} = {D3CE7A47-3989-4B6D-9867-0EA3C8DD7AB1}
|
||||
{F635B40D-4BC1-48CB-9FFD-38076D569640} = {D3CE7A47-3989-4B6D-9867-0EA3C8DD7AB1}
|
||||
{118E40C4-323E-4B4B-8EF4-38EED6CC5E83} = {54990D5E-CE09-459F-916E-AF13101765B4}
|
||||
{A5A14A71-5DB3-4495-92F6-8D27C98FF0F4} = {BC6859FB-B61C-471D-9F84-613E5C388C52}
|
||||
EndGlobalSection
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user