working on characterlist
This commit is contained in:
@@ -97,29 +97,29 @@ namespace OwnChar.App.Desktop.LangRes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sucht eine lokalisierte Zeichenfolge, die Do you really want to delete the character {0}? ähnelt.
|
/// Sucht eine lokalisierte Zeichenfolge, die the character {0} ähnelt.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string MsgBox_ConfirmDeletion_Text {
|
internal static string MsgBox_ConfirmDelete_TextChar {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("MsgBox_ConfirmDeletion_Text", resourceCulture);
|
return ResourceManager.GetString("MsgBox_ConfirmDelete_TextChar", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sucht eine lokalisierte Zeichenfolge, die Delete Character ähnelt.
|
/// Sucht eine lokalisierte Zeichenfolge, die Character ähnelt.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string MsgBox_ConfirmDeletion_Title {
|
internal static string MsgBox_ConfirmDelete_TitleChar {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("MsgBox_ConfirmDeletion_Title", resourceCulture);
|
return ResourceManager.GetString("MsgBox_ConfirmDelete_TitleChar", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sucht eine lokalisierte Zeichenfolge, die Unnamed Character ähnelt.
|
/// Sucht eine lokalisierte Zeichenfolge, die Unnamed Character ähnelt.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string Tab_UnnamedChar {
|
internal static string UnnamedChar {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Tab_UnnamedChar", resourceCulture);
|
return ResourceManager.GetString("UnnamedChar", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,13 +129,13 @@
|
|||||||
<data name="Column_CharOwner" xml:space="preserve">
|
<data name="Column_CharOwner" xml:space="preserve">
|
||||||
<value>Owner</value>
|
<value>Owner</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgBox_ConfirmDeletion_Text" xml:space="preserve">
|
<data name="MsgBox_ConfirmDelete_TextChar" xml:space="preserve">
|
||||||
<value>Do you really want to delete the character {0}?</value>
|
<value>the character {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgBox_ConfirmDeletion_Title" xml:space="preserve">
|
<data name="MsgBox_ConfirmDelete_TitleChar" xml:space="preserve">
|
||||||
<value>Delete Character</value>
|
<value>Character</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Tab_UnnamedChar" xml:space="preserve">
|
<data name="UnnamedChar" xml:space="preserve">
|
||||||
<value>Unnamed Character</value>
|
<value>Unnamed Character</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
99
OwnChar.App.Desktop/LangRes/GeneralLangRes.Designer.cs
generated
Normal file
99
OwnChar.App.Desktop/LangRes/GeneralLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace OwnChar.App.Desktop.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||||
|
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class GeneralLangRes {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal GeneralLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OwnChar.App.Desktop.LangRes.GeneralLangRes", typeof(GeneralLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Zeichenfolge, die Do you really want to delete {0}? ähnelt.
|
||||||
|
/// </summary>
|
||||||
|
internal static string MsgBox_ConfirmDelete_TextGeneral {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MsgBox_ConfirmDelete_TextGeneral", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Zeichenfolge, die Delete {0} ähnelt.
|
||||||
|
/// </summary>
|
||||||
|
internal static string MsgBox_ConfirmDelete_TitleGeneral {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MsgBox_ConfirmDelete_TitleGeneral", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Zeichenfolge, die Error ähnelt.
|
||||||
|
/// </summary>
|
||||||
|
internal static string MsgBox_Error {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MsgBox_Error", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Zeichenfolge, die Please select the {0} you want to delete. ähnelt.
|
||||||
|
/// </summary>
|
||||||
|
internal static string MsgBox_NothingSelected {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MsgBox_NothingSelected", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
132
OwnChar.App.Desktop/LangRes/GeneralLangRes.resx
Normal file
132
OwnChar.App.Desktop/LangRes/GeneralLangRes.resx
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="MsgBox_ConfirmDelete_TextGeneral" xml:space="preserve">
|
||||||
|
<value>Do you really want to delete {0}?</value>
|
||||||
|
</data>
|
||||||
|
<data name="MsgBox_ConfirmDelete_TitleGeneral" xml:space="preserve">
|
||||||
|
<value>Delete {0}</value>
|
||||||
|
</data>
|
||||||
|
<data name="MsgBox_Error" xml:space="preserve">
|
||||||
|
<value>Error</value>
|
||||||
|
</data>
|
||||||
|
<data name="MsgBox_NothingSelected" xml:space="preserve">
|
||||||
|
<value>Please select the {0} you want to delete.</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -41,6 +41,11 @@
|
|||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>LoginPageLangRes.resx</DependentUpon>
|
<DependentUpon>LoginPageLangRes.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="LangRes\GeneralLangRes.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>GeneralLangRes.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Update="LangRes\SettingsPageLangRes.Designer.cs">
|
<Compile Update="LangRes\SettingsPageLangRes.Designer.cs">
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
@@ -57,6 +62,10 @@
|
|||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>LoginPageLangRes.Designer.cs</LastGenOutput>
|
<LastGenOutput>LoginPageLangRes.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\GeneralLangRes.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>GeneralLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Update="LangRes\SettingsPageLangRes.resx">
|
<EmbeddedResource Update="LangRes\SettingsPageLangRes.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>SettingsPageLangRes.Designer.cs</LastGenOutput>
|
<LastGenOutput>SettingsPageLangRes.Designer.cs</LastGenOutput>
|
||||||
|
|||||||
@@ -34,11 +34,11 @@
|
|||||||
radMenuItem_DeleteChar = new Telerik.WinControls.UI.RadMenuItem();
|
radMenuItem_DeleteChar = new Telerik.WinControls.UI.RadMenuItem();
|
||||||
radMenuItem_OpenChar = new Telerik.WinControls.UI.RadMenuItem();
|
radMenuItem_OpenChar = new Telerik.WinControls.UI.RadMenuItem();
|
||||||
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
radTextBoxControl1 = new Telerik.WinControls.UI.RadTextBoxControl();
|
radTextBoxControl_SearchBox = new Telerik.WinControls.UI.RadTextBoxControl();
|
||||||
((System.ComponentModel.ISupportInitialize)radListView_CharList).BeginInit();
|
((System.ComponentModel.ISupportInitialize)radListView_CharList).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)radMenu1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)radMenu1).BeginInit();
|
||||||
tableLayoutPanel1.SuspendLayout();
|
tableLayoutPanel1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)radTextBoxControl1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)radTextBoxControl_SearchBox).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// radListView_CharList
|
// radListView_CharList
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
tableLayoutPanel1.ColumnCount = 1;
|
tableLayoutPanel1.ColumnCount = 1;
|
||||||
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
tableLayoutPanel1.Controls.Add(radListView_CharList, 0, 1);
|
tableLayoutPanel1.Controls.Add(radListView_CharList, 0, 1);
|
||||||
tableLayoutPanel1.Controls.Add(radTextBoxControl1, 0, 0);
|
tableLayoutPanel1.Controls.Add(radTextBoxControl_SearchBox, 0, 0);
|
||||||
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
tableLayoutPanel1.Location = new System.Drawing.Point(0, 20);
|
tableLayoutPanel1.Location = new System.Drawing.Point(0, 20);
|
||||||
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
@@ -90,14 +90,15 @@
|
|||||||
tableLayoutPanel1.Size = new System.Drawing.Size(500, 480);
|
tableLayoutPanel1.Size = new System.Drawing.Size(500, 480);
|
||||||
tableLayoutPanel1.TabIndex = 1;
|
tableLayoutPanel1.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// radTextBoxControl1
|
// radTextBoxControl_SearchBox
|
||||||
//
|
//
|
||||||
radTextBoxControl1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
radTextBoxControl_SearchBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
radTextBoxControl1.Location = new System.Drawing.Point(3, 3);
|
radTextBoxControl_SearchBox.Location = new System.Drawing.Point(3, 3);
|
||||||
radTextBoxControl1.Name = "radTextBoxControl1";
|
radTextBoxControl_SearchBox.Name = "radTextBoxControl_SearchBox";
|
||||||
radTextBoxControl1.NullText = "Search...";
|
radTextBoxControl_SearchBox.NullText = "Search...";
|
||||||
radTextBoxControl1.Size = new System.Drawing.Size(494, 22);
|
radTextBoxControl_SearchBox.Size = new System.Drawing.Size(494, 22);
|
||||||
radTextBoxControl1.TabIndex = 1;
|
radTextBoxControl_SearchBox.TabIndex = 1;
|
||||||
|
radTextBoxControl_SearchBox.TextChanged += RadTextBoxControl_SearchBox_TextChanged;
|
||||||
//
|
//
|
||||||
// CharacterListControl
|
// CharacterListControl
|
||||||
//
|
//
|
||||||
@@ -110,7 +111,7 @@
|
|||||||
((System.ComponentModel.ISupportInitialize)radListView_CharList).EndInit();
|
((System.ComponentModel.ISupportInitialize)radListView_CharList).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)radMenu1).EndInit();
|
((System.ComponentModel.ISupportInitialize)radMenu1).EndInit();
|
||||||
tableLayoutPanel1.ResumeLayout(false);
|
tableLayoutPanel1.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)radTextBoxControl1).EndInit();
|
((System.ComponentModel.ISupportInitialize)radTextBoxControl_SearchBox).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@@ -123,6 +124,6 @@
|
|||||||
private Telerik.WinControls.UI.RadMenuItem radMenuItem_DeleteChar;
|
private Telerik.WinControls.UI.RadMenuItem radMenuItem_DeleteChar;
|
||||||
private Telerik.WinControls.UI.RadMenuItem radMenuItem_OpenChar;
|
private Telerik.WinControls.UI.RadMenuItem radMenuItem_OpenChar;
|
||||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
private Telerik.WinControls.UI.RadTextBoxControl radTextBoxControl1;
|
private Telerik.WinControls.UI.RadTextBoxControl radTextBoxControl_SearchBox;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using OwnChar.App.Desktop.LangRes;
|
|||||||
using OwnChar.Model;
|
using OwnChar.Model;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Telerik.WinControls;
|
using Telerik.WinControls;
|
||||||
using Telerik.WinControls.UI;
|
using Telerik.WinControls.UI;
|
||||||
@@ -61,18 +62,41 @@ public partial class CharacterListControl : UserControl
|
|||||||
{
|
{
|
||||||
foreach (Character character in characters)
|
foreach (Character character in characters)
|
||||||
{
|
{
|
||||||
AddCharToList(character);
|
AddCharToList(character, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
radListView_CharList.EndUpdate();
|
radListView_CharList.EndUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddCharToList(Character character)
|
private void AddCharToList(Character character, bool focus)
|
||||||
{
|
{
|
||||||
|
radListView_CharList.BeginUpdate();
|
||||||
|
|
||||||
var newItem = new ListViewDataItem();
|
var newItem = new ListViewDataItem();
|
||||||
UpdateCharListViewItem(newItem, character);
|
UpdateCharListViewItem(newItem, character);
|
||||||
newItem.Value = character;
|
newItem.Value = character;
|
||||||
|
|
||||||
|
radListView_CharList.EndUpdate();
|
||||||
|
|
||||||
|
if (focus)
|
||||||
|
{
|
||||||
|
radListView_CharList.SelectedItem = newItem;
|
||||||
|
radListView_CharList.ListViewElement.ViewElement.Scroller.ScrollToItem(newItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RemoveCharFromList(Character character)
|
||||||
|
{
|
||||||
|
radListView_CharList.BeginUpdate();
|
||||||
|
|
||||||
|
foreach (var item in radListView_CharList.Items.ToArray())
|
||||||
|
{
|
||||||
|
if (item.Value == character)
|
||||||
|
radListView_CharList.Items.Remove(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
radListView_CharList.EndUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateCharListViewItem(ListViewDataItem listItem, Character character)
|
private void UpdateCharListViewItem(ListViewDataItem listItem, Character character)
|
||||||
@@ -93,32 +117,30 @@ public partial class CharacterListControl : UserControl
|
|||||||
|
|
||||||
private void NewChar()
|
private void NewChar()
|
||||||
{
|
{
|
||||||
if (mainApi.Manager?.Characters.AddCharacter() is Character newChar)
|
if (mainApi.Manager?.Characters.CreateCharacter(CharListControlLangRes.UnnamedChar) is Character newChar)
|
||||||
AddCharToList(newChar);
|
AddCharToList(newChar, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TryDelChar()
|
private void DeleteChar()
|
||||||
{
|
{
|
||||||
var selChar = GetSelectedChar();
|
var selChar = GetSelectedChar();
|
||||||
|
|
||||||
if (selChar != null)
|
if (selChar != null)
|
||||||
{
|
{
|
||||||
if (RadMessageBox.Show(string.Format(CharListControlLangRes.MsgBox_ConfirmDeletion_Text, selChar.Name), CharListControlLangRes.MsgBox_ConfirmDeletion_Title, MessageBoxButtons.YesNo, RadMessageIcon.Exclamation) == DialogResult.Yes)
|
if (RadMessageBox.Show(string.Format(GeneralLangRes.MsgBox_ConfirmDelete_TextGeneral, string.Format(CharListControlLangRes.MsgBox_ConfirmDelete_TextChar, selChar.Name)), string.Format(GeneralLangRes.MsgBox_ConfirmDelete_TitleGeneral, CharListControlLangRes.MsgBox_ConfirmDelete_TitleChar), MessageBoxButtons.YesNo, RadMessageIcon.Exclamation) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
|
mainApi.Manager?.Characters.DeleteCharacter(selChar);
|
||||||
|
RemoveCharFromList(selChar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
RadMessageBox.Show(GeneralLangRes.MsgBox_NothingSelected, GeneralLangRes.MsgBox_Error, MessageBoxButtons.OK, RadMessageIcon.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TryOpenChar(Character? character)
|
private void TryOpenChar(Character? character)
|
||||||
{
|
{
|
||||||
if (character != null)
|
if (character != null)
|
||||||
OpenCharTab(character);
|
mainApi.OpenTab(new TabCharView(mainApi, character), string.IsNullOrWhiteSpace(character.Name) ? CharListControlLangRes.UnnamedChar : character.Name);
|
||||||
}
|
|
||||||
|
|
||||||
private void OpenCharTab(Character character)
|
|
||||||
{
|
|
||||||
mainApi.OpenTab(new TabCharView(mainApi, character), string.IsNullOrWhiteSpace(character.Name) ? CharListControlLangRes.Tab_UnnamedChar : character.Name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// E V E N T S
|
// E V E N T S
|
||||||
@@ -130,11 +152,16 @@ public partial class CharacterListControl : UserControl
|
|||||||
|
|
||||||
private void RadMenuItem_DeleteChar_Click(object sender, System.EventArgs e)
|
private void RadMenuItem_DeleteChar_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TryDelChar();
|
DeleteChar();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RadMenuItem_OpenChar_Click(object sender, System.EventArgs e)
|
private void RadMenuItem_OpenChar_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TryOpenChar(GetSelectedChar());
|
TryOpenChar(GetSelectedChar());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RadTextBoxControl_SearchBox_TextChanged(object sender, System.EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user