- Timestamp:
- 08/29/13 12:04:58 (11 years ago)
- Location:
- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Dialogs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Dialogs/InfoBox.Designer.cs
r9915 r9916 63 63 // infoRichTextBox 64 64 // 65 this.infoRichTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 66 | System.Windows.Forms.AnchorStyles.Left) 65 this.infoRichTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 66 | System.Windows.Forms.AnchorStyles.Left) 67 67 | System.Windows.Forms.AnchorStyles.Right))); 68 68 this.infoRichTextBox.BackColor = System.Drawing.SystemColors.Control; … … 71 71 this.infoRichTextBox.Name = "infoRichTextBox"; 72 72 this.infoRichTextBox.ReadOnly = true; 73 this.infoRichTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; 73 74 this.infoRichTextBox.Size = new System.Drawing.Size(612, 441); 74 75 this.infoRichTextBox.TabIndex = 1; -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Dialogs/InfoBox.cs
r9915 r9916 63 63 } 64 64 65 protected virtual void LoadEmbeddedResource(string name) { 65 protected virtual void LoadEmbeddedResource(string resourceName) { 66 string extension = Path.GetExtension(resourceName); 66 67 Assembly assembly = Assembly.GetAssembly(ParentView.GetType()); 67 68 try { 68 using (Stream stream = assembly.GetManifestResourceStream(name)) 69 infoRichTextBox.LoadFile(stream, RichTextBoxStreamType.RichText); 69 using (Stream stream = assembly.GetManifestResourceStream(resourceName)) { 70 if (extension == ".rtf") { 71 infoRichTextBox.LoadFile(stream, RichTextBoxStreamType.RichText); 72 } else if (extension == ".txt") { 73 infoRichTextBox.LoadFile(stream, RichTextBoxStreamType.UnicodePlainText); 74 } else { 75 infoRichTextBox.Text = "Error: Unsupported help format: " + extension; 76 } 77 } 70 78 } 71 79 catch (Exception ex) {
Note: See TracChangeset
for help on using the changeset viewer.