diff --git a/Source/Core/Editing/CopyPasteManager.cs b/Source/Core/Editing/CopyPasteManager.cs index af5a1665791b84b357e945c3f8bd0957b8180d28..703e5c39e929bf2d15234dc6f43ff4b3abb90539 100644 --- a/Source/Core/Editing/CopyPasteManager.cs +++ b/Source/Core/Editing/CopyPasteManager.cs @@ -19,6 +19,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Runtime.InteropServices; using System.Windows.Forms; using CodeImp.DoomBuilder.Actions; using CodeImp.DoomBuilder.Config; @@ -248,8 +249,19 @@ namespace CodeImp.DoomBuilder.Editing ClipboardStreamWriter writer = new ClipboardStreamWriter(); //mxd writer.Write(copyset, memstream); - // Set on clipboard - Clipboard.SetData(CLIPBOARD_DATA_FORMAT, memstream); + try + { + //mxd. Set on clipboard + DataObject copydata = new DataObject(); + copydata.SetData(CLIPBOARD_DATA_FORMAT, memstream); + Clipboard.SetDataObject(copydata, true, 5, 200); + } + catch(ExternalException) + { + General.Interface.DisplayStatus(StatusType.Warning, "Failed to perform a Clipboard operation..."); + memstream.Dispose(); + return false; + } // Done memstream.Dispose(); diff --git a/Source/Core/Resources/MLogo.png b/Source/Core/Resources/MLogo.png index 6ae0ce316341b7b02bcede6220a953e13e8db416..e46f2d8c199d28a108959c74a5cacbfcbe1bf4a4 100644 Binary files a/Source/Core/Resources/MLogo.png and b/Source/Core/Resources/MLogo.png differ diff --git a/Source/Core/Windows/AboutForm.Designer.cs b/Source/Core/Windows/AboutForm.Designer.cs index 7f2cce3af471c099049f8a7183afaccd11ea55a5..49709801df720bde42cfebef245972774dba8dda 100644 --- a/Source/Core/Windows/AboutForm.Designer.cs +++ b/Source/Core/Windows/AboutForm.Designer.cs @@ -163,9 +163,9 @@ namespace CodeImp.DoomBuilder.Windows // pictureBox4 // this.pictureBox4.Image = global::CodeImp.DoomBuilder.Properties.Resources.MLogo; - this.pictureBox4.Location = new System.Drawing.Point(289, 6); + this.pictureBox4.Location = new System.Drawing.Point(291, 6); this.pictureBox4.Name = "pictureBox4"; - this.pictureBox4.Size = new System.Drawing.Size(88, 80); + this.pictureBox4.Size = new System.Drawing.Size(86, 88); this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.pictureBox4.TabIndex = 16; this.pictureBox4.TabStop = false; @@ -187,9 +187,9 @@ namespace CodeImp.DoomBuilder.Windows // // copyversion // - this.copyversion.Location = new System.Drawing.Point(269, 97); + this.copyversion.Location = new System.Drawing.Point(291, 95); this.copyversion.Name = "copyversion"; - this.copyversion.Size = new System.Drawing.Size(108, 25); + this.copyversion.Size = new System.Drawing.Size(81, 25); this.copyversion.TabIndex = 13; this.copyversion.Text = "Copy Version"; this.copyversion.UseVisualStyleBackColor = true; @@ -199,7 +199,7 @@ namespace CodeImp.DoomBuilder.Windows // this.version.AutoSize = true; this.version.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.version.Location = new System.Drawing.Point(11, 102); + this.version.Location = new System.Drawing.Point(14, 102); this.version.Name = "version"; this.version.Size = new System.Drawing.Size(150, 13); this.version.TabIndex = 11; diff --git a/Source/Core/Windows/AboutForm.cs b/Source/Core/Windows/AboutForm.cs index d8f82912c55d9155c32e57f10ed18355475552b8..b541c0bb758fd36490d8adbf26926d43bd56f38c 100644 --- a/Source/Core/Windows/AboutForm.cs +++ b/Source/Core/Windows/AboutForm.cs @@ -17,6 +17,7 @@ #region ================== Namespaces using System; +using System.Runtime.InteropServices; using System.Windows.Forms; #endregion @@ -60,7 +61,14 @@ namespace CodeImp.DoomBuilder.Windows // This copies the version number to clipboard private void copyversion_Click(object sender, EventArgs e) { - Clipboard.SetDataObject(Application.ProductVersion, true, 5, 200); //mxd + try //mxd + { + Clipboard.SetDataObject(Application.ProductVersion, true, 5, 200); + } + catch(ExternalException) + { + General.Interface.DisplayStatus(StatusType.Warning, "Failed to perform a Clipboard operation..."); + } } } } \ No newline at end of file diff --git a/Source/Core/Windows/ErrorsForm.cs b/Source/Core/Windows/ErrorsForm.cs index c2e884029ae29526f01a6ea8fb1b2eb53a152a38..cad5397e66dba7eb1ca57611f10cb5f91e347411 100644 --- a/Source/Core/Windows/ErrorsForm.cs +++ b/Source/Core/Windows/ErrorsForm.cs @@ -138,7 +138,7 @@ namespace CodeImp.DoomBuilder.Windows //mxd try { - Clipboard.SetDataObject(str.ToString(), true); + Clipboard.SetDataObject(str.ToString(), true, 5, 200); } catch(ExternalException) { diff --git a/Source/Core/Windows/PreferencesForm.Designer.cs b/Source/Core/Windows/PreferencesForm.Designer.cs index 728f1eab757f5efa95155db26344c6ace851390e..7cf7c536ee3261875c0bc61dda55f78856b834d1 100644 --- a/Source/Core/Windows/PreferencesForm.Designer.cs +++ b/Source/Core/Windows/PreferencesForm.Designer.cs @@ -613,11 +613,11 @@ namespace CodeImp.DoomBuilder.Windows // label1 // label1.AutoSize = true; - label1.Location = new System.Drawing.Point(45, 171); + label1.Location = new System.Drawing.Point(41, 171); label1.Name = "label1"; - label1.Size = new System.Drawing.Size(143, 13); + label1.Size = new System.Drawing.Size(145, 13); label1.TabIndex = 20; - label1.Text = "Texture and Flats brightness:"; + label1.Text = "Textures and flats brightness:"; label1.TextAlign = System.Drawing.ContentAlignment.TopRight; // // label18 @@ -667,9 +667,9 @@ namespace CodeImp.DoomBuilder.Windows label29.AutoSize = true; label29.Location = new System.Drawing.Point(90, 356); label29.Name = "label29"; - label29.Size = new System.Drawing.Size(94, 13); + label29.Size = new System.Drawing.Size(93, 13); label29.TabIndex = 38; - label29.Text = "Edge Anti-aliasing:"; + label29.Text = "Edge anti-aliasing:"; label29.TextAlign = System.Drawing.ContentAlignment.TopRight; // // keyusedlabel @@ -1716,11 +1716,11 @@ namespace CodeImp.DoomBuilder.Windows // label32 // this.label32.AutoSize = true; - this.label32.Location = new System.Drawing.Point(45, 134); + this.label32.Location = new System.Drawing.Point(44, 134); this.label32.Name = "label32"; - this.label32.Size = new System.Drawing.Size(143, 13); + this.label32.Size = new System.Drawing.Size(139, 13); this.label32.TabIndex = 44; - this.label32.Text = "Hidden Things transparency:"; + this.label32.Text = "Hidden things transparency:"; this.label32.TextAlign = System.Drawing.ContentAlignment.TopRight; this.toolTip1.SetToolTip(this.label32, "Sets transparency of things hidden \r\nby Things Filter in Things mode"); // diff --git a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.cs b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.cs index 630295259acdc2d27058a717741e4e2aa8c90bdd..fb2d55764255f3770d6f7c0cf99f443f6624228a 100644 --- a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.cs +++ b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.cs @@ -19,6 +19,7 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; using CodeImp.DoomBuilder.Editing; @@ -747,12 +748,20 @@ namespace CodeImp.DoomBuilder.BuilderModes // Get results StringBuilder sb = new StringBuilder(); foreach(ErrorResult result in results.SelectedItems) sb.AppendLine(result.ToString()); + + try + { + //mxd. Set on clipboard + Clipboard.SetDataObject(sb.ToString(), true, 5, 200); - // Set on clipboard - Clipboard.SetDataObject(sb.ToString(), true, 5, 200); //mxd - - // Inform the user - General.Interface.DisplayStatus(StatusType.Info, "Analysis results copied to clipboard."); + // Inform the user + General.Interface.DisplayStatus(StatusType.Info, "Analysis results copied to clipboard."); + } + catch(ExternalException) + { + // Inform the user + General.Interface.DisplayStatus(StatusType.Warning, "Failed to perform a Clipboard operation..."); + } } private void results_KeyUp(object sender, KeyEventArgs e)