OSDN Git Service

More work on moving notifications to new blue dialog in upper right corner
authorLatif Khalifa <latifer@streamgrid.net>
Sat, 6 Jun 2009 19:58:59 +0000 (19:58 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Sat, 6 Jun 2009 19:58:59 +0000 (19:58 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@16 f7a694da-4d33-11de-9ad6-1127a62b9fcd

23 files changed:
Radegast/Core/RadegastInstance.cs
Radegast/Core/Types/TransparentButton.cs [new file with mode: 0644]
Radegast/GUI/Consoles/TabsConsole.cs
Radegast/GUI/Dialogs/GroupInvitationDialog.Designer.cs [deleted file]
Radegast/GUI/Dialogs/GroupInvitationDialog.cs [deleted file]
Radegast/GUI/Dialogs/MainForm.Designer.cs
Radegast/GUI/Dialogs/MainForm.cs
Radegast/GUI/Dialogs/PermissionsDialog.Designer.cs [deleted file]
Radegast/GUI/Dialogs/PermissionsDialog.cs [deleted file]
Radegast/GUI/Dialogs/ScriptDialog.cs [deleted file]
Radegast/GUI/Notifications/GenericNotification.Designer.cs [new file with mode: 0644]
Radegast/GUI/Notifications/GenericNotification.cs [new file with mode: 0644]
Radegast/GUI/Notifications/GenericNotification.resx [moved from Radegast/GUI/Dialogs/GroupInvitationDialog.resx with 100% similarity]
Radegast/GUI/Notifications/GroupInvitationNotification.Designer.cs [new file with mode: 0644]
Radegast/GUI/Notifications/GroupInvitationNotification.cs [new file with mode: 0644]
Radegast/GUI/Notifications/GroupInvitationNotification.resx [moved from Radegast/GUI/Dialogs/PermissionsDialog.resx with 100% similarity]
Radegast/GUI/Notifications/PermissionsNotification.Designer.cs [new file with mode: 0644]
Radegast/GUI/Notifications/PermissionsNotification.cs [new file with mode: 0644]
Radegast/GUI/Notifications/PermissionsNotification.resx [moved from Radegast/GUI/Dialogs/ScriptDialog.resx with 100% similarity]
Radegast/GUI/Notifications/ScriptDialog.Designer.cs [moved from Radegast/GUI/Dialogs/ScriptDialog.Designer.cs with 67% similarity]
Radegast/GUI/Notifications/ScriptDialog.cs [new file with mode: 0644]
Radegast/GUI/Notifications/ScriptDialog.resx [new file with mode: 0644]
Radegast/Radegast.csproj

index 001eb10..e01c3ad 100644 (file)
@@ -92,6 +92,7 @@ namespace Radegast
          \r
             client.Groups.OnCurrentGroups += new GroupManager.CurrentGroupsCallback(Groups_OnCurrentGroups);\r
             client.Groups.OnGroupLeft += new GroupManager.GroupLeftCallback(Groups_OnGroupLeft);\r
+            client.Groups.OnGroupDropped += new GroupManager.GroupDroppedCallback(Groups_OnGroupDropped);\r
             client.Groups.OnGroupJoined += new GroupManager.GroupJoinedCallback(Groups_OnGroupJoined);\r
             client.Groups.OnGroupProfile += new GroupManager.GroupProfileCallback(Groups_OnGroupProfile);\r
             client.Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
@@ -103,6 +104,7 @@ namespace Radegast
             {\r
                 client.Groups.OnCurrentGroups -= new GroupManager.CurrentGroupsCallback(Groups_OnCurrentGroups);\r
                 client.Groups.OnGroupLeft -= new GroupManager.GroupLeftCallback(Groups_OnGroupLeft);\r
+                client.Groups.OnGroupDropped -= new GroupManager.GroupDroppedCallback(Groups_OnGroupDropped);\r
                 client.Groups.OnGroupJoined -= new GroupManager.GroupJoinedCallback(Groups_OnGroupJoined);\r
                 client.Groups.OnGroupProfile -= new GroupManager.GroupProfileCallback(Groups_OnGroupProfile);\r
                 client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
@@ -170,6 +172,14 @@ namespace Radegast
             }\r
         }\r
 \r
+        void Groups_OnGroupDropped(UUID groupID)\r
+        {\r
+            if (groups.ContainsKey(groupID))\r
+            {\r
+                groups.Remove(groupID);\r
+            }\r
+        }\r
+\r
         void Groups_OnCurrentGroups(Dictionary<UUID, Group> gr)\r
         {\r
             this.groups = gr;\r
diff --git a/Radegast/Core/Types/TransparentButton.cs b/Radegast/Core/Types/TransparentButton.cs
new file mode 100644 (file)
index 0000000..ea6b12a
--- /dev/null
@@ -0,0 +1,32 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+\r
+namespace Radegast\r
+{\r
+    class TransparentButton : Button\r
+    {\r
+        public TransparentButton() : base()\r
+        {\r
+            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);\r
+            this.BackColor = Color.Transparent;\r
+        }\r
+\r
+        protected override CreateParams CreateParams\r
+        {\r
+            get\r
+            {\r
+                CreateParams cp = base.CreateParams;\r
+                cp.ExStyle |= 0x20;\r
+                return cp;\r
+            }\r
+        }\r
+        \r
+        protected override void OnPaintBackground(PaintEventArgs pevent)\r
+        {\r
+        }\r
+    }\r
+}\r
index 91bac99..ac1caf8 100644 (file)
@@ -84,12 +84,12 @@ namespace Radegast
 \r
         void Self_OnScriptDialog(string message, string objectName, UUID imageID, UUID objectID, string firstName, string lastName, int chatChannel, List<string> buttons)\r
         {\r
-            (new ScriptDialog(client, message, objectName, imageID, objectID, firstName, lastName, chatChannel, buttons)).ShowDialog();\r
+            instance.MainForm.AddNotification(new ntfScriptDialog(instance, message, objectName, imageID, objectID, firstName, lastName, chatChannel, buttons));\r
         }\r
 \r
         void Self_OnScriptQuestion(Simulator simulator, UUID taskID, UUID itemID, string objectName, string objectOwner, ScriptPermission questions)\r
         {\r
-            (new PermissionsDialog(client, simulator, taskID, itemID, objectName, objectOwner, questions)).ShowDialog();\r
+            instance.MainForm.AddNotification(new ntfPermissions(instance, simulator, taskID, itemID, objectName, objectOwner, questions));\r
         }\r
 \r
         private void Config_ConfigApplied(object sender, ConfigAppliedEventArgs e)\r
@@ -218,12 +218,16 @@ namespace Radegast
 \r
                     break;\r
 \r
+                case InstantMessageDialog.MessageBox:\r
+                    instance.MainForm.AddNotification(new ntfGeneric(instance, e.IM));\r
+                    break;\r
+\r
                 case InstantMessageDialog.RequestTeleport:\r
                     instance.MainForm.AddNotification(new ntfTeleport(instance, e.IM));\r
                     break;\r
 \r
                 case InstantMessageDialog.GroupInvitation:\r
-                    (new GroupInvitationDialog(client, e.IM)).ShowDialog();\r
+                    instance.MainForm.AddNotification(new ntfGroupInvitation(instance, e.IM));\r
                     break;\r
 \r
                 case InstantMessageDialog.FriendshipOffered:\r
diff --git a/Radegast/GUI/Dialogs/GroupInvitationDialog.Designer.cs b/Radegast/GUI/Dialogs/GroupInvitationDialog.Designer.cs
deleted file mode 100644 (file)
index 4156dc8..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-namespace Radegast\r
-{\r
-    partial class GroupInvitationDialog\r
-    {\r
-        /// <summary>\r
-        /// Required designer variable.\r
-        /// </summary>\r
-        private System.ComponentModel.IContainer components = null;\r
-\r
-        /// <summary>\r
-        /// Clean up any resources being used.\r
-        /// </summary>\r
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
-        protected override void Dispose(bool disposing)\r
-        {\r
-            if (disposing && (components != null)) {\r
-                components.Dispose();\r
-            }\r
-            base.Dispose(disposing);\r
-        }\r
-\r
-        #region Windows Form Designer generated code\r
-\r
-        /// <summary>\r
-        /// Required method for Designer support - do not modify\r
-        /// the contents of this method with the code editor.\r
-        /// </summary>\r
-        private void InitializeComponent()\r
-        {\r
-            this.descBox = new System.Windows.Forms.TextBox();\r
-            this.yesBtn = new System.Windows.Forms.Button();\r
-            this.noBtn = new System.Windows.Forms.Button();\r
-            this.SuspendLayout();\r
-            // \r
-            // descBox\r
-            // \r
-            this.descBox.BackColor = System.Drawing.SystemColors.Control;\r
-            this.descBox.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
-            this.descBox.Location = new System.Drawing.Point(12, 12);\r
-            this.descBox.Multiline = true;\r
-            this.descBox.Name = "descBox";\r
-            this.descBox.Size = new System.Drawing.Size(268, 88);\r
-            this.descBox.TabIndex = 99;\r
-            this.descBox.TabStop = false;\r
-            // \r
-            // yesBtn\r
-            // \r
-            this.yesBtn.DialogResult = System.Windows.Forms.DialogResult.Yes;\r
-            this.yesBtn.Location = new System.Drawing.Point(53, 116);\r
-            this.yesBtn.Name = "yesBtn";\r
-            this.yesBtn.Size = new System.Drawing.Size(75, 23);\r
-            this.yesBtn.TabIndex = 1;\r
-            this.yesBtn.Text = "&Yes";\r
-            this.yesBtn.UseVisualStyleBackColor = true;\r
-            this.yesBtn.Click += new System.EventHandler(this.yesBtn_Click);\r
-            // \r
-            // noBtn\r
-            // \r
-            this.noBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
-            this.noBtn.Location = new System.Drawing.Point(159, 116);\r
-            this.noBtn.Name = "noBtn";\r
-            this.noBtn.Size = new System.Drawing.Size(75, 23);\r
-            this.noBtn.TabIndex = 2;\r
-            this.noBtn.Text = "&No";\r
-            this.noBtn.UseVisualStyleBackColor = true;\r
-            this.noBtn.Click += new System.EventHandler(this.noBtn_Click);\r
-            // \r
-            // GroupInvitationDialog\r
-            // \r
-            this.AcceptButton = this.noBtn;\r
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
-            this.CancelButton = this.noBtn;\r
-            this.ClientSize = new System.Drawing.Size(292, 154);\r
-            this.Controls.Add(this.noBtn);\r
-            this.Controls.Add(this.yesBtn);\r
-            this.Controls.Add(this.descBox);\r
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;\r
-            this.KeyPreview = true;\r
-            this.MaximizeBox = false;\r
-            this.MinimizeBox = false;\r
-            this.Name = "GroupInvitationDialog";\r
-            this.ShowIcon = false;\r
-            this.Text = "Group Invitation";\r
-            this.TopMost = true;\r
-            this.ResumeLayout(false);\r
-            this.PerformLayout();\r
-\r
-        }\r
-\r
-        #endregion\r
-\r
-        private System.Windows.Forms.TextBox descBox;\r
-        private System.Windows.Forms.Button yesBtn;\r
-        private System.Windows.Forms.Button noBtn;\r
-\r
-    }\r
-}
\ No newline at end of file
diff --git a/Radegast/GUI/Dialogs/GroupInvitationDialog.cs b/Radegast/GUI/Dialogs/GroupInvitationDialog.cs
deleted file mode 100644 (file)
index 45b1d05..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-using System;\r
-using System.Collections.Generic;\r
-using System.ComponentModel;\r
-using System.Data;\r
-using System.Drawing;\r
-using System.Text;\r
-using System.Windows.Forms;\r
-using RadegastNc;\r
-using OpenMetaverse;\r
-\r
-namespace Radegast\r
-{\r
-    public partial class GroupInvitationDialog : Form\r
-    {\r
-        private GridClient client;\r
-        InstantMessage im;\r
-\r
-        public GroupInvitationDialog(GridClient iclient, InstantMessage iim)\r
-        {\r
-            InitializeComponent();\r
-            this.Focus();\r
-            client = iclient;\r
-            im = iim;\r
-\r
-            descBox.Text = im.Message.Replace("\n", "\r\n");\r
-\r
-        }\r
-\r
-        private void noBtn_Click(object sender, EventArgs e)\r
-        {\r
-            client.Self.InstantMessage(client.Self.Name, im.FromAgentID, "", im.IMSessionID, InstantMessageDialog.GroupInvitationDecline,\r
-               InstantMessageOnline.Offline, Vector3.Zero, UUID.Zero, null);\r
-            this.Close();\r
-        }\r
-\r
-        private void yesBtn_Click(object sender, EventArgs e)\r
-        {\r
-            client.Self.InstantMessage(client.Self.Name, im.FromAgentID, "", im.IMSessionID, InstantMessageDialog.GroupInvitationAccept,\r
-               InstantMessageOnline.Offline, Vector3.Zero, UUID.Zero, null);\r
-            this.Close();\r
-        }\r
-    }\r
-}
\ No newline at end of file
index 03ec847..ae099b0 100644 (file)
@@ -75,12 +75,10 @@ namespace Radegast
             this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();\r
             this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\r
             this.pnlDialog = new System.Windows.Forms.Panel();\r
-            this.btnDialogNextControl = new System.Windows.Forms.Button();\r
             this.toolStrip1.SuspendLayout();\r
             this.statusStrip1.SuspendLayout();\r
             this.toolStripContainer1.TopToolStripPanel.SuspendLayout();\r
             this.toolStripContainer1.SuspendLayout();\r
-            this.pnlDialog.SuspendLayout();\r
             this.SuspendLayout();\r
             // \r
             // toolStrip1\r
@@ -447,28 +445,11 @@ namespace Radegast
             this.pnlDialog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\r
             this.pnlDialog.AutoSize = true;\r
             this.pnlDialog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(170)))), ((int)(((byte)(255)))));\r
-            this.pnlDialog.Controls.Add(this.btnDialogNextControl);\r
             this.pnlDialog.Location = new System.Drawing.Point(540, 0);\r
             this.pnlDialog.Name = "pnlDialog";\r
             this.pnlDialog.Size = new System.Drawing.Size(198, 151);\r
             this.pnlDialog.TabIndex = 11;\r
             // \r
-            // btnDialogNextControl\r
-            // \r
-            this.btnDialogNextControl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\r
-            this.btnDialogNextControl.FlatAppearance.BorderSize = 0;\r
-            this.btnDialogNextControl.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.btnDialogNextControl.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.btnDialogNextControl.Location = new System.Drawing.Point(165, 128);\r
-            this.btnDialogNextControl.Margin = new System.Windows.Forms.Padding(0);\r
-            this.btnDialogNextControl.Name = "btnDialogNextControl";\r
-            this.btnDialogNextControl.Size = new System.Drawing.Size(33, 23);\r
-            this.btnDialogNextControl.TabIndex = 0;\r
-            this.btnDialogNextControl.Text = ">>";\r
-            this.btnDialogNextControl.UseVisualStyleBackColor = true;\r
-            this.btnDialogNextControl.Visible = false;\r
-            this.btnDialogNextControl.Click += new System.EventHandler(this.btnDialogNextControl_Click);\r
-            // \r
             // frmMain\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
@@ -493,7 +474,6 @@ namespace Radegast
             this.toolStripContainer1.TopToolStripPanel.PerformLayout();\r
             this.toolStripContainer1.ResumeLayout(false);\r
             this.toolStripContainer1.PerformLayout();\r
-            this.pnlDialog.ResumeLayout(false);\r
             this.ResumeLayout(false);\r
             this.PerformLayout();\r
 \r
@@ -539,7 +519,6 @@ namespace Radegast
         private System.Windows.Forms.ToolStripMenuItem groundSitToolStripMenuItem;\r
         public System.Windows.Forms.ToolStrip toolStrip1;\r
         public System.Windows.Forms.ToolStripContainer toolStripContainer1;\r
-        private System.Windows.Forms.Button btnDialogNextControl;\r
         public System.Windows.Forms.Panel pnlDialog;\r
     }\r
 }\r
index f5ffd6f..538795f 100644 (file)
@@ -30,6 +30,7 @@ namespace Radegast
         private System.Timers.Timer statusTimer;\r
         private AutoPilot ap;\r
         private bool AutoPilotActive = false;\r
+        TransparentButton btnDialogNextControl;\r
 \r
         public frmMain(RadegastInstance instance)\r
         {\r
@@ -42,6 +43,23 @@ namespace Radegast
             netcom.NetcomSync = this;\r
 \r
             pnlDialog.Visible = false;\r
+            btnDialogNextControl = new TransparentButton();\r
+            pnlDialog.Controls.Add(btnDialogNextControl);\r
+\r
+            btnDialogNextControl.Size = new Size(35, 20);\r
+            btnDialogNextControl.BackColor = Color.Transparent;\r
+            btnDialogNextControl.ForeColor = Color.Gold;\r
+            btnDialogNextControl.FlatAppearance.BorderSize = 0;\r
+            btnDialogNextControl.FlatStyle = FlatStyle.Flat;\r
+            btnDialogNextControl.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;\r
+            btnDialogNextControl.Text = ">>";\r
+            btnDialogNextControl.Font = new Font(btnDialogNextControl.Font, FontStyle.Bold);\r
+            btnDialogNextControl.Margin = new Padding(0);\r
+            btnDialogNextControl.Padding = new Padding(0);\r
+            btnDialogNextControl.UseVisualStyleBackColor = false;\r
+            btnDialogNextControl.Top = btnDialogNextControl.Parent.ClientSize.Height - btnDialogNextControl.Size.Height;\r
+            btnDialogNextControl.Left = btnDialogNextControl.Parent.ClientSize.Width - btnDialogNextControl.Size.Width;\r
+            btnDialogNextControl.Click += new EventHandler(btnDialogNextControl_Click);\r
 \r
             // Callbacks\r
             netcom.ClientLoginStatus += new EventHandler<ClientLoginEventArgs>(netcom_ClientLoginStatus);\r
@@ -489,17 +507,32 @@ namespace Radegast
         void ResizeNotificationByControl(Control active)\r
         {\r
             int Width = active.Size.Width + 6;\r
-            int Height = notifications.HasNext ? active.Size.Height + 20 : active.Size.Height + 6;\r
+            int Height = notifications.Count > 1 ? active.Size.Height + 3 + btnDialogNextControl.Size.Height : active.Size.Height + 3;\r
             pnlDialog.Size = new Size(Width, Height);\r
             pnlDialog.Top = 0;\r
             pnlDialog.Left = pnlDialog.Parent.ClientSize.Width - Width;\r
+\r
+            btnDialogNextControl.Top = btnDialogNextControl.Parent.ClientSize.Height - btnDialogNextControl.Size.Height;\r
+            btnDialogNextControl.Left = btnDialogNextControl.Parent.ClientSize.Width - btnDialogNextControl.Size.Width;\r
+\r
             btnDialogNextControl.BringToFront();\r
         }\r
 \r
         public void AddNotification(Control control)\r
         {\r
+            if (InvokeRequired)\r
+            {\r
+                BeginInvoke(new MethodInvoker(delegate()\r
+                {\r
+                    AddNotification(control);\r
+                }\r
+                ));\r
+                return;\r
+            }\r
+            \r
             this.Focus();\r
             pnlDialog.Visible = true;\r
+            pnlDialog.BringToFront();\r
 \r
             foreach (Control existing in notifications)\r
             {\r
diff --git a/Radegast/GUI/Dialogs/PermissionsDialog.Designer.cs b/Radegast/GUI/Dialogs/PermissionsDialog.Designer.cs
deleted file mode 100644 (file)
index 7502afb..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-namespace Radegast\r
-{\r
-    partial class PermissionsDialog\r
-    {\r
-        /// <summary>\r
-        /// Required designer variable.\r
-        /// </summary>\r
-        private System.ComponentModel.IContainer components = null;\r
-\r
-        /// <summary>\r
-        /// Clean up any resources being used.\r
-        /// </summary>\r
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
-        protected override void Dispose(bool disposing)\r
-        {\r
-            if (disposing && (components != null)) {\r
-                components.Dispose();\r
-            }\r
-            base.Dispose(disposing);\r
-        }\r
-\r
-        #region Windows Form Designer generated code\r
-\r
-        /// <summary>\r
-        /// Required method for Designer support - do not modify\r
-        /// the contents of this method with the code editor.\r
-        /// </summary>\r
-        private void InitializeComponent()\r
-        {\r
-            this.descBox = new System.Windows.Forms.TextBox();\r
-            this.yesBtn = new System.Windows.Forms.Button();\r
-            this.noBtn = new System.Windows.Forms.Button();\r
-            this.SuspendLayout();\r
-            // \r
-            // descBox\r
-            // \r
-            this.descBox.BackColor = System.Drawing.SystemColors.Control;\r
-            this.descBox.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
-            this.descBox.Location = new System.Drawing.Point(12, 12);\r
-            this.descBox.Multiline = true;\r
-            this.descBox.Name = "descBox";\r
-            this.descBox.Size = new System.Drawing.Size(268, 88);\r
-            this.descBox.TabIndex = 99;\r
-            this.descBox.TabStop = false;\r
-            // \r
-            // yesBtn\r
-            // \r
-            this.yesBtn.DialogResult = System.Windows.Forms.DialogResult.Yes;\r
-            this.yesBtn.Location = new System.Drawing.Point(53, 116);\r
-            this.yesBtn.Name = "yesBtn";\r
-            this.yesBtn.Size = new System.Drawing.Size(75, 23);\r
-            this.yesBtn.TabIndex = 1;\r
-            this.yesBtn.Text = "&Yes";\r
-            this.yesBtn.UseVisualStyleBackColor = true;\r
-            this.yesBtn.Click += new System.EventHandler(this.yesBtn_Click);\r
-            // \r
-            // noBtn\r
-            // \r
-            this.noBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
-            this.noBtn.Location = new System.Drawing.Point(159, 116);\r
-            this.noBtn.Name = "noBtn";\r
-            this.noBtn.Size = new System.Drawing.Size(75, 23);\r
-            this.noBtn.TabIndex = 2;\r
-            this.noBtn.Text = "&No";\r
-            this.noBtn.UseVisualStyleBackColor = true;\r
-            this.noBtn.Click += new System.EventHandler(this.noBtn_Click);\r
-            // \r
-            // PermissionsDialog\r
-            // \r
-            this.AcceptButton = this.noBtn;\r
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
-            this.CancelButton = this.noBtn;\r
-            this.ClientSize = new System.Drawing.Size(292, 154);\r
-            this.Controls.Add(this.noBtn);\r
-            this.Controls.Add(this.yesBtn);\r
-            this.Controls.Add(this.descBox);\r
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;\r
-            this.KeyPreview = true;\r
-            this.MaximizeBox = false;\r
-            this.MinimizeBox = false;\r
-            this.Name = "PermissionsDialog";\r
-            this.ShowIcon = false;\r
-            this.Text = "Permissions Request";\r
-            this.TopMost = true;\r
-            this.ResumeLayout(false);\r
-            this.PerformLayout();\r
-\r
-        }\r
-\r
-        #endregion\r
-\r
-        private System.Windows.Forms.TextBox descBox;\r
-        private System.Windows.Forms.Button yesBtn;\r
-        private System.Windows.Forms.Button noBtn;\r
-\r
-    }\r
-}
\ No newline at end of file
diff --git a/Radegast/GUI/Dialogs/PermissionsDialog.cs b/Radegast/GUI/Dialogs/PermissionsDialog.cs
deleted file mode 100644 (file)
index 07441bf..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-using System;\r
-using System.Collections.Generic;\r
-using System.ComponentModel;\r
-using System.Data;\r
-using System.Drawing;\r
-using System.Text;\r
-using System.Windows.Forms;\r
-using RadegastNc;\r
-using OpenMetaverse;\r
-\r
-namespace Radegast\r
-{\r
-    public partial class PermissionsDialog : Form\r
-    {\r
-        private UUID ptaskID;\r
-        private UUID pitemID;\r
-        private string pobjectName;\r
-        private string pobjectOwner;\r
-        private ScriptPermission pquestions;\r
-        private GridClient pclient;\r
-        private Simulator psimulator;\r
-\r
-        public PermissionsDialog(GridClient client, Simulator simulator, UUID taskID, UUID itemID, string objectName, string objectOwner, ScriptPermission questions)\r
-        {\r
-            InitializeComponent();\r
-            this.Focus();\r
-            this.pclient = client;\r
-            this.psimulator = simulator;\r
-            this.ptaskID = taskID;\r
-            this.pitemID = itemID;\r
-            this.pobjectName = objectName;\r
-            this.pobjectOwner = objectOwner;\r
-            this.pquestions = questions;\r
-\r
-            descBox.Text = "Object " + objectName + " ownded by " + objectOwner + " is asking permission to " + questions.ToString() + ". Do you accept?";\r
-\r
-        }\r
-\r
-        private void noBtn_Click(object sender, EventArgs e)\r
-        {\r
-            pclient.Self.ScriptQuestionReply(psimulator, pitemID, ptaskID, 0);\r
-            this.Close();\r
-        }\r
-\r
-        private void yesBtn_Click(object sender, EventArgs e)\r
-        {\r
-            pclient.Self.ScriptQuestionReply(psimulator, pitemID, ptaskID, pquestions);\r
-            this.Close();\r
-        }\r
-    }\r
-}
\ No newline at end of file
diff --git a/Radegast/GUI/Dialogs/ScriptDialog.cs b/Radegast/GUI/Dialogs/ScriptDialog.cs
deleted file mode 100644 (file)
index 404e2f1..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;\r
-using System.Collections.Generic;\r
-using System.ComponentModel;\r
-using System.Data;\r
-using System.Drawing;\r
-using System.Text;\r
-using System.Windows.Forms;\r
-using RadegastNc;\r
-using OpenMetaverse;\r
-\r
-namespace Radegast\r
-{\r
-    public partial class ScriptDialog : Form\r
-    {\r
-        GridClient pclient;\r
-        UUID pobjectID;\r
-        int pchatChannel;\r
-\r
-        public ScriptDialog(GridClient client, string message, string objectName, UUID imageID, UUID objectID, string firstName, string lastName, int chatChannel, List<string> buttons)\r
-        {\r
-            InitializeComponent();\r
-            this.Focus();\r
-            pclient = client;\r
-            pchatChannel = chatChannel;\r
-            pobjectID = objectID;\r
-\r
-\r
-            descBox.Text = firstName + " " + lastName + "'s " + objectName + "\r\n\r\n" + message.Replace("\n", "\r\n") + "\r\n";\r
-\r
-            int i = 0;\r
-            foreach (string label in buttons) {\r
-                Button b = new Button();\r
-                b.Size = new Size(110, 23);\r
-                b.Text = label;\r
-                b.Location = new Point(5 + (i % 3) * 120, 125 - (i/3)*30);\r
-                b.Name = i.ToString();\r
-                b.Click += new EventHandler(b_Click);\r
-                btnsPanel.Controls.Add(b);\r
-                i++;\r
-            }\r
-\r
-        }\r
-\r
-        void b_Click(object sender, EventArgs e)\r
-        {\r
-            string label = ((Button)sender).Text;\r
-            int index = int.Parse(((Button)sender).Name);\r
-            pclient.Self.ReplyToScriptDialog(pchatChannel, index, label, pobjectID);\r
-            this.Close();\r
-        }\r
-\r
-        private void ignoreBtn_Click(object sender, EventArgs e)\r
-        {\r
-            this.Close();\r
-        }\r
-\r
-    }\r
-}
\ No newline at end of file
diff --git a/Radegast/GUI/Notifications/GenericNotification.Designer.cs b/Radegast/GUI/Notifications/GenericNotification.Designer.cs
new file mode 100644 (file)
index 0000000..de4a7c1
--- /dev/null
@@ -0,0 +1,76 @@
+namespace Radegast\r
+{\r
+    partial class ntfGeneric\r
+    {\r
+        /// <summary> \r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary> \r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Component Designer generated code\r
+\r
+        /// <summary> \r
+        /// Required method for Designer support - do not modify \r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            this.txtMessage = new System.Windows.Forms.TextBox();\r
+            this.btnOk = new System.Windows.Forms.Button();\r
+            this.SuspendLayout();\r
+            // \r
+            // txtMessage\r
+            // \r
+            this.txtMessage.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
+            this.txtMessage.Location = new System.Drawing.Point(4, 3);\r
+            this.txtMessage.Multiline = true;\r
+            this.txtMessage.Name = "txtMessage";\r
+            this.txtMessage.ReadOnly = true;\r
+            this.txtMessage.Size = new System.Drawing.Size(237, 64);\r
+            this.txtMessage.TabIndex = 5;\r
+            this.txtMessage.TabStop = false;\r
+            this.txtMessage.Text = "Generic message.";\r
+            // \r
+            // btnOk\r
+            // \r
+            this.btnOk.DialogResult = System.Windows.Forms.DialogResult.Yes;\r
+            this.btnOk.Location = new System.Drawing.Point(4, 73);\r
+            this.btnOk.Name = "btnOk";\r
+            this.btnOk.Size = new System.Drawing.Size(75, 23);\r
+            this.btnOk.TabIndex = 4;\r
+            this.btnOk.Text = "&OK";\r
+            this.btnOk.UseVisualStyleBackColor = true;\r
+            this.btnOk.Click += new System.EventHandler(this.btnOk_Click);\r
+            // \r
+            // ntfGeneric\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.Controls.Add(this.txtMessage);\r
+            this.Controls.Add(this.btnOk);\r
+            this.Name = "ntfGeneric";\r
+            this.Size = new System.Drawing.Size(245, 98);\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.TextBox txtMessage;\r
+        private System.Windows.Forms.Button btnOk;\r
+    }\r
+}\r
diff --git a/Radegast/GUI/Notifications/GenericNotification.cs b/Radegast/GUI/Notifications/GenericNotification.cs
new file mode 100644 (file)
index 0000000..ce63fea
--- /dev/null
@@ -0,0 +1,34 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Drawing;\r
+using System.Data;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using OpenMetaverse;\r
+\r
+namespace Radegast\r
+{\r
+    public partial class ntfGeneric : UserControl\r
+    {\r
+        private RadegastInstance instance;\r
+        private InstantMessage msg;\r
+\r
+        public ntfGeneric(RadegastInstance instance, InstantMessage msg)\r
+        {\r
+            InitializeComponent();\r
+\r
+            this.instance = instance;\r
+            this.msg = msg;\r
+            txtMessage.BackColor = instance.MainForm.NotificationBackground;\r
+            txtMessage.Text = msg.Message.Replace("\n", "\r\n");\r
+            btnOk.Focus();\r
+        }\r
+\r
+        private void btnOk_Click(object sender, EventArgs e)\r
+        {\r
+            instance.MainForm.RemoveNotification(this);\r
+        }\r
+    }\r
+}\r
diff --git a/Radegast/GUI/Notifications/GroupInvitationNotification.Designer.cs b/Radegast/GUI/Notifications/GroupInvitationNotification.Designer.cs
new file mode 100644 (file)
index 0000000..d98c59c
--- /dev/null
@@ -0,0 +1,103 @@
+namespace Radegast\r
+{\r
+    partial class ntfGroupInvitation\r
+    {\r
+        /// <summary> \r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary> \r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Component Designer generated code\r
+\r
+        /// <summary> \r
+        /// Required method for Designer support - do not modify \r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            this.btnIgnore = new System.Windows.Forms.Button();\r
+            this.btnNo = new System.Windows.Forms.Button();\r
+            this.btnYes = new System.Windows.Forms.Button();\r
+            this.txtMessage = new System.Windows.Forms.TextBox();\r
+            this.SuspendLayout();\r
+            // \r
+            // btnIgnore\r
+            // \r
+            this.btnIgnore.Location = new System.Drawing.Point(165, 150);\r
+            this.btnIgnore.Name = "btnIgnore";\r
+            this.btnIgnore.Size = new System.Drawing.Size(75, 23);\r
+            this.btnIgnore.TabIndex = 2;\r
+            this.btnIgnore.Text = "&Ignore";\r
+            this.btnIgnore.UseVisualStyleBackColor = true;\r
+            this.btnIgnore.Click += new System.EventHandler(this.btnIgnore_Click);\r
+            // \r
+            // btnNo\r
+            // \r
+            this.btnNo.Location = new System.Drawing.Point(84, 150);\r
+            this.btnNo.Name = "btnNo";\r
+            this.btnNo.Size = new System.Drawing.Size(75, 23);\r
+            this.btnNo.TabIndex = 1;\r
+            this.btnNo.Text = "&Decline";\r
+            this.btnNo.UseVisualStyleBackColor = true;\r
+            this.btnNo.Click += new System.EventHandler(this.btnNo_Click);\r
+            // \r
+            // btnYes\r
+            // \r
+            this.btnYes.DialogResult = System.Windows.Forms.DialogResult.Yes;\r
+            this.btnYes.Location = new System.Drawing.Point(3, 150);\r
+            this.btnYes.Name = "btnYes";\r
+            this.btnYes.Size = new System.Drawing.Size(75, 23);\r
+            this.btnYes.TabIndex = 0;\r
+            this.btnYes.Text = "&Join";\r
+            this.btnYes.UseVisualStyleBackColor = true;\r
+            this.btnYes.Click += new System.EventHandler(this.btnYes_Click);\r
+            // \r
+            // txtMessage\r
+            // \r
+            this.txtMessage.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
+            this.txtMessage.Location = new System.Drawing.Point(3, 6);\r
+            this.txtMessage.Multiline = true;\r
+            this.txtMessage.Name = "txtMessage";\r
+            this.txtMessage.ReadOnly = true;\r
+            this.txtMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\r
+            this.txtMessage.Size = new System.Drawing.Size(237, 136);\r
+            this.txtMessage.TabIndex = 3;\r
+            this.txtMessage.TabStop = false;\r
+            this.txtMessage.Text = "Group invitation.";\r
+            // \r
+            // ntfGroupInvitation\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.Controls.Add(this.txtMessage);\r
+            this.Controls.Add(this.btnIgnore);\r
+            this.Controls.Add(this.btnNo);\r
+            this.Controls.Add(this.btnYes);\r
+            this.Name = "ntfGroupInvitation";\r
+            this.Size = new System.Drawing.Size(245, 173);\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.Button btnIgnore;\r
+        private System.Windows.Forms.Button btnNo;\r
+        private System.Windows.Forms.Button btnYes;\r
+        private System.Windows.Forms.TextBox txtMessage;\r
+    }\r
+}\r
diff --git a/Radegast/GUI/Notifications/GroupInvitationNotification.cs b/Radegast/GUI/Notifications/GroupInvitationNotification.cs
new file mode 100644 (file)
index 0000000..98b2a73
--- /dev/null
@@ -0,0 +1,49 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Drawing;\r
+using System.Data;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using OpenMetaverse;\r
+\r
+namespace Radegast\r
+{\r
+    public partial class ntfGroupInvitation : UserControl\r
+    {\r
+        private RadegastInstance instance;\r
+        private InstantMessage msg;\r
+\r
+        public ntfGroupInvitation(RadegastInstance instance, InstantMessage msg)\r
+        {\r
+            InitializeComponent();\r
+\r
+            this.instance = instance;\r
+            this.msg = msg;\r
+\r
+            txtMessage.BackColor = instance.MainForm.NotificationBackground;\r
+            txtMessage.Text = msg.Message.Replace("\n", "\r\n");\r
+            btnYes.Focus();\r
+        }\r
+\r
+        private void btnYes_Click(object sender, EventArgs e)\r
+        {\r
+            instance.Client.Self.InstantMessage(instance.Client.Self.Name, msg.FromAgentID, "", msg.IMSessionID, InstantMessageDialog.GroupInvitationAccept,\r
+   InstantMessageOnline.Online, Vector3.Zero, UUID.Zero, null);\r
+            instance.MainForm.RemoveNotification(this);\r
+        }\r
+\r
+        private void btnNo_Click(object sender, EventArgs e)\r
+        {\r
+            instance.Client.Self.InstantMessage(instance.Client.Self.Name, msg.FromAgentID, "", msg.IMSessionID, InstantMessageDialog.GroupInvitationDecline,\r
+   InstantMessageOnline.Online, Vector3.Zero, UUID.Zero, null);\r
+            instance.MainForm.RemoveNotification(this);\r
+        }\r
+\r
+        private void btnIgnore_Click(object sender, EventArgs e)\r
+        {\r
+            instance.MainForm.RemoveNotification(this);\r
+        }\r
+    }\r
+}\r
diff --git a/Radegast/GUI/Notifications/PermissionsNotification.Designer.cs b/Radegast/GUI/Notifications/PermissionsNotification.Designer.cs
new file mode 100644 (file)
index 0000000..1b03574
--- /dev/null
@@ -0,0 +1,103 @@
+namespace Radegast\r
+{\r
+    partial class ntfPermissions\r
+    {\r
+        /// <summary> \r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary> \r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Component Designer generated code\r
+\r
+        /// <summary> \r
+        /// Required method for Designer support - do not modify \r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            this.btnIgnore = new System.Windows.Forms.Button();\r
+            this.btnNo = new System.Windows.Forms.Button();\r
+            this.btnYes = new System.Windows.Forms.Button();\r
+            this.txtMessage = new System.Windows.Forms.TextBox();\r
+            this.SuspendLayout();\r
+            // \r
+            // btnIgnore\r
+            // \r
+            this.btnIgnore.Location = new System.Drawing.Point(165, 62);\r
+            this.btnIgnore.Name = "btnIgnore";\r
+            this.btnIgnore.Size = new System.Drawing.Size(75, 23);\r
+            this.btnIgnore.TabIndex = 8;\r
+            this.btnIgnore.Text = "&Ignore";\r
+            this.btnIgnore.UseVisualStyleBackColor = true;\r
+            this.btnIgnore.Click += new System.EventHandler(this.btnIgnore_Click);\r
+            // \r
+            // btnNo\r
+            // \r
+            this.btnNo.Location = new System.Drawing.Point(84, 62);\r
+            this.btnNo.Name = "btnNo";\r
+            this.btnNo.Size = new System.Drawing.Size(75, 23);\r
+            this.btnNo.TabIndex = 9;\r
+            this.btnNo.Text = "&No";\r
+            this.btnNo.UseVisualStyleBackColor = true;\r
+            this.btnNo.Click += new System.EventHandler(this.btnNo_Click);\r
+            // \r
+            // btnYes\r
+            // \r
+            this.btnYes.DialogResult = System.Windows.Forms.DialogResult.Yes;\r
+            this.btnYes.Location = new System.Drawing.Point(3, 62);\r
+            this.btnYes.Name = "btnYes";\r
+            this.btnYes.Size = new System.Drawing.Size(75, 23);\r
+            this.btnYes.TabIndex = 7;\r
+            this.btnYes.Text = "&Yes";\r
+            this.btnYes.UseVisualStyleBackColor = true;\r
+            this.btnYes.Click += new System.EventHandler(this.btnYes_Click);\r
+            // \r
+            // txtMessage\r
+            // \r
+            this.txtMessage.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
+            this.txtMessage.Location = new System.Drawing.Point(4, 7);\r
+            this.txtMessage.Multiline = true;\r
+            this.txtMessage.Name = "txtMessage";\r
+            this.txtMessage.ReadOnly = true;\r
+            this.txtMessage.Size = new System.Drawing.Size(236, 49);\r
+            this.txtMessage.TabIndex = 11;\r
+            this.txtMessage.TabStop = false;\r
+            this.txtMessage.Text = "Script permissions question";\r
+            // \r
+            // ntfPermissions\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.Controls.Add(this.btnIgnore);\r
+            this.Controls.Add(this.btnNo);\r
+            this.Controls.Add(this.btnYes);\r
+            this.Controls.Add(this.txtMessage);\r
+            this.Name = "ntfPermissions";\r
+            this.Size = new System.Drawing.Size(246, 88);\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.Button btnIgnore;\r
+        private System.Windows.Forms.Button btnNo;\r
+        private System.Windows.Forms.Button btnYes;\r
+        private System.Windows.Forms.TextBox txtMessage;\r
+\r
+    }\r
+}\r
diff --git a/Radegast/GUI/Notifications/PermissionsNotification.cs b/Radegast/GUI/Notifications/PermissionsNotification.cs
new file mode 100644 (file)
index 0000000..4ef9174
--- /dev/null
@@ -0,0 +1,58 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Drawing;\r
+using System.Data;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using OpenMetaverse;\r
+\r
+namespace Radegast\r
+{\r
+    public partial class ntfPermissions : UserControl\r
+    {\r
+        private UUID taskID;\r
+        private UUID itemID;\r
+        private string objectName;\r
+        private string objectOwner;\r
+        private ScriptPermission questions;\r
+        private RadegastInstance instance;\r
+        private Simulator simulator;\r
+\r
+\r
+        public ntfPermissions(RadegastInstance instance, Simulator simulator, UUID taskID, UUID itemID, string objectName, string objectOwner, ScriptPermission questions)\r
+        {\r
+            InitializeComponent();\r
+\r
+            this.instance = instance;\r
+            this.simulator = simulator;\r
+            this.taskID = taskID;\r
+            this.itemID = itemID;\r
+            this.objectName = objectName;\r
+            this.objectOwner = objectOwner;\r
+            this.questions = questions;\r
+\r
+            txtMessage.BackColor = instance.MainForm.NotificationBackground;\r
+            txtMessage.Text = "Object " + objectName + " ownded by " + objectOwner + " is asking permission to " + questions.ToString() + ". Do you accept?";\r
+\r
+        }\r
+\r
+        private void btnYes_Click(object sender, EventArgs e)\r
+        {\r
+            instance.Client.Self.ScriptQuestionReply(simulator, itemID, taskID, questions);\r
+            instance.MainForm.RemoveNotification(this);\r
+        }\r
+\r
+        private void btnNo_Click(object sender, EventArgs e)\r
+        {\r
+            instance.Client.Self.ScriptQuestionReply(simulator, itemID, taskID, 0);\r
+            instance.MainForm.RemoveNotification(this);\r
+        }\r
+\r
+        private void btnIgnore_Click(object sender, EventArgs e)\r
+        {\r
+            instance.MainForm.RemoveNotification(this);\r
+        }\r
+    }\r
+}\r
@@ -1,82 +1,78 @@
-namespace Radegast\r
+namespace Radegast\r
 {\r
-    partial class ScriptDialog\r
+    partial class ntfScriptDialog\r
     {\r
-        /// <summary>\r
+        /// <summary> \r
         /// Required designer variable.\r
         /// </summary>\r
         private System.ComponentModel.IContainer components = null;\r
 \r
-        /// <summary>\r
+        /// <summary> \r
         /// Clean up any resources being used.\r
         /// </summary>\r
         /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
         protected override void Dispose(bool disposing)\r
         {\r
-            if (disposing && (components != null)) {\r
+            if (disposing && (components != null))\r
+            {\r
                 components.Dispose();\r
             }\r
             base.Dispose(disposing);\r
         }\r
 \r
-        #region Windows Form Designer generated code\r
+        #region Component Designer generated code\r
 \r
-        /// <summary>\r
-        /// Required method for Designer support - do not modify\r
+        /// <summary> \r
+        /// Required method for Designer support - do not modify \r
         /// the contents of this method with the code editor.\r
         /// </summary>\r
         private void InitializeComponent()\r
         {\r
-            this.ignoreBtn = new System.Windows.Forms.Button();\r
-            this.descBox = new System.Windows.Forms.TextBox();\r
             this.btnsPanel = new System.Windows.Forms.Panel();\r
+            this.descBox = new System.Windows.Forms.TextBox();\r
+            this.ignoreBtn = new System.Windows.Forms.Button();\r
             this.SuspendLayout();\r
             // \r
-            // ignoreBtn\r
+            // btnsPanel\r
             // \r
-            this.ignoreBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
-            this.ignoreBtn.Location = new System.Drawing.Point(293, 314);\r
-            this.ignoreBtn.Name = "ignoreBtn";\r
-            this.ignoreBtn.Size = new System.Drawing.Size(75, 23);\r
-            this.ignoreBtn.TabIndex = 0;\r
-            this.ignoreBtn.Text = "&Ignore";\r
-            this.ignoreBtn.UseVisualStyleBackColor = true;\r
-            this.ignoreBtn.Click += new System.EventHandler(this.ignoreBtn_Click);\r
+            this.btnsPanel.Location = new System.Drawing.Point(0, 123);\r
+            this.btnsPanel.Name = "btnsPanel";\r
+            this.btnsPanel.Size = new System.Drawing.Size(287, 112);\r
+            this.btnsPanel.TabIndex = 5;\r
             // \r
             // descBox\r
             // \r
             this.descBox.BackColor = System.Drawing.SystemColors.Control;\r
             this.descBox.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
-            this.descBox.Location = new System.Drawing.Point(6, 3);\r
+            this.descBox.Location = new System.Drawing.Point(3, 3);\r
             this.descBox.Multiline = true;\r
             this.descBox.Name = "descBox";\r
-            this.descBox.Size = new System.Drawing.Size(360, 146);\r
-            this.descBox.TabIndex = 1;\r
+            this.descBox.ReadOnly = true;\r
+            this.descBox.Size = new System.Drawing.Size(284, 114);\r
+            this.descBox.TabIndex = 4;\r
             this.descBox.TabStop = false;\r
             // \r
-            // btnsPanel\r
+            // ignoreBtn\r
             // \r
-            this.btnsPanel.Location = new System.Drawing.Point(6, 155);\r
-            this.btnsPanel.Name = "btnsPanel";\r
-            this.btnsPanel.Size = new System.Drawing.Size(362, 153);\r
-            this.btnsPanel.TabIndex = 2;\r
+            this.ignoreBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\r
+            this.ignoreBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
+            this.ignoreBtn.Location = new System.Drawing.Point(212, 231);\r
+            this.ignoreBtn.Name = "ignoreBtn";\r
+            this.ignoreBtn.Size = new System.Drawing.Size(75, 23);\r
+            this.ignoreBtn.TabIndex = 3;\r
+            this.ignoreBtn.Text = "&Ignore";\r
+            this.ignoreBtn.UseVisualStyleBackColor = true;\r
+            this.ignoreBtn.Click += new System.EventHandler(this.ignoreBtn_Click);\r
             // \r
-            // ScriptDialog\r
+            // ntfScriptDialog\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
-            this.CancelButton = this.ignoreBtn;\r
-            this.ClientSize = new System.Drawing.Size(374, 349);\r
+            this.Controls.Add(this.ignoreBtn);\r
             this.Controls.Add(this.btnsPanel);\r
             this.Controls.Add(this.descBox);\r
-            this.Controls.Add(this.ignoreBtn);\r
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;\r
-            this.MaximizeBox = false;\r
-            this.MinimizeBox = false;\r
-            this.Name = "ScriptDialog";\r
-            this.ShowIcon = false;\r
-            this.Text = "Script Dialog";\r
-            this.TopMost = true;\r
+            this.Name = "ntfScriptDialog";\r
+            this.Size = new System.Drawing.Size(289, 254);\r
             this.ResumeLayout(false);\r
             this.PerformLayout();\r
 \r
@@ -84,8 +80,8 @@ namespace Radegast
 \r
         #endregion\r
 \r
-        private System.Windows.Forms.Button ignoreBtn;\r
-        private System.Windows.Forms.TextBox descBox;\r
         private System.Windows.Forms.Panel btnsPanel;\r
+        private System.Windows.Forms.TextBox descBox;\r
+        private System.Windows.Forms.Button ignoreBtn;\r
     }\r
-}
\ No newline at end of file
+}\r
diff --git a/Radegast/GUI/Notifications/ScriptDialog.cs b/Radegast/GUI/Notifications/ScriptDialog.cs
new file mode 100644 (file)
index 0000000..3e0a51b
--- /dev/null
@@ -0,0 +1,63 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Drawing;\r
+using System.Data;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using OpenMetaverse;\r
+\r
+namespace Radegast\r
+{\r
+    public partial class ntfScriptDialog : UserControl\r
+    {\r
+        RadegastInstance instance;\r
+        UUID objectID;\r
+        int chatChannel;\r
+\r
+        public ntfScriptDialog(RadegastInstance instance, string message, string objectName, UUID imageID, UUID objectID, string firstName, string lastName, int chatChannel, List<string> buttons)\r
+        {\r
+            InitializeComponent();\r
+\r
+            this.instance = instance;\r
+            this.chatChannel = chatChannel;\r
+            this.objectID = objectID;\r
+\r
+            descBox.BackColor = instance.MainForm.NotificationBackground;\r
+            descBox.Text = firstName + " " + lastName + "'s " + objectName + "\r\n\r\n" + message.Replace("\n", "\r\n") + "\r\n";\r
\r
+            int btnWidth = 90;\r
+            int btnHeight = 23;\r
+\r
+            int i = 0;\r
+            foreach (string label in buttons)\r
+            {\r
+                Button b = new Button();\r
+                b.Size = new Size(btnWidth, btnHeight);\r
+                b.Text = label;\r
+                b.Location = new Point(5 + (i % 3) * (btnWidth + 5), btnsPanel.Size.Height - (i / 3) * (btnHeight + 5) - (btnHeight + 5));\r
+                b.Name = i.ToString();\r
+                b.Click += new EventHandler(b_Click);\r
+                b.UseVisualStyleBackColor = true;\r
+                b.Margin = new Padding(0, 3, 0, 3);\r
+                b.Padding = new Padding(0);\r
+                btnsPanel.Controls.Add(b);\r
+                i++;\r
+            }\r
+        }\r
+\r
+        void b_Click(object sender, EventArgs e)\r
+        {\r
+            string label = ((Button)sender).Text;\r
+            int index = int.Parse(((Button)sender).Name);\r
+            instance.Client.Self.ReplyToScriptDialog(chatChannel, index, label, objectID);\r
+            instance.MainForm.RemoveNotification(this);\r
+        }\r
+\r
+        private void ignoreBtn_Click(object sender, EventArgs e)\r
+        {\r
+            instance.MainForm.RemoveNotification(this);\r
+        }\r
+    }\r
+}\r
diff --git a/Radegast/GUI/Notifications/ScriptDialog.resx b/Radegast/GUI/Notifications/ScriptDialog.resx
new file mode 100644 (file)
index 0000000..ff31a6d
--- /dev/null
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+</root>
\ No newline at end of file
index 3a21a9b..86d033b 100644 (file)
     <Compile Include="Core\Tabs\SleekTab.cs" />\r
     <Compile Include="Core\Tabs\SleekTabEvents.cs" />\r
     <Compile Include="Core\Types\CircularList.cs" />\r
+    <Compile Include="Core\Types\TransparentButton.cs">\r
+      <SubType>Component</SubType>\r
+    </Compile>\r
     <Compile Include="Core\WebBrowser2.cs">\r
       <SubType>Component</SubType>\r
     </Compile>\r
     <Compile Include="GUI\Consoles\TabsConsole.Designer.cs">\r
       <DependentUpon>TabsConsole.cs</DependentUpon>\r
     </Compile>\r
-    <Compile Include="GUI\Dialogs\GroupInvitationDialog.cs">\r
-      <SubType>Form</SubType>\r
-    </Compile>\r
-    <Compile Include="GUI\Dialogs\GroupInvitationDialog.Designer.cs">\r
-      <DependentUpon>GroupInvitationDialog.cs</DependentUpon>\r
-    </Compile>\r
     <Compile Include="GUI\Dialogs\GroupsDialog.cs">\r
       <SubType>Form</SubType>\r
     </Compile>\r
     <Compile Include="GUI\Dialogs\Pay.Designer.cs">\r
       <DependentUpon>Pay.cs</DependentUpon>\r
     </Compile>\r
-    <Compile Include="GUI\Dialogs\PermissionsDialog.cs">\r
-      <SubType>Form</SubType>\r
-    </Compile>\r
-    <Compile Include="GUI\Dialogs\PermissionsDialog.Designer.cs">\r
-      <DependentUpon>PermissionsDialog.cs</DependentUpon>\r
-    </Compile>\r
     <Compile Include="GUI\Dialogs\Preferences.cs">\r
       <SubType>Form</SubType>\r
     </Compile>\r
     <Compile Include="GUI\Dialogs\Profile.Designer.cs">\r
       <DependentUpon>Profile.cs</DependentUpon>\r
     </Compile>\r
-    <Compile Include="GUI\Dialogs\ScriptDialog.cs">\r
-      <SubType>Form</SubType>\r
-    </Compile>\r
-    <Compile Include="GUI\Dialogs\ScriptDialog.Designer.cs">\r
-      <DependentUpon>ScriptDialog.cs</DependentUpon>\r
-    </Compile>\r
     <Compile Include="GUI\Dialogs\Teleport.cs">\r
       <SubType>Form</SubType>\r
     </Compile>\r
     <Compile Include="GUI\Notifications\FriendshipOfferNotification.Designer.cs">\r
       <DependentUpon>FriendshipOfferNotification.cs</DependentUpon>\r
     </Compile>\r
+    <Compile Include="GUI\Notifications\GenericNotification.cs">\r
+      <SubType>UserControl</SubType>\r
+    </Compile>\r
+    <Compile Include="GUI\Notifications\GenericNotification.Designer.cs">\r
+      <DependentUpon>GenericNotification.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="GUI\Notifications\GroupInvitationNotification.cs">\r
+      <SubType>UserControl</SubType>\r
+    </Compile>\r
+    <Compile Include="GUI\Notifications\GroupInvitationNotification.Designer.cs">\r
+      <DependentUpon>GroupInvitationNotification.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="GUI\Notifications\PermissionsNotification.cs">\r
+      <SubType>UserControl</SubType>\r
+    </Compile>\r
+    <Compile Include="GUI\Notifications\PermissionsNotification.Designer.cs">\r
+      <DependentUpon>PermissionsNotification.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="GUI\Notifications\ScriptDialog.cs">\r
+      <SubType>UserControl</SubType>\r
+    </Compile>\r
+    <Compile Include="GUI\Notifications\ScriptDialog.Designer.cs">\r
+      <DependentUpon>ScriptDialog.cs</DependentUpon>\r
+    </Compile>\r
     <Compile Include="GUI\Notifications\TeleportNotification.cs">\r
       <SubType>UserControl</SubType>\r
     </Compile>\r
       <SubType>Designer</SubType>\r
       <DependentUpon>MainConsole.cs</DependentUpon>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="GUI\Dialogs\GroupInvitationDialog.resx">\r
-      <DependentUpon>GroupInvitationDialog.cs</DependentUpon>\r
-      <SubType>Designer</SubType>\r
-    </EmbeddedResource>\r
     <EmbeddedResource Include="GUI\Dialogs\GroupsDialog.resx">\r
       <DependentUpon>GroupsDialog.cs</DependentUpon>\r
       <SubType>Designer</SubType>\r
       <SubType>Designer</SubType>\r
       <DependentUpon>Pay.cs</DependentUpon>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="GUI\Dialogs\PermissionsDialog.resx">\r
-      <DependentUpon>PermissionsDialog.cs</DependentUpon>\r
-      <SubType>Designer</SubType>\r
-    </EmbeddedResource>\r
     <EmbeddedResource Include="GUI\Dialogs\Preferences.resx">\r
       <SubType>Designer</SubType>\r
       <DependentUpon>Preferences.cs</DependentUpon>\r
       <SubType>Designer</SubType>\r
       <DependentUpon>Profile.cs</DependentUpon>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="GUI\Dialogs\ScriptDialog.resx">\r
-      <DependentUpon>ScriptDialog.cs</DependentUpon>\r
-      <SubType>Designer</SubType>\r
-    </EmbeddedResource>\r
     <EmbeddedResource Include="GUI\Dialogs\Teleport.resx">\r
       <SubType>Designer</SubType>\r
       <DependentUpon>Teleport.cs</DependentUpon>\r
       <DependentUpon>FriendshipOfferNotification.cs</DependentUpon>\r
       <SubType>Designer</SubType>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="GUI\Notifications\GenericNotification.resx">\r
+      <DependentUpon>GenericNotification.cs</DependentUpon>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="GUI\Notifications\GroupInvitationNotification.resx">\r
+      <DependentUpon>GroupInvitationNotification.cs</DependentUpon>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="GUI\Notifications\PermissionsNotification.resx">\r
+      <DependentUpon>PermissionsNotification.cs</DependentUpon>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="GUI\Notifications\ScriptDialog.resx">\r
+      <DependentUpon>ScriptDialog.cs</DependentUpon>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
     <EmbeddedResource Include="GUI\Notifications\TeleportNotification.resx">\r
       <DependentUpon>TeleportNotification.cs</DependentUpon>\r
       <SubType>Designer</SubType>\r