OSDN Git Service

RAD-407: Added ability to see role IDs
authorLatif Khalifa <latifer@streamgrid.net>
Sun, 3 Mar 2013 11:26:40 +0000 (12:26 +0100)
committerLatif Khalifa <latifer@streamgrid.net>
Sun, 3 Mar 2013 11:26:40 +0000 (12:26 +0100)
Radegast/GUI/Consoles/GroupDetails.Designer.cs
Radegast/GUI/Consoles/GroupDetails.cs
Radegast/GUI/Consoles/GroupDetails.resx

index 599b5b0..dedf1f2 100644 (file)
@@ -59,6 +59,7 @@ namespace Radegast
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GroupDetails));
             this.tcGroupDetails = new System.Windows.Forms.TabControl();
             this.tpGeneral = new System.Windows.Forms.TabPage();
             this.txtGroupID = new System.Windows.Forms.TextBox();
@@ -124,6 +125,7 @@ namespace Radegast
             this.lvwRoles = new Radegast.ListViewNoFlicker();
             this.chRoleListName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.chRoleTitle = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.cbRoleID = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.label2 = new System.Windows.Forms.Label();
             this.tpNotices = new System.Windows.Forms.TabPage();
             this.btnNewNotice = new System.Windows.Forms.Button();
@@ -156,6 +158,8 @@ namespace Radegast
             this.btnClose = new System.Windows.Forms.Button();
             this.btnApply = new System.Windows.Forms.Button();
             this.btnRefresh = new System.Windows.Forms.Button();
+            this.rolesContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+            this.copyRoleIDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.tcGroupDetails.SuspendLayout();
             this.tpGeneral.SuspendLayout();
             this.memberListContextMenu.SuspendLayout();
@@ -174,6 +178,7 @@ namespace Radegast
             this.pnlArchivedNotice.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.icnItem)).BeginInit();
             this.pnlBottomControls.SuspendLayout();
+            this.rolesContextMenu.SuspendLayout();
             this.SuspendLayout();
             // 
             // tcGroupDetails
@@ -845,7 +850,9 @@ namespace Radegast
             | System.Windows.Forms.AnchorStyles.Right)));
             this.lvwRoles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
             this.chRoleListName,
-            this.chRoleTitle});
+            this.chRoleTitle,
+            this.cbRoleID});
+            this.lvwRoles.ContextMenuStrip = this.rolesContextMenu;
             this.lvwRoles.FullRowSelect = true;
             this.lvwRoles.GridLines = true;
             this.lvwRoles.HideSelection = false;
@@ -870,6 +877,11 @@ namespace Radegast
             this.chRoleTitle.Text = "Role Title";
             this.chRoleTitle.Width = 198;
             // 
+            // cbRoleID
+            // 
+            this.cbRoleID.Text = "Role ID";
+            this.cbRoleID.Width = 100;
+            // 
             // label2
             // 
             this.label2.AutoSize = true;
@@ -1008,7 +1020,7 @@ namespace Radegast
             this.btnRemoveAttachment.AccessibleName = "Remove attachment";
             this.btnRemoveAttachment.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.btnRemoveAttachment.Enabled = false;
-            this.btnRemoveAttachment.Image = global::Radegast.Properties.Resources.inv_folder_trash;
+            this.btnRemoveAttachment.Image = ((System.Drawing.Image)(resources.GetObject("btnRemoveAttachment.Image")));
             this.btnRemoveAttachment.Location = new System.Drawing.Point(170, 15);
             this.btnRemoveAttachment.Name = "btnRemoveAttachment";
             this.btnRemoveAttachment.Size = new System.Drawing.Size(26, 23);
@@ -1238,6 +1250,20 @@ namespace Radegast
             this.btnRefresh.UseVisualStyleBackColor = true;
             this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
             // 
+            // rolesContextMenu
+            // 
+            this.rolesContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.copyRoleIDToolStripMenuItem});
+            this.rolesContextMenu.Name = "rolesContextMenu";
+            this.rolesContextMenu.Size = new System.Drawing.Size(153, 48);
+            // 
+            // copyRoleIDToolStripMenuItem
+            // 
+            this.copyRoleIDToolStripMenuItem.Name = "copyRoleIDToolStripMenuItem";
+            this.copyRoleIDToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+            this.copyRoleIDToolStripMenuItem.Text = "Copy Role ID";
+            this.copyRoleIDToolStripMenuItem.Click += new System.EventHandler(this.copyRoleIDToolStripMenuItem_Click);
+            // 
             // GroupDetails
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
@@ -1273,6 +1299,7 @@ namespace Radegast
             this.pnlArchivedNotice.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.icnItem)).EndInit();
             this.pnlBottomControls.ResumeLayout(false);
+            this.rolesContextMenu.ResumeLayout(false);
             this.ResumeLayout(false);
 
         }
@@ -1376,6 +1403,9 @@ namespace Radegast
         private System.Windows.Forms.ContextMenuStrip memberListContextMenu;
         private System.Windows.Forms.ToolStripMenuItem memberListContextMenuSave;
         public System.Windows.Forms.TextBox txtGroupID;
+        private System.Windows.Forms.ColumnHeader cbRoleID;
+        private System.Windows.Forms.ContextMenuStrip rolesContextMenu;
+        private System.Windows.Forms.ToolStripMenuItem copyRoleIDToolStripMenuItem;
 
     }
 }
index c06389d..915c3c8 100644 (file)
@@ -522,6 +522,7 @@ namespace Radegast
                     item.Name = role.ID.ToString();
                     item.Text = role.Name;
                     item.SubItems.Add(role.Title);
+                    item.SubItems.Add(role.ID.ToString());
                     item.Tag = role;
                     lvwRoles.Items.Add(item);
                 }
@@ -1197,6 +1198,15 @@ namespace Radegast
             }
         }
 
+        private void copyRoleIDToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            if (lvwRoles.SelectedItems.Count != 1) return;
+            if (lvwRoles.SelectedItems[0].Tag is GroupRole)
+            {
+                Clipboard.SetText(((GroupRole)lvwRoles.SelectedItems[0].Tag).ID.ToString());
+            }
+        }
+
     }
 
     public class EnhancedGroupMember
index 12307ef..550ca12 100644 (file)
   <metadata name="memberListContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>17, 17</value>\r
   </metadata>\r
+  <metadata name="rolesContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>206, 17</value>\r
+  </metadata>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="btnRemoveAttachment.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAGYktHRAD+AP4A/usY1IIAAAAJdnBBZwAAABAAAAAQAFzGrcMAAAAldEVYdGNyZWF0ZS1kYXRl\r
+        ADIwMTItMDMtMThUMDE6MjA6MzYrMDE6MDCw6GrXAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEyLTAzLTE4\r
+        VDAxOjIwOjM2KzAxOjAw71kc4wAAAWNJREFUOE+VUktqAkEU9BRzjEiMVxBxE08wGDEjE3XpBeImghvB\r
+        Dwjjyk1w6TKeQSGJv7WrZHbRA1T6ldMvDk4Iaaipet1VxfxSABJhllyMTD63iA9RKAoi/Ah1jvZifsGP\r
+        iEKy5i9z9Pt99Ho9OI6DQqGA1esqseR0icLhZ4j12xrT5ykGg0EsfPg6oOSWLkq0QIKb900Msnce/rWA\r
+        wki57eFwiOPhqJBwp9NBLpe7CDOnwkjXdREEATEajdCoNVC9ryJznUH6Kv13ged5NJXvyuR8Pk/O3mTJ\r
+        AuvXnAojJ5MJTc1mk1y8LZK9yqlYYP2aU2Hkfr+naTabkVuPLbI8hrDA+jWnwkhbsFgsyN1ul+xXfbLA\r
+        +jWn4nRI0263I8uPJFzza2SBvA+BWGlXQQlst1ssl0ua5bMK1x/qqJQrsQJbogUczGgLxsGYBe2nNj9n\r
+        UpgZK3TDbCUhKUz/+fB/IPUN4nltnG+SPzAAAAAASUVORK5CYII=\r
+</value>\r
+  </data>\r
 </root>
\ No newline at end of file