some work on pages
This commit is contained in:
58
OwnChar.App.Desktop/UI/MainTabs/Controls/CharacterListControl.Designer.cs
generated
Normal file
58
OwnChar.App.Desktop/UI/MainTabs/Controls/CharacterListControl.Designer.cs
generated
Normal file
@@ -0,0 +1,58 @@
|
||||
namespace OwnChar.App.Desktop.UI.MainTabs.Controls
|
||||
{
|
||||
partial class CharacterListControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Komponenten-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
radListView_CharList = new Telerik.WinControls.UI.RadListView();
|
||||
((System.ComponentModel.ISupportInitialize)radListView_CharList).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// radListView_CharList
|
||||
//
|
||||
radListView_CharList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
radListView_CharList.Location = new System.Drawing.Point(0, 0);
|
||||
radListView_CharList.Name = "radListView_CharList";
|
||||
radListView_CharList.Size = new System.Drawing.Size(500, 500);
|
||||
radListView_CharList.TabIndex = 0;
|
||||
//
|
||||
// CharacterListControl
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
Controls.Add(radListView_CharList);
|
||||
Name = "CharacterListControl";
|
||||
Size = new System.Drawing.Size(500, 500);
|
||||
((System.ComponentModel.ISupportInitialize)radListView_CharList).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Telerik.WinControls.UI.RadListView radListView_CharList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using OwnChar.App.Desktop.Api;
|
||||
using OwnChar.App.Desktop.UI.Windows;
|
||||
using OwnChar.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Telerik.WinControls.UI;
|
||||
|
||||
namespace OwnChar.App.Desktop.UI.MainTabs.Controls
|
||||
{
|
||||
public partial class CharacterListControl : UserControl
|
||||
{
|
||||
|
||||
private IMainWindowApi? mainApi;
|
||||
private UserProfile? profile;
|
||||
private Group? group;
|
||||
|
||||
public CharacterListControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void LoadContent(IMainWindowApi mainApi, UserProfile? profile)
|
||||
{
|
||||
LoadContent(mainApi, profile, null);
|
||||
}
|
||||
|
||||
public void LoadContent(IMainWindowApi mainApi, Group? group)
|
||||
{
|
||||
LoadContent(mainApi, null, group);
|
||||
}
|
||||
|
||||
private void LoadContent(IMainWindowApi mainApi, UserProfile? profile, Group? group)
|
||||
{
|
||||
this.mainApi = mainApi;
|
||||
this.profile = profile;
|
||||
this.group = group;
|
||||
PrepareList();
|
||||
LoadList();
|
||||
}
|
||||
|
||||
// Laden aller -eigenen- Charaktere
|
||||
// Spalte zum Anzeigen der Gruppen-Zugehörigkeit
|
||||
// Hinzufügen und Löschen von Charakteren
|
||||
private void PrepareList()
|
||||
{
|
||||
radListView_CharList.BeginUpdate();
|
||||
radListView_CharList.Columns.Clear();
|
||||
|
||||
radListView_CharList.Columns.Add(LangRes.LangResCharListControl.Column_CharName);
|
||||
|
||||
if (profile != null)
|
||||
radListView_CharList.Columns.Add(LangRes.LangResCharListControl.Column_CharGroup);
|
||||
else if (group != null)
|
||||
radListView_CharList.Columns.Add(LangRes.LangResCharListControl.Column_CharOwner);
|
||||
|
||||
radListView_CharList.EndUpdate();
|
||||
}
|
||||
|
||||
private void LoadList()
|
||||
{
|
||||
radListView_CharList.BeginUpdate();
|
||||
radListView_CharList.Items.Clear();
|
||||
|
||||
if (profile != null && mainApi?.Manager?.Characters.GetCharacters(profile) is IEnumerable<Character> characters)
|
||||
{
|
||||
foreach (Character character in characters)
|
||||
{
|
||||
AddCharToList(character);
|
||||
}
|
||||
}
|
||||
|
||||
radListView_CharList.EndUpdate();
|
||||
}
|
||||
|
||||
private void AddCharToList(Character character)
|
||||
{
|
||||
var newItem = new ListViewDataItem();
|
||||
UpdateCharListViewItem(newItem, character);
|
||||
newItem.Value = character;
|
||||
}
|
||||
|
||||
private void UpdateCharListViewItem(ListViewDataItem listItem, Character character)
|
||||
{
|
||||
listItem[0] = character.Name;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
namespace OwnChar.App.Desktop.UI.MainTabs.Controls
|
||||
{
|
||||
partial class CharacterViewControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Komponenten-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OwnChar.App.Desktop.UI.MainTabs.Controls
|
||||
{
|
||||
public partial class CharacterViewControl : UserControl
|
||||
{
|
||||
public CharacterViewControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
60
OwnChar.App.Desktop/UI/MainTabs/Controls/GroupListControl.Designer.cs
generated
Normal file
60
OwnChar.App.Desktop/UI/MainTabs/Controls/GroupListControl.Designer.cs
generated
Normal file
@@ -0,0 +1,60 @@
|
||||
namespace OwnChar.App.Desktop.UI.MainTabs.Controls
|
||||
{
|
||||
partial class GroupListControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Komponenten-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
radPageView_groupView = new Telerik.WinControls.UI.RadPageView();
|
||||
((System.ComponentModel.ISupportInitialize)radPageView_groupView).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// radPageView_groupView
|
||||
//
|
||||
radPageView_groupView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
radPageView_groupView.Location = new System.Drawing.Point(0, 0);
|
||||
radPageView_groupView.Name = "radPageView_groupView";
|
||||
radPageView_groupView.Size = new System.Drawing.Size(500, 500);
|
||||
radPageView_groupView.TabIndex = 0;
|
||||
radPageView_groupView.ViewMode = Telerik.WinControls.UI.PageViewMode.NavigationView;
|
||||
((Telerik.WinControls.UI.RadPageViewNavigationViewElement)radPageView_groupView.GetChildAt(0)).ExpandedPaneWidth = 175;
|
||||
//
|
||||
// GroupViewControl
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
Controls.Add(radPageView_groupView);
|
||||
Name = "GroupViewControl";
|
||||
Size = new System.Drawing.Size(500, 500);
|
||||
((System.ComponentModel.ISupportInitialize)radPageView_groupView).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Telerik.WinControls.UI.RadPageView radPageView_groupView;
|
||||
}
|
||||
}
|
||||
@@ -7,14 +7,20 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Telerik.WinControls.UI;
|
||||
using Telerik.WinControls.UI.Diagrams.Primitives;
|
||||
|
||||
namespace OwnChar.App.Desktop.UI.MainTabs.Controls
|
||||
{
|
||||
public partial class MemberViewControl : UserControl
|
||||
public partial class GroupListControl : UserControl
|
||||
{
|
||||
public MemberViewControl()
|
||||
public GroupListControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
// Auflistung der Gruppen
|
||||
// Hinzufügen
|
||||
// Löschen + Umbenennen (Wenn Admin/Mod)
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
<?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
|
||||
|
||||
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>
|
||||
@@ -26,36 +26,36 @@
|
||||
<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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
@@ -1,37 +0,0 @@
|
||||
namespace OwnChar.App.Desktop.UI.MainTabs.Controls
|
||||
{
|
||||
partial class GroupViewControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Komponenten-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace OwnChar.App.Desktop.UI.MainTabs.Controls
|
||||
{
|
||||
partial class MemberViewControl
|
||||
partial class MemberListControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
@@ -10,11 +10,14 @@ using System.Windows.Forms;
|
||||
|
||||
namespace OwnChar.App.Desktop.UI.MainTabs.Controls
|
||||
{
|
||||
public partial class GroupViewControl : UserControl
|
||||
public partial class MemberListControl : UserControl
|
||||
{
|
||||
public GroupViewControl()
|
||||
public MemberListControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
// Auflisten von Nutzern
|
||||
// -> z.B. Freunden oder Mitgliedern einer Gruppe
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
<?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
|
||||
|
||||
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>
|
||||
@@ -26,36 +26,36 @@
|
||||
<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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
Reference in New Issue
Block a user