diff --git a/client/administration/UdsAdmin/Resources/meta32x16.png b/client/administration/UdsAdmin/Resources/meta32x16.png
new file mode 100644
index 000000000..f14e7ed70
Binary files /dev/null and b/client/administration/UdsAdmin/Resources/meta32x16.png differ
diff --git a/client/administration/UdsAdmin/Resources/meta32x16.xcf b/client/administration/UdsAdmin/Resources/meta32x16.xcf
new file mode 100644
index 000000000..9a988e5ba
Binary files /dev/null and b/client/administration/UdsAdmin/Resources/meta32x16.xcf differ
diff --git a/client/administration/UdsAdmin/Strings.Designer.cs b/client/administration/UdsAdmin/Strings.Designer.cs
index 036e61ef2..e1ec1c79f 100644
--- a/client/administration/UdsAdmin/Strings.Designer.cs
+++ b/client/administration/UdsAdmin/Strings.Designer.cs
@@ -411,6 +411,15 @@ namespace UdsAdmin {
}
}
+ ///
+ /// Busca una cadena traducida similar a Group is not a Meta group!!!.
+ ///
+ internal static string groupIsNotMeta {
+ get {
+ return ResourceManager.GetString("groupIsNotMeta", resourceCulture);
+ }
+ }
+
///
/// Busca una cadena traducida similar a You need to select a group.
///
@@ -645,6 +654,15 @@ namespace UdsAdmin {
}
}
+ ///
+ /// Busca una cadena traducida similar a New meta group.
+ ///
+ internal static string newMetaGroup {
+ get {
+ return ResourceManager.GetString("newMetaGroup", resourceCulture);
+ }
+ }
+
///
/// Busca una cadena traducida similar a New Service Provider.
///
diff --git a/client/administration/UdsAdmin/Strings.resx b/client/administration/UdsAdmin/Strings.resx
index a828ec32c..7fea72dd6 100644
--- a/client/administration/UdsAdmin/Strings.resx
+++ b/client/administration/UdsAdmin/Strings.resx
@@ -513,4 +513,10 @@
An small name with at most 8 chars and using A-Z,a-z,0-9 -_ chars is required
+
+ New meta group
+
+
+ Group is not a Meta group!!!
+
\ No newline at end of file
diff --git a/client/administration/UdsAdmin/UdsAdmin.csproj b/client/administration/UdsAdmin/UdsAdmin.csproj
index 29cd41ad5..476525905 100644
--- a/client/administration/UdsAdmin/UdsAdmin.csproj
+++ b/client/administration/UdsAdmin/UdsAdmin.csproj
@@ -250,6 +250,12 @@
FileDownloader.cs
+
+ Form
+
+
+ GroupMetaForm.cs
+
Form
@@ -677,6 +683,9 @@
GroupForm.cs
+
+ GroupMetaForm.cs
+
LoginForm.cs
diff --git a/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.Designer.cs b/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.Designer.cs
index db0b68209..28c6a0925 100644
--- a/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.Designer.cs
+++ b/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.Designer.cs
@@ -28,12 +28,14 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DeployedGroupsPanel));
this.listView = new System.Windows.Forms.ListView();
+ this.auth = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.state = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.comments = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.auth = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.SuspendLayout();
//
// listView
@@ -48,12 +50,17 @@
this.listView.FullRowSelect = true;
this.listView.GridLines = true;
this.listView.Name = "listView";
+ this.listView.SmallImageList = this.imageList1;
this.listView.UseCompatibleStateImageBehavior = false;
this.listView.View = System.Windows.Forms.View.Details;
this.listView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView_ColumnClick);
this.listView.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listView_KeyUp);
this.listView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listView_MouseUp);
//
+ // auth
+ //
+ resources.ApplyResources(this.auth, "auth");
+ //
// name
//
resources.ApplyResources(this.name, "name");
@@ -69,9 +76,11 @@
resources.ApplyResources(this.comments, "comments");
this.comments.Width = global::UdsAdmin.Properties.Settings.Default.wCommentsCol;
//
- // auth
+ // imageList1
//
- resources.ApplyResources(this.auth, "auth");
+ this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
+ this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
+ this.imageList1.Images.SetKeyName(0, "meta");
//
// DeployedGroupsPanel
//
@@ -91,5 +100,6 @@
private System.Windows.Forms.ColumnHeader state;
private System.Windows.Forms.ColumnHeader comments;
private System.Windows.Forms.ColumnHeader auth;
+ private System.Windows.Forms.ImageList imageList1;
}
}
diff --git a/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.cs b/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.cs
index 124befdad..357434b89 100644
--- a/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.cs
+++ b/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.cs
@@ -85,6 +85,8 @@ namespace UdsAdmin.controls.panel
foreach (xmlrpc.Group grp in grps)
{
ListViewItem itm = new ListViewItem(new string[]{grp.nameParent, grp.name, grp.active ? Strings.active : Strings.inactive , grp.comments});
+ if (grp.isMeta)
+ itm.ImageKey = "meta";
itm.ForeColor = grp.active ? gui.Colors.ActiveColor : gui.Colors.InactiveColor;
itm.Tag = grp.id;
lst.Add(itm);
diff --git a/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.resx b/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.resx
index a0a02743c..a380af593 100644
--- a/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.resx
+++ b/client/administration/UdsAdmin/controls/panel/DeployedGroupsPanel.resx
@@ -147,6 +147,22 @@
583, 279
+
+ 17, 17
+
+
+
+ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
+ LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
+ ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABA
+ AQAAAk1TRnQBSQFMAwEBAAEIAQABCAEAARABAAEQAQAE/wEZAQAI/wFCAU0BNgcAATYDAAEoAwABQAMA
+ ARADAAEBAQABGAYAAQz/AP8A/wAYAAO0AwADtAkAA7QDAAO0DwADtJMAA7QDAAO0AwADtAkAA7QPAAO0
+ kwADtAMAA7QDAAO0CQADtA8AA7STAAO0AwADtA8AA7QPAAO0nwADtAkAA7QPAAO0nwADtAkAA7QPAAO0
+ kwADtAMAA7QJAAO0CQADtP8A/wD/AP8AYAABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGA
+ FwAD/wEAAv8GAAL/BgAC/wYAAv8GAAGoAbYGAAGrAbYGAAGLAbYGAAGJAbAGAAGrAbYGAAGrAbYGAAGo
+ AQkGAAL/BgAC/wYAAv8GAAL/BgAC/wYACw==
+
+
0
@@ -171,6 +187,12 @@
583, 279
+
+ auth
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
name
@@ -189,11 +211,11 @@
System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- auth
+
+ imageList1
-
- System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
DeployedGroupsPanel
diff --git a/client/administration/UdsAdmin/controls/panel/GroupsPanel.Designer.cs b/client/administration/UdsAdmin/controls/panel/GroupsPanel.Designer.cs
index 58814c5d0..5cea78350 100644
--- a/client/administration/UdsAdmin/controls/panel/GroupsPanel.Designer.cs
+++ b/client/administration/UdsAdmin/controls/panel/GroupsPanel.Designer.cs
@@ -28,11 +28,13 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GroupsPanel));
this.listView = new System.Windows.Forms.ListView();
this.name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.state = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.comments = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.imageList = new System.Windows.Forms.ImageList(this.components);
this.SuspendLayout();
//
// listView
@@ -46,6 +48,7 @@
this.listView.FullRowSelect = true;
this.listView.GridLines = true;
this.listView.Name = "listView";
+ this.listView.SmallImageList = this.imageList;
this.listView.UseCompatibleStateImageBehavior = false;
this.listView.View = System.Windows.Forms.View.Details;
this.listView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView_ColumnClick);
@@ -67,6 +70,12 @@
resources.ApplyResources(this.comments, "comments");
this.comments.Width = global::UdsAdmin.Properties.Settings.Default.wCommentsCol;
//
+ // imageList
+ //
+ this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
+ this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+ this.imageList.Images.SetKeyName(0, "meta");
+ //
// GroupsPanel
//
resources.ApplyResources(this, "$this");
@@ -84,5 +93,6 @@
private System.Windows.Forms.ColumnHeader name;
private System.Windows.Forms.ColumnHeader state;
private System.Windows.Forms.ColumnHeader comments;
+ private System.Windows.Forms.ImageList imageList;
}
}
diff --git a/client/administration/UdsAdmin/controls/panel/GroupsPanel.cs b/client/administration/UdsAdmin/controls/panel/GroupsPanel.cs
index e3e78abda..eab0a6fbb 100644
--- a/client/administration/UdsAdmin/controls/panel/GroupsPanel.cs
+++ b/client/administration/UdsAdmin/controls/panel/GroupsPanel.cs
@@ -60,12 +60,14 @@ namespace UdsAdmin.controls.panel
ToolStripMenuItem enable = new ToolStripMenuItem(Strings.enable); enable.Click += enableItem; enable.Image = Images.apply16;
ToolStripMenuItem disable = new ToolStripMenuItem(Strings.disable); disable.Click += disableItem; disable.Image = Images.cancel16;
ToolStripSeparator sep = new ToolStripSeparator();
- ToolStripMenuItem newG1 = new ToolStripMenuItem(Strings.newItem); newG1.Click += newItem; newG1.Image = Images.new16;
- ToolStripMenuItem newG2 = new ToolStripMenuItem(Strings.newItem); newG2.Click += newItem; newG2.Image = Images.new16;
+ ToolStripMenuItem newG1 = new ToolStripMenuItem(Strings.newItem); newG1.Click += newGroup; newG1.Image = Images.new16;
+ ToolStripMenuItem newMG1 = new ToolStripMenuItem(Strings.newMetaGroup); newMG1.Click += newMetaGroup; newMG1.Image = Images.new16;
+ ToolStripMenuItem newG2 = new ToolStripMenuItem(Strings.newItem); newG2.Click += newGroup; newG2.Image = Images.new16;
+ ToolStripMenuItem newMG2 = new ToolStripMenuItem(Strings.newMetaGroup); newMG2.Click += newMetaGroup; newMG2.Image = Images.new16;
ToolStripMenuItem delete = new ToolStripMenuItem(Strings.deleteItem); delete.Click += deleteItem; delete.Image = Images.delete16;
- _emptyMenu.Items.Add(newG1);
- _fullMenu.Items.AddRange(new ToolStripItem[] { modify, enable, disable, sep, newG2, delete });
+ _emptyMenu.Items.AddRange(new ToolStripItem[] { newG1, newMG1 });
+ _fullMenu.Items.AddRange(new ToolStripItem[] { enable, disable, sep, newG2, newMG2, modify, delete });
listView.Columns[0].Text = _authType.groupNameLabel;
@@ -89,9 +91,14 @@ namespace UdsAdmin.controls.panel
List lst = new List();
foreach (xmlrpc.Group grp in grps)
{
- ListViewItem itm = new ListViewItem(new string[]{grp.name, grp.active ? Strings.active : Strings.inactive , grp.comments});
+ ListViewItem itm = new ListViewItem(new string[]{ grp.name, grp.active ? Strings.active : Strings.inactive , grp.comments});
+ if (grp.isMeta == true)
+ {
+ itm.ImageKey = "meta";
+
+ }
itm.ForeColor = grp.active ? gui.Colors.ActiveColor : gui.Colors.InactiveColor;
- itm.Tag = grp.id;
+ itm.Tag = grp;
lst.Add(itm);
}
listView.Items.Clear();
@@ -104,7 +111,7 @@ namespace UdsAdmin.controls.panel
}
- private void newItem(object sender, EventArgs e)
+ private void newGroup(object sender, EventArgs e)
{
UdsAdmin.forms.GroupForm form = new UdsAdmin.forms.GroupForm(_auth, _authType, null);
if (form.ShowDialog() == DialogResult.OK)
@@ -113,12 +120,33 @@ namespace UdsAdmin.controls.panel
}
}
+ private void newMetaGroup(object sender, EventArgs e)
+ {
+ UdsAdmin.forms.GroupMetaForm form = new UdsAdmin.forms.GroupMetaForm(_auth, null);
+ if (form.ShowDialog() == DialogResult.OK)
+ {
+ updateList();
+ }
+ }
+
private void modifyItem(object sender, EventArgs e)
{
if (listView.SelectedItems.Count != 1)
return;
- UdsAdmin.forms.GroupForm form = new UdsAdmin.forms.GroupForm(_auth, _authType, (string)listView.SelectedItems[0].Tag);
- if (form.ShowDialog() == DialogResult.OK)
+
+ xmlrpc.Group group = (xmlrpc.Group)listView.SelectedItems[0].Tag;
+ DialogResult res = DialogResult.No;
+
+ if (group.isMeta == true)
+ {
+ res = (new UdsAdmin.forms.GroupMetaForm(_auth, group.id)).ShowDialog();
+ }
+ else
+ {
+ res = (new UdsAdmin.forms.GroupForm(_auth, _authType, group.id)).ShowDialog();
+ }
+
+ if (res == DialogResult.OK)
{
updateList();
}
@@ -134,7 +162,7 @@ namespace UdsAdmin.controls.panel
int n = 0;
foreach (ListViewItem i in listView.SelectedItems)
{
- ids[n++] = (string)i.Tag;
+ ids[n++] = ((xmlrpc.Group)i.Tag).id;
i.SubItems[1].Text = info;
i.ForeColor = col;
}
@@ -160,7 +188,7 @@ namespace UdsAdmin.controls.panel
int n = 0;
foreach (ListViewItem i in listView.SelectedItems)
{
- ids[n++] = (string)i.Tag;
+ ids[n++] = ((xmlrpc.Group)i.Tag).id;
listView.Items.Remove(i);
}
xmlrpc.UdsAdminService.RemoveGroups(ids);
diff --git a/client/administration/UdsAdmin/controls/panel/GroupsPanel.resx b/client/administration/UdsAdmin/controls/panel/GroupsPanel.resx
index 1b31cfb1f..85d8fb0a7 100644
--- a/client/administration/UdsAdmin/controls/panel/GroupsPanel.resx
+++ b/client/administration/UdsAdmin/controls/panel/GroupsPanel.resx
@@ -139,7 +139,23 @@
0, 0
- 583, 279
+ 677, 294
+
+
+ 17, 17
+
+
+
+ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
+ LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
+ ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABA
+ AQAAAk1TRnQBSQFMAwEBAAEIAQABCAEAARABAAEQAQAE/wEZAQAI/wFCAU0BNgcAATYDAAEoAwABQAMA
+ ARADAAEBAQABGAYAAQz/AP8A/wAYAAPBAwADwQkAA8EDAAPBDwADwZMAA8EDAAPBAwADwQkAA8EPAAPB
+ kwADwQMAA8EDAAPBCQADwQ8AA8GTAAPBAwADwQ8AA8EPAAPBnwADwQkAA8EPAAPBnwADwQkAA8EPAAPB
+ kwADwQMAA8EJAAPBCQADwf8A/wD/AP8AYAABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGA
+ FwAD/wEAAv8GAAL/BgAC/wYAAv8GAAGoAbYGAAGrAbYGAAGLAbYGAAGJAbAGAAGrAbYGAAGrAbYGAAGo
+ AQkGAAL/BgAC/wYAAv8GAAL/BgAC/wYACw==
+
0
@@ -163,7 +179,7 @@
6, 13
- 583, 279
+ 677, 294
name
@@ -183,6 +199,12 @@
System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ imageList
+
+
+ System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
GroupsPanel
diff --git a/client/administration/UdsAdmin/forms/GroupMetaForm.Designer.cs b/client/administration/UdsAdmin/forms/GroupMetaForm.Designer.cs
new file mode 100644
index 000000000..1c4bc8a90
--- /dev/null
+++ b/client/administration/UdsAdmin/forms/GroupMetaForm.Designer.cs
@@ -0,0 +1,343 @@
+namespace UdsAdmin.forms
+{
+ partial class GroupMetaForm
+ {
+ ///
+ /// Variable del diseñador requerida.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Limpiar los recursos que se estén utilizando.
+ ///
+ /// true si los recursos administrados se deben eliminar; false en caso contrario, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Código generado por el Diseñador de Windows Forms
+
+ ///
+ /// Método necesario para admitir el Diseñador. No se puede modificar
+ /// el contenido del método con el editor de código.
+ ///
+ private void InitializeComponent()
+ {
+ this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
+ this.accept = new System.Windows.Forms.Button();
+ this.cancel = new System.Windows.Forms.Button();
+ this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
+ this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.selectedGroups = new System.Windows.Forms.ListBox();
+ this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.name = new System.Windows.Forms.TextBox();
+ this.comments = new System.Windows.Forms.TextBox();
+ this.groupLabel = new System.Windows.Forms.Label();
+ this.active = new System.Windows.Forms.CheckBox();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.availableGroups = new System.Windows.Forms.ListBox();
+ this.tableLayoutPanel2.SuspendLayout();
+ this.tableLayoutPanel4.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.flowLayoutPanel1.SuspendLayout();
+ this.tableLayoutPanel1.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // tableLayoutPanel2
+ //
+ this.tableLayoutPanel2.ColumnCount = 3;
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
+ this.tableLayoutPanel2.Controls.Add(this.accept, 0, 0);
+ this.tableLayoutPanel2.Controls.Add(this.cancel, 2, 0);
+ this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel3, 1, 0);
+ this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 376);
+ this.tableLayoutPanel2.Name = "tableLayoutPanel2";
+ this.tableLayoutPanel2.RowCount = 1;
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(555, 33);
+ this.tableLayoutPanel2.TabIndex = 8;
+ //
+ // accept
+ //
+ this.accept.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.accept.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.accept.Location = new System.Drawing.Point(3, 7);
+ this.accept.Name = "accept";
+ this.accept.Size = new System.Drawing.Size(160, 23);
+ this.accept.TabIndex = 0;
+ this.accept.Text = "Accept";
+ this.accept.UseVisualStyleBackColor = true;
+ this.accept.Click += new System.EventHandler(this.accept_Click);
+ //
+ // cancel
+ //
+ this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.cancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.cancel.Location = new System.Drawing.Point(391, 7);
+ this.cancel.Name = "cancel";
+ this.cancel.Size = new System.Drawing.Size(161, 23);
+ this.cancel.TabIndex = 1;
+ this.cancel.Text = "Cancel";
+ this.cancel.UseVisualStyleBackColor = true;
+ this.cancel.Click += new System.EventHandler(this.cancel_Click);
+ //
+ // tableLayoutPanel3
+ //
+ this.tableLayoutPanel3.ColumnCount = 3;
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F));
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
+ this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel3.Location = new System.Drawing.Point(169, 3);
+ this.tableLayoutPanel3.Name = "tableLayoutPanel3";
+ this.tableLayoutPanel3.RowCount = 1;
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel3.Size = new System.Drawing.Size(216, 27);
+ this.tableLayoutPanel3.TabIndex = 2;
+ //
+ // tableLayoutPanel4
+ //
+ this.tableLayoutPanel4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.tableLayoutPanel4.ColumnCount = 3;
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel4.Controls.Add(this.groupBox2, 2, 0);
+ this.tableLayoutPanel4.Controls.Add(this.flowLayoutPanel1, 1, 0);
+ this.tableLayoutPanel4.Controls.Add(this.groupBox1, 0, 0);
+ this.tableLayoutPanel4.Location = new System.Drawing.Point(11, 103);
+ this.tableLayoutPanel4.Name = "tableLayoutPanel4";
+ this.tableLayoutPanel4.RowCount = 1;
+ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel4.Size = new System.Drawing.Size(538, 264);
+ this.tableLayoutPanel4.TabIndex = 10;
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.selectedGroups);
+ this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox2.Location = new System.Drawing.Point(312, 3);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(223, 258);
+ this.groupBox2.TabIndex = 1;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Selected Groups";
+ //
+ // selectedGroups
+ //
+ this.selectedGroups.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.selectedGroups.FormattingEnabled = true;
+ this.selectedGroups.Location = new System.Drawing.Point(3, 16);
+ this.selectedGroups.Name = "selectedGroups";
+ this.selectedGroups.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
+ this.selectedGroups.Size = new System.Drawing.Size(217, 239);
+ this.selectedGroups.TabIndex = 0;
+ //
+ // flowLayoutPanel1
+ //
+ this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.flowLayoutPanel1.Controls.Add(this.button1);
+ this.flowLayoutPanel1.Controls.Add(this.button2);
+ this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
+ this.flowLayoutPanel1.Location = new System.Drawing.Point(232, 46);
+ this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 46, 3, 3);
+ this.flowLayoutPanel1.Name = "flowLayoutPanel1";
+ this.flowLayoutPanel1.Size = new System.Drawing.Size(74, 64);
+ this.flowLayoutPanel1.TabIndex = 2;
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(3, 3);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(70, 23);
+ this.button1.TabIndex = 0;
+ this.button1.Text = ">";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(3, 32);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(70, 23);
+ this.button2.TabIndex = 1;
+ this.button2.Text = "<";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.tableLayoutPanel1.ColumnCount = 2;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.52252F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 77.47748F));
+ this.tableLayoutPanel1.Controls.Add(this.label3, 0, 2);
+ this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.name, 1, 0);
+ this.tableLayoutPanel1.Controls.Add(this.comments, 1, 1);
+ this.tableLayoutPanel1.Controls.Add(this.groupLabel, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.active, 1, 2);
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 3;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(531, 85);
+ this.tableLayoutPanel1.TabIndex = 11;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.label3.Location = new System.Drawing.Point(3, 56);
+ this.label3.Margin = new System.Windows.Forms.Padding(3, 6, 3, 0);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(32, 13);
+ this.label3.TabIndex = 7;
+ this.label3.Text = "State";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.label2.Location = new System.Drawing.Point(3, 31);
+ this.label2.Margin = new System.Windows.Forms.Padding(3, 6, 3, 0);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(56, 13);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "Comments";
+ //
+ // name
+ //
+ this.name.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.name.Location = new System.Drawing.Point(122, 3);
+ this.name.Name = "name";
+ this.name.Size = new System.Drawing.Size(406, 20);
+ this.name.TabIndex = 2;
+ //
+ // comments
+ //
+ this.comments.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.comments.Location = new System.Drawing.Point(122, 28);
+ this.comments.Name = "comments";
+ this.comments.Size = new System.Drawing.Size(406, 20);
+ this.comments.TabIndex = 3;
+ //
+ // groupLabel
+ //
+ this.groupLabel.AutoSize = true;
+ this.groupLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.groupLabel.Location = new System.Drawing.Point(3, 6);
+ this.groupLabel.Margin = new System.Windows.Forms.Padding(3, 6, 3, 0);
+ this.groupLabel.Name = "groupLabel";
+ this.groupLabel.Size = new System.Drawing.Size(67, 13);
+ this.groupLabel.TabIndex = 0;
+ this.groupLabel.Text = "Group Name";
+ //
+ // active
+ //
+ this.active.Appearance = System.Windows.Forms.Appearance.Button;
+ this.active.AutoSize = true;
+ this.active.Checked = true;
+ this.active.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.active.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.active.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.active.Location = new System.Drawing.Point(122, 56);
+ this.active.Margin = new System.Windows.Forms.Padding(3, 6, 3, 3);
+ this.active.Name = "active";
+ this.active.Size = new System.Drawing.Size(406, 26);
+ this.active.TabIndex = 6;
+ this.active.Text = "Active";
+ this.active.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.active.UseVisualStyleBackColor = true;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.availableGroups);
+ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox1.Location = new System.Drawing.Point(3, 3);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(223, 258);
+ this.groupBox1.TabIndex = 3;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Available Groups";
+ //
+ // availableGroups
+ //
+ this.availableGroups.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.availableGroups.FormattingEnabled = true;
+ this.availableGroups.Location = new System.Drawing.Point(3, 16);
+ this.availableGroups.Name = "availableGroups";
+ this.availableGroups.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
+ this.availableGroups.Size = new System.Drawing.Size(217, 239);
+ this.availableGroups.TabIndex = 4;
+ //
+ // GroupMetaForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(555, 409);
+ this.Controls.Add(this.tableLayoutPanel1);
+ this.Controls.Add(this.tableLayoutPanel4);
+ this.Controls.Add(this.tableLayoutPanel2);
+ this.Name = "GroupMetaForm";
+ this.Text = "Meta Group";
+ this.Load += new System.EventHandler(this.GroupMetaForm_Load);
+ this.tableLayoutPanel2.ResumeLayout(false);
+ this.tableLayoutPanel4.ResumeLayout(false);
+ this.groupBox2.ResumeLayout(false);
+ this.flowLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanel1.PerformLayout();
+ this.groupBox1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
+ private System.Windows.Forms.Button accept;
+ private System.Windows.Forms.Button cancel;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.ListBox selectedGroups;
+ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label2;
+ public System.Windows.Forms.TextBox name;
+ public System.Windows.Forms.TextBox comments;
+ private System.Windows.Forms.Label groupLabel;
+ private System.Windows.Forms.CheckBox active;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.ListBox availableGroups;
+
+ }
+}
\ No newline at end of file
diff --git a/client/administration/UdsAdmin/forms/GroupMetaForm.cs b/client/administration/UdsAdmin/forms/GroupMetaForm.cs
new file mode 100644
index 000000000..162de0472
--- /dev/null
+++ b/client/administration/UdsAdmin/forms/GroupMetaForm.cs
@@ -0,0 +1,191 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UdsAdmin.forms
+{
+ public partial class GroupMetaForm : Form
+ {
+ private xmlrpc.Authenticator _auth;
+ private string _id;
+
+ public GroupMetaForm(xmlrpc.Authenticator auth, string groupId)
+ {
+ InitializeComponent();
+ _auth = auth;
+ _id = groupId;
+ }
+
+ private void GroupMetaForm_Load(object sender, EventArgs e)
+ {
+ availableGroups.BeginUpdate();
+ selectedGroups.BeginUpdate();
+
+ try
+ {
+ foreach (xmlrpc.Group grp in xmlrpc.UdsAdminService.GetGroups(_auth.id))
+ {
+ if (grp.isMeta == false)
+ availableGroups.Items.Add(grp);
+ }
+ }
+ catch (CookComputing.XmlRpc.XmlRpcFaultException ex)
+ {
+ gui.UserNotifier.notifyRpcException(ex);
+ Close();
+ }
+
+ if (_id != null)
+ {
+ try
+ {
+ xmlrpc.Group grp = xmlrpc.UdsAdminService.GetGroup(_id);
+ name.Text = grp.name;
+ comments.Text = grp.comments;
+ active.Checked = grp.active;
+ // Sanity check
+ if (grp.isMeta == false)
+ throw new CookComputing.XmlRpc.XmlRpcFaultException(-1, Strings.groupIsNotMeta);
+
+
+ foreach (string id in grp.groupsIds)
+ {
+ foreach( xmlrpc.Group av in availableGroups.Items )
+ {
+ if (av.id == id)
+ {
+ selectedGroups.Items.Add(av);
+ availableGroups.Items.Remove(av);
+ break;
+ }
+ }
+ }
+
+ sortListbox(availableGroups);
+ sortListbox(selectedGroups);
+
+ }
+ catch (CookComputing.XmlRpc.XmlRpcFaultException ex)
+ {
+ gui.UserNotifier.notifyRpcException(ex);
+ Close();
+ }
+ }
+
+ availableGroups.EndUpdate();
+ selectedGroups.EndUpdate();
+
+ Location = MainForm.centerLocation(this);
+ }
+
+ private static int compareGroups(xmlrpc.Group g1, xmlrpc.Group g2)
+ {
+ return String.Compare(g1.name, g2.name);
+ }
+
+ private void sortListbox(ListBox l)
+ {
+ List lst = new List(l.Items.OfType());
+ lst.Sort(compareGroups);
+ l.Items.Clear();
+ l.Items.AddRange(lst.ToArray());
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ if (availableGroups.SelectedItems.Count == 0)
+ return;
+
+ availableGroups.BeginUpdate();
+ selectedGroups.BeginUpdate();
+
+ List toRemove = new List();
+ foreach (xmlrpc.Group grp in availableGroups.SelectedItems)
+ {
+ toRemove.Add(grp);
+ selectedGroups.Items.Add(grp);
+ }
+ // Now remove groups from availables
+ foreach( xmlrpc.Group grp in toRemove )
+ availableGroups.Items.Remove(grp);
+
+ sortListbox(availableGroups);
+ sortListbox(selectedGroups);
+
+ selectedGroups.EndUpdate();
+ availableGroups.EndUpdate();
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ if (selectedGroups.SelectedItems.Count == 0)
+ return;
+
+ availableGroups.BeginUpdate();
+ selectedGroups.BeginUpdate();
+
+ List toRemove = new List();
+ foreach (xmlrpc.Group grp in selectedGroups.SelectedItems)
+ {
+ toRemove.Add(grp);
+ availableGroups.Items.Add(grp);
+ }
+ // Now remove groups from availables
+ foreach (xmlrpc.Group grp in toRemove)
+ selectedGroups.Items.Remove(grp);
+
+ sortListbox(availableGroups);
+ sortListbox(selectedGroups);
+
+ selectedGroups.EndUpdate();
+ availableGroups.EndUpdate();
+ }
+
+ private void cancel_Click(object sender, EventArgs e)
+ {
+ DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ }
+
+ private void accept_Click(object sender, EventArgs e)
+ {
+ if (name.Text.Trim().Length == 0)
+ {
+ gui.UserNotifier.notifyError(Strings.nameRequired);
+ return;
+ }
+ xmlrpc.Group grp = new xmlrpc.Group();
+ grp.idParent = _auth.id; grp.id = ""; grp.name = name.Text; grp.comments = comments.Text; grp.active = active.Checked;
+
+ grp.isMeta = true;
+ List groupsIds = new List();
+ foreach( xmlrpc.Group g in selectedGroups.Items )
+ groupsIds.Add(g.id);
+
+ grp.groupsIds = groupsIds.ToArray();
+
+ try
+ {
+ if (_id == null)
+ {
+ xmlrpc.UdsAdminService.CreateGroup(grp);
+ }
+ else
+ {
+ grp.id = _id;
+ xmlrpc.UdsAdminService.ModifyGroup(grp);
+ }
+ DialogResult = System.Windows.Forms.DialogResult.OK;
+ }
+ catch (CookComputing.XmlRpc.XmlRpcFaultException ex)
+ {
+ gui.UserNotifier.notifyRpcException(ex);
+ }
+
+ }
+ }
+}
diff --git a/client/administration/UdsAdmin/forms/GroupMetaForm.resx b/client/administration/UdsAdmin/forms/GroupMetaForm.resx
new file mode 100644
index 000000000..5ea0895e3
--- /dev/null
+++ b/client/administration/UdsAdmin/forms/GroupMetaForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/client/administration/UdsAdmin/forms/MainForm.cs b/client/administration/UdsAdmin/forms/MainForm.cs
index 3855397cb..676d86f0b 100644
--- a/client/administration/UdsAdmin/forms/MainForm.cs
+++ b/client/administration/UdsAdmin/forms/MainForm.cs
@@ -204,9 +204,9 @@ namespace UdsAdmin.forms
{
gui.UserNotifier.notifyRpcException(ex);
}
- catch (Exception)
+ catch (Exception ex2)
{
- // Nothing done right now
+ gui.UserNotifier.notifyError(ex2.Message);
}
}
diff --git a/client/administration/UdsAdmin/forms/UserForm.Designer.cs b/client/administration/UdsAdmin/forms/UserForm.Designer.cs
index 9b60d48fe..1ce7beb93 100644
--- a/client/administration/UdsAdmin/forms/UserForm.Designer.cs
+++ b/client/administration/UdsAdmin/forms/UserForm.Designer.cs
@@ -228,6 +228,7 @@
//
// groupsList
//
+ this.groupsList.CheckOnClick = true;
this.groupsList.FormattingEnabled = true;
resources.ApplyResources(this.groupsList, "groupsList");
this.groupsList.Name = "groupsList";
diff --git a/client/administration/UdsAdmin/forms/UserForm.cs b/client/administration/UdsAdmin/forms/UserForm.cs
index 5d094bcca..4929fa8d4 100644
--- a/client/administration/UdsAdmin/forms/UserForm.cs
+++ b/client/administration/UdsAdmin/forms/UserForm.cs
@@ -124,6 +124,8 @@ namespace UdsAdmin.forms
if (gg != null)
active = gg.active;
}
+ if (grp.isMeta == true)
+ grp.name = grp.name + " (meta)";
groupsList.Items.Add(grp, active);
}
}
@@ -155,13 +157,16 @@ namespace UdsAdmin.forms
{
if (_authType.isExternalSource == false)
{
- _user.groups = new xmlrpc.Group[groupsList.CheckedItems.Count];
- int n = 0;
+ List lst = new List();
foreach (xmlrpc.Group grp in groupsList.CheckedItems)
{
- _user.groups[n++] = grp;
+ if (grp.isMeta == false)
+ lst.Add(grp);
}
+ _user.groups = lst.ToArray();
}
+ else
+ _user.groups = new xmlrpc.Group[0];
_user.idParent = _auth.id; _user.name = name.Text; _user.realName = realName.Text;
_user.comments = comments.Text; _user.state = states[state.SelectedIndex];
_user.password = password.Text;
diff --git a/client/administration/UdsAdmin/forms/UserForm.resx b/client/administration/UdsAdmin/forms/UserForm.resx
index aa234cf58..3f4cd4179 100644
--- a/client/administration/UdsAdmin/forms/UserForm.resx
+++ b/client/administration/UdsAdmin/forms/UserForm.resx
@@ -180,21 +180,6 @@
3
-
- Fill
-
-
- 33, 3
-
-
- 85, 21
-
-
- 7
-
-
- Check name
-
check
@@ -264,15 +249,360 @@
<?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="accept" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="cancel" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="tableLayoutPanel3" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,30,Percent,40,Percent,30" /><Rows Styles="Percent,100" /></TableLayoutSettings>
+
+ Fill
+
+
+ 33, 3
+
+
+ 85, 21
+
+
+ 7
+
+
+ Check name
+
+
+ check
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel3
+
+
+ 0
+
Top, Left, Right
+
+ tableLayoutPanel1
+
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ user
+
+
+ 0
+
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="realName" Row="1" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="label4" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="name" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="comments" Row="2" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="searchButton" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="userNameLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="state" Row="3" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="passwordLabel" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="staffMemberLabel" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="adminLabel" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label5" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="password" Row="6" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="staffMember" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="admin" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,27,54098,Percent,72,45902,Absolute,56" /><Rows Styles="Percent,15,Percent,15,Percent,14,Percent,14,Percent,14,Percent,14,Percent,14,Absolute,20" /></TableLayoutSettings>
+
+
+ 4, 23
+
+
+ 3, 3, 3, 3
+
+
+ 385, 210
+
+
+ 0
+
+
+ User
+
+
+ user
+
+
+ System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tabs
+
+
+ 0
+
+
+ 7, 7
+
+
+ 372, 184
+
+
+ 0
+
+
+ groupsList
+
+
+ System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ group
+
+
+ 0
+
+
+ 4, 23
+
+
+ 3, 3, 3, 3
+
+
+ 385, 210
+
+
+ 1
+
+
+ Groups
+
+
+ group
+
+
+ System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tabs
+
+
+ 1
+
+
+ 13, 13
+
+
+ 393, 237
+
+
+ 10
+
+
+ tabs
+
+
+ System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 0
+
Top, Left, Right
3
+
+ realName
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 0
+
+
+ label4
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 1
+
+
+ label2
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 2
+
+
+ name
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 3
+
+
+ comments
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 4
+
+
+ searchButton
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 5
+
+
+ userNameLabel
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 6
+
+
+ state
+
+
+ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 7
+
+
+ passwordLabel
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 8
+
+
+ staffMemberLabel
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 9
+
+
+ adminLabel
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 10
+
+
+ label5
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 11
+
+
+ password
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 12
+
+
+ staffMember
+
+
+ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 13
+
+
+ admin
+
+
+ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 14
+
+
+ 6, 6
+
+
+ 7
+
+
+ 373, 195
+
+
+ 1
+
+
+ tableLayoutPanel1
+
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ user
+
+
+ 0
+
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="realName" Row="1" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="label4" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="name" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="comments" Row="2" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="searchButton" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="userNameLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="state" Row="3" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="passwordLabel" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="staffMemberLabel" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="adminLabel" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label5" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="password" Row="6" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="staffMember" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="admin" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,27,54098,Percent,72,45902,Absolute,56" /><Rows Styles="Percent,15,Percent,15,Percent,14,Percent,14,Percent,14,Percent,14,Percent,14,Absolute,20" /></TableLayoutSettings>
+
Fill
@@ -364,7 +694,7 @@
90, 3
- 224, 20
+ 223, 20
1
@@ -409,7 +739,7 @@
NoControl
- 320, 3
+ 319, 3
30, 20
@@ -640,7 +970,7 @@
90, 115
- 224, 21
+ 223, 21
14
@@ -667,7 +997,7 @@
90, 142
- 224, 21
+ 223, 21
15
@@ -684,129 +1014,6 @@
14
-
- 6, 6
-
-
- 7
-
-
- 373, 195
-
-
- 1
-
-
- tableLayoutPanel1
-
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- user
-
-
- 0
-
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="realName" Row="1" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="label4" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="name" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="comments" Row="2" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="searchButton" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="userNameLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="state" Row="3" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="passwordLabel" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="staffMemberLabel" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="adminLabel" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label5" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="password" Row="6" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="staffMember" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="admin" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,27,54098,Percent,72,45902,Absolute,55" /><Rows Styles="Percent,15,Percent,15,Percent,14,Percent,14,Percent,14,Percent,14,Percent,14,Absolute,20" /></TableLayoutSettings>
-
-
- 4, 23
-
-
- 3, 3, 3, 3
-
-
- 385, 210
-
-
- 0
-
-
- User
-
-
- user
-
-
- System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabs
-
-
- 0
-
-
- 7, 7
-
-
- 372, 184
-
-
- 0
-
-
- groupsList
-
-
- System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- group
-
-
- 0
-
-
- 4, 23
-
-
- 3, 3, 3, 3
-
-
- 385, 210
-
-
- 1
-
-
- Groups
-
-
- group
-
-
- System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabs
-
-
- 1
-
-
- 13, 13
-
-
- 393, 237
-
-
- 10
-
-
- tabs
-
-
- System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 0
-
True
diff --git a/client/administration/UdsAdmin/gui/ListViewSorter.cs b/client/administration/UdsAdmin/gui/ListViewSorter.cs
index 5069e1f15..4cd540f85 100644
--- a/client/administration/UdsAdmin/gui/ListViewSorter.cs
+++ b/client/administration/UdsAdmin/gui/ListViewSorter.cs
@@ -58,11 +58,20 @@ namespace UdsAdmin.gui
sortOrderImages = new ImageList();
+
+ if( lst.SmallImageList != null )
+ {
+ foreach(string k in lst.SmallImageList.Images.Keys )
+ {
+ sortOrderImages.Images.Add(k, lst.SmallImageList.Images[k]);
+ }
+ }
+
sortOrderImages.ColorDepth = ColorDepth.Depth24Bit;
sortOrderImages.Images.Add("up", Images.uparrow16);
sortOrderImages.Images.Add("down", Images.downarrow16);
sortOrderImages.Images.Add("empty", Images.empty16);
-
+
lst.SmallImageList = sortOrderImages;
foreach (ColumnHeader h in lst.Columns)
{
diff --git a/client/administration/UdsAdmin/xmlrpc/structs.cs b/client/administration/UdsAdmin/xmlrpc/structs.cs
index 2433ed05b..42d84bae6 100644
--- a/client/administration/UdsAdmin/xmlrpc/structs.cs
+++ b/client/administration/UdsAdmin/xmlrpc/structs.cs
@@ -237,10 +237,19 @@ namespace UdsAdmin.xmlrpc
public string name;
public string comments;
public bool active;
+ public bool isMeta;
+ [XmlRpcMissingMapping(MappingAction.Ignore)]
+ public string[] groupsIds; // If isMeta, this will hold to wich groups this makes references to
+
public override string ToString()
{
- return name + ", " + comments;
+ string res = name;
+ if( isMeta == true )
+ res += "(meta)";
+ if (comments == null || comments == "")
+ res += " ," + comments;
+ return res;
}
}
@@ -264,7 +273,14 @@ namespace UdsAdmin.xmlrpc
public override string ToString()
{
- return name + "(" + realName + ")" + ", " + comments;
+ string rn = "";
+ if (realName != null && realName != "")
+ rn = " (" + realName + ")";
+ string cmnts = "";
+ if (comments != null && comments != "")
+ cmnts = ", " + comments;
+
+ return name + rn + cmnts;
}
}