From: <mis...@us...> - 2007-10-15 20:29:05
|
Revision: 1001 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1001&view=rev Author: misterd_sf Date: 2007-10-15 13:28:59 -0700 (Mon, 15 Oct 2007) Log Message: ----------- Added blank screen option to osd library. It seems that it is needed on XP, but on Vista it must be deactivated. Modified Paths: -------------- trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDController.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.Designer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.cs Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDController.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDController.cs 2007-10-15 13:10:06 UTC (rev 1000) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDController.cs 2007-10-15 20:28:59 UTC (rev 1001) @@ -31,6 +31,7 @@ using System.Windows.Forms; using MediaPortal.GUI.Library; using MediaPortal.Player; +using MediaPortal.Configuration; namespace ExternalOSDLibrary { @@ -123,6 +124,11 @@ /// Indicates if MP is minimized /// </summary> private bool _minimized; + + /// <summary> + /// Indicates if the screen should be blanked in fullscreen + /// </summary> + private bool _blankScreen; #endregion #region ctor @@ -150,6 +156,9 @@ _sizeChanged = new EventHandler(parent_SizeChanged); _parentForm.SizeChanged += _sizeChanged; _minimized = false; + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { + _blankScreen = xmlreader.GetValueAsBool("externalOSDLibrary", "blankScreen", true); + } } #endregion @@ -182,7 +191,7 @@ if (update) { Bitmap image = new Bitmap(_osdForm.Width, _osdForm.Height); Graphics graph = Graphics.FromImage(image); - if (GUIGraphicsContext.Fullscreen) { + if (_blankScreen && GUIGraphicsContext.Fullscreen) { graph.FillRectangle(new SolidBrush(Color.FromArgb(0, 0, 0)), new Rectangle(0,0,_osdForm.Size.Width,_osdForm.Size.Height)); } graph.TextRenderingHint = TextRenderingHint.AntiAlias; Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.Designer.cs 2007-10-15 13:10:06 UTC (rev 1000) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.Designer.cs 2007-10-15 20:28:59 UTC (rev 1001) @@ -62,6 +62,9 @@ this.optionalArguments = new System.Windows.Forms.TextBox(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.externalLibGroup = new System.Windows.Forms.GroupBox(); + this.externalOSDLibraryBlank = new System.Windows.Forms.CheckBox(); + this.externalLibGroup.SuspendLayout(); this.SuspendLayout(); // // label35 @@ -182,11 +185,35 @@ this.openFileDialog1.FileName = "openFileDialog1"; this.openFileDialog1.Title = "Select MPlayer:"; // + // externalLibGroup + // + this.externalLibGroup.Controls.Add(this.externalOSDLibraryBlank); + this.externalLibGroup.Location = new System.Drawing.Point(9, 202); + this.externalLibGroup.Name = "externalLibGroup"; + this.externalLibGroup.Size = new System.Drawing.Size(380, 105); + this.externalLibGroup.TabIndex = 77; + this.externalLibGroup.TabStop = false; + this.externalLibGroup.Text = "External OSD Library"; + // + // externalOSDLibraryBlank + // + this.externalOSDLibraryBlank.AutoSize = true; + this.externalOSDLibraryBlank.Checked = true; + this.externalOSDLibraryBlank.CheckState = System.Windows.Forms.CheckState.Checked; + this.externalOSDLibraryBlank.Location = new System.Drawing.Point(6, 31); + this.externalOSDLibraryBlank.Name = "externalOSDLibraryBlank"; + this.externalOSDLibraryBlank.Size = new System.Drawing.Size(345, 30); + this.externalOSDLibraryBlank.TabIndex = 0; + this.externalOSDLibraryBlank.Text = "Blank screen in fullscreen\r\n(If you see black screen in fullscreen, you should tu" + + "rn this option off)"; + this.externalOSDLibraryBlank.UseVisualStyleBackColor = true; + // // GeneralSection // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.Transparent; + this.Controls.Add(this.externalLibGroup); this.Controls.Add(this.label35); this.Controls.Add(this.osdSelect); this.Controls.Add(this.label30); @@ -200,6 +227,8 @@ this.Controls.Add(this.optionalArguments); this.Name = "GeneralSection"; this.Size = new System.Drawing.Size(403, 405); + this.externalLibGroup.ResumeLayout(false); + this.externalLibGroup.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -220,5 +249,7 @@ private System.Windows.Forms.TextBox optionalArguments; private System.Windows.Forms.ToolTip toolTip; private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.GroupBox externalLibGroup; + private System.Windows.Forms.CheckBox externalOSDLibraryBlank; } } Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.cs 2007-10-15 13:10:06 UTC (rev 1000) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.cs 2007-10-15 20:28:59 UTC (rev 1001) @@ -63,6 +63,7 @@ cacheSize.Text = String.Empty; } mplayerPath.Text = xmlreader.GetValueAsString("mplayer", "mplayerPath", "C:\\Program Files\\MPlayer\\MPlayer.exe"); + externalOSDLibraryBlank.Checked = xmlreader.GetValueAsBool("externalOSDLibrary", "blankScreen", true); } } @@ -81,6 +82,7 @@ xmlWriter.SetValue("mplayer", "cacheSize", cacheSize.Text); } xmlWriter.SetValue("mplayer", "mplayerPath", mplayerPath.Text); + xmlWriter.SetValueAsBool("externalOSDLibrary", "blankScreen", externalOSDLibraryBlank.Checked); } } #endregion This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |