From: <lk...@us...> - 2007-08-22 11:31:56
|
Revision: 854 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=854&view=rev Author: lkuech Date: 2007-08-22 04:31:52 -0700 (Wed, 22 Aug 2007) Log Message: ----------- On the way to v0.3. Implementatio of a FallbackRule! Modified Paths: -------------- trunk/plugins/ViewModeSwitcher/PlugInBase.cs trunk/plugins/ViewModeSwitcher/Settings.cs trunk/plugins/ViewModeSwitcher/ViewModeSwitcher.cs trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.Designer.cs trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.cs trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.resx trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelper.suo trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/Properties/AssemblyInfo.cs trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/ViewModeSwitcherHelper.suo trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/ViewModeSwitcherHelperTVE2.csproj trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/Properties/AssemblyInfo.cs trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelper.sln trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelper.suo trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelperTVE3.csproj trunk/plugins/ViewModeSwitcher/ViewModeSwitcherRuleDetail.cs Modified: trunk/plugins/ViewModeSwitcher/PlugInBase.cs =================================================================== --- trunk/plugins/ViewModeSwitcher/PlugInBase.cs 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/PlugInBase.cs 2007-08-22 11:31:52 UTC (rev 854) @@ -55,7 +55,7 @@ public int GetWindowId() { - return 4711667; + return -1; } public bool CanEnable() Modified: trunk/plugins/ViewModeSwitcher/Settings.cs =================================================================== --- trunk/plugins/ViewModeSwitcher/Settings.cs 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/Settings.cs 2007-08-22 11:31:52 UTC (rev 854) @@ -32,6 +32,8 @@ public bool verboseLog = false; public bool ShowSwitchMsg = false; public bool SuppressInitialMsg = false; + public bool UseFallbackRule = false; + public Geometry.Type FallBackViewMode = Geometry.Type.Normal; public bool DisableLBGlobaly = false; public int LBCheckInterval = 3000; public bool UpperBoxEnabled = true; @@ -59,6 +61,8 @@ string ParmRulePrefix = "parmrule"; string ParmShowSwitchMsg = "parmshowswitchmsg"; string ParmSuppressInitalMsg = "parmsuppressinitialmsg"; + string ParmUseFallbackRule = "parmusefallbackrule"; + string ParmFallbackViewMode = "parmfallbackviewmode"; string ParmDisableLBGlobaly = "parmdisablelbglobaly"; string ParmLBCheckInterval = "parmlbcheckinterval"; string ParmUpBoxEnabled = "parmupboxenabled"; @@ -79,7 +83,31 @@ string ParmVOffset14_9 = "parmvoffset149"; string ParmVOffsetWide14_9 = "parmvoffsetwide149"; public static string ParmTVChannelPrefix = "parmtvchannelprefix"; - + + public static Geometry.Type StringToViewMode(string strViewmode) + { + Geometry.Type ret = Geometry.Type.Normal; + + switch (strViewmode) + { + case "Zoom": ret = Geometry.Type.Zoom; + break; + case "Normal": ret = Geometry.Type.Normal; + break; + case "Stretch": ret = Geometry.Type.Stretch; + break; + case "Original": ret = Geometry.Type.Original; + break; + case "LetterBox43": ret = Geometry.Type.LetterBox43; + break; + case "PanScan43": ret = Geometry.Type.PanScan43; + break; + case "Zoom14to9": ret = Geometry.Type.Zoom14to9; + break; + } + return ret; + } + /// <summary> /// load settings from MediaPortal configuration /// </summary> @@ -105,24 +133,7 @@ tmpRule.MaxHeight = Convert.ToInt16(reader.GetValueAsString(ViewModeSwitcherSectionName, ParmRulePrefix + i.ToString() + "MaxHeight", "0")); tmpRule.ChangeAR = reader.GetValueAsBool(ViewModeSwitcherSectionName, ParmRulePrefix + i.ToString() + "ChangeAR", true); String tmpViewMode = reader.GetValueAsString(ViewModeSwitcherSectionName, ParmRulePrefix + i.ToString() + "ViewMode", "Normal"); - - switch (tmpViewMode) - { - case "Zoom": tmpRule.ViewMode = Geometry.Type.Zoom; - break; - case "Normal": tmpRule.ViewMode = Geometry.Type.Normal; - break; - case "Stretch": tmpRule.ViewMode = Geometry.Type.Stretch; - break; - case "Original": tmpRule.ViewMode = Geometry.Type.Original; - break; - case "LetterBox43": tmpRule.ViewMode = Geometry.Type.LetterBox43; - break; - case "PanScan43": tmpRule.ViewMode = Geometry.Type.PanScan43; - break; - case "Zoom14to9": tmpRule.ViewMode = Geometry.Type.Zoom14to9; - break; - } + tmpRule.ViewMode = StringToViewMode(tmpViewMode); tmpRule.ChangeOs = reader.GetValueAsBool(ViewModeSwitcherSectionName, ParmRulePrefix + i.ToString() + "ChangeOS", true); tmpRule.OverScan = Convert.ToInt16(reader.GetValueAsString(ViewModeSwitcherSectionName, ParmRulePrefix + i.ToString() + "Overscan", "0")); tmpRule.EnableLBDetection = reader.GetValueAsBool(ViewModeSwitcherSectionName, ParmRulePrefix + i.ToString() + "EnableLBDetection", false); @@ -136,6 +147,9 @@ verboseLog = reader.GetValueAsBool(ViewModeSwitcherSectionName, ParmVerboselog, false); ShowSwitchMsg = reader.GetValueAsBool(ViewModeSwitcherSectionName, ParmShowSwitchMsg, false); SuppressInitialMsg = reader.GetValueAsBool(ViewModeSwitcherSectionName, ParmSuppressInitalMsg, false); + UseFallbackRule = reader.GetValueAsBool(ViewModeSwitcherSectionName, ParmUseFallbackRule, false); + String tmpFallbackViewMode = reader.GetValueAsString(ViewModeSwitcherSectionName, ParmFallbackViewMode, "Normal"); + FallBackViewMode = StringToViewMode(tmpFallbackViewMode); DisableLBGlobaly = reader.GetValueAsBool(ViewModeSwitcherSectionName, ParmDisableLBGlobaly, false); LBCheckInterval = reader.GetValueAsInt(ViewModeSwitcherSectionName, ParmLBCheckInterval, 3000); @@ -173,6 +187,9 @@ xmlwriter.SetValueAsBool(ViewModeSwitcherSectionName, ParmVerboselog, verboseLog); xmlwriter.SetValueAsBool(ViewModeSwitcherSectionName, ParmShowSwitchMsg, ShowSwitchMsg); xmlwriter.SetValueAsBool(ViewModeSwitcherSectionName, ParmSuppressInitalMsg, SuppressInitialMsg); + xmlwriter.SetValueAsBool(ViewModeSwitcherSectionName, ParmUseFallbackRule, UseFallbackRule); + xmlwriter.SetValue(ViewModeSwitcherSectionName, ParmFallbackViewMode, FallBackViewMode.ToString()); + // write ruleset xmlwriter.SetValue(ViewModeSwitcherSectionName, ParmRuleCount, ViewModeRules.Count.ToString()); Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcher.cs =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcher.cs 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcher.cs 2007-08-22 11:31:52 UTC (rev 854) @@ -134,7 +134,8 @@ { if (MenuShown) return; MenuShown = true; - RecentGuiWindowID = GUIWindowManager.ActiveWindow; + //RecentGuiWindowID = GUIWindowManager.RoutedWindow; + //Debug.WriteLine("Rooted: " + RecentGuiWindowID.ToString()); #region MainMenu @@ -168,6 +169,8 @@ #endregion + //Debug.WriteLine("After MainMenu: " + GUIWindowManager.RoutedWindow); + if (Menu.SelectedLabel == -1) return; switch (Menu.SelectedLabel) @@ -260,7 +263,7 @@ private void ShowMenu_WorkCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e) { backgroundMenuWorker.Dispose(); - if (RecentGuiWindowID != 0) GUIWindowManager.RouteToWindow(RecentGuiWindowID); + //if (RecentGuiWindowID != 0) GUIWindowManager.RouteToWindow(RecentGuiWindowID); MenuShown = false; } @@ -438,6 +441,7 @@ && height >= tmpRule.MinHeight && height <= tmpRule.MaxHeight) { + CurrentRule = i; if (AspectRatio != LastSwitchedAspectRatio) { Log.Info("Rule \"" + tmpRule.Name + "\" fits conditions."); @@ -475,11 +479,47 @@ LetterboxActive = false; continue; } - CurrentRule = i; + break; // do not process any additional rule after a rule fits (better for offset function) } } + //process the fallback rule if no other rule has fitted + if (currentSettings.UseFallbackRule && CurrentRule == -1 && height != 100 && width != 100) + { + Log.Info("Processing the fallback rule!"); + if (AspectRatio != LastSwitchedAspectRatio) + { + CropSettings tmpCropSettings = new CropSettings(0, 0, 0, 0); + SetCropMode(tmpCropSettings); + SetAspectRatio("Fallback rule", currentSettings.FallBackViewMode); + LastSwitchedAspectRatio = AspectRatio; + } + } + + // Do something after the rules have been scanned + if (curZoomMode != GUIGraphicsContext.ARType) + { + curZoomMode = GUIGraphicsContext.ARType; + if (currentSettings.verboseLog) Log.Info("The viewmode has been change to {0}", curZoomMode); + SetZoomModeOffset(curZoomMode); + } + + if (TVstatusWrapper.IsViewingTV()) + { + string tmpChannelName = TVstatusWrapper.GetChannelName(); + if (curTVChannelName != tmpChannelName) + { + curTVChannelName = tmpChannelName; + if (currentSettings.verboseLog) Log.Info("The TV channel is now: {0}", curTVChannelName); + + LastSwitchedAspectRatio = 0f; + LastLetterboxDetectionResult = false; + LBDetections = 0; + } + } + else curTVChannelName = ""; + } /// <summary> @@ -730,6 +770,7 @@ msg.Message = GUIMessage.MessageType.GUI_MSG_PLANESCENE_CROP; msg.Object = newCropSettings; GUIWindowManager.SendMessage(msg); + } /// <summary> @@ -799,36 +840,8 @@ { ProcessRules(ARCalc, g_Player.Width, g_Player.Height); // check if a rule fits the conditions and process it } - //else Thread.Sleep(2500); + else Thread.Sleep(2500); - // Do something after the rules have been scanned - if (curZoomMode != GUIGraphicsContext.ARType) - { - curZoomMode = GUIGraphicsContext.ARType; - if (currentSettings.verboseLog) Log.Info("The viewmode has been change to {0}", curZoomMode); - SetZoomModeOffset(curZoomMode); - } - - if (TVstatusWrapper.IsViewingTV()) - { - string tmpChannelName = TVstatusWrapper.GetChannelName(); - if (curTVChannelName != tmpChannelName) - { - curTVChannelName = tmpChannelName; - if (currentSettings.verboseLog) Log.Info("The TV channel is now: {0}", curTVChannelName); - - LastSwitchedAspectRatio = 0f; - LastLetterboxDetectionResult = false; - LBDetections = 0; - - if (IsCurrentChannelViewSpecial()) - { - if (currentSettings.verboseLog) Log.Info("There is a special offset defined for {0} and {1}",curTVChannelName,GUIGraphicsContext.ARType); - SetVisibleWindowPos(GetSpecialChannelOffset(curTVChannelName, GUIGraphicsContext.ARType)); - } - } - } - else curTVChannelName = ""; } PlaybackJustStarted = false; Thread.Sleep(500); @@ -999,8 +1012,13 @@ } } - if (!(LetterboxActive && currentSettings.LBOverScanEnabled && zoomMode == Geometry.Type.Zoom) ) + if (IsCurrentChannelViewSpecial()) { + if (currentSettings.verboseLog) Log.Info("There is a special offset defined for {0} and {1}", curTVChannelName, zoomMode); + tmpOffset = GetSpecialChannelOffset(curTVChannelName, zoomMode); + } + else if(!(LetterboxActive && currentSettings.LBOverScanEnabled && zoomMode == Geometry.Type.Zoom) ) + { if (currentSettings.verboseLog) Log.Info("The offset for zoom mode {0} is {1}", zoomMode, tmpOffset); SetVisibleWindowPos(tmpOffset); } Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.Designer.cs =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.Designer.cs 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.Designer.cs 2007-08-22 11:31:52 UTC (rev 854) @@ -57,6 +57,19 @@ this.bDelete = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.dg_RuleSets = new System.Windows.Forms.DataGridView(); + this.ColEnabled = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.ColRuleName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColARFrom = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColARTo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColMinWidth = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColMaxWidth = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColMinHeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColMaxHeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColChangeAR = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColViewMode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColChangeOS = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColOverscan = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColEnableLBDetect = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.bCancel = new System.Windows.Forms.Button(); this.cbVerboseLog = new System.Windows.Forms.CheckBox(); this.linkLabelForum = new System.Windows.Forms.LinkLabel(); @@ -97,19 +110,8 @@ this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); - this.ColEnabled = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.ColRuleName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColARFrom = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColARTo = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColMinWidth = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColMaxWidth = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColMinHeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColMaxHeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColChangeAR = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColViewMode = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColChangeOS = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColOverscan = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColEnableLBDetect = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.cbUseFallbackRule = new System.Windows.Forms.CheckBox(); + this.cmbViewMode = new System.Windows.Forms.ComboBox(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dg_RuleSets)).BeginInit(); this.groupBox2.SuspendLayout(); @@ -119,7 +121,7 @@ // bOK // this.bOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.bOK.Location = new System.Drawing.Point(738, 435); + this.bOK.Location = new System.Drawing.Point(738, 452); this.bOK.Name = "bOK"; this.bOK.Size = new System.Drawing.Size(44, 23); this.bOK.TabIndex = 1; @@ -131,6 +133,8 @@ // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.cmbViewMode); + this.groupBox1.Controls.Add(this.cbUseFallbackRule); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.cbSuppressInitialMsg); this.groupBox1.Controls.Add(this.cbShowSwitchMsg); @@ -140,7 +144,7 @@ this.groupBox1.Controls.Add(this.dg_RuleSets); this.groupBox1.Location = new System.Drawing.Point(12, 35); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(770, 243); + this.groupBox1.Size = new System.Drawing.Size(770, 273); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; // @@ -149,7 +153,7 @@ this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label1.AutoSize = true; this.label1.ForeColor = System.Drawing.Color.Red; - this.label1.Location = new System.Drawing.Point(3, 219); + this.label1.Location = new System.Drawing.Point(3, 249); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(568, 13); this.label1.TabIndex = 7; @@ -237,10 +241,114 @@ this.dg_RuleSets.Size = new System.Drawing.Size(758, 150); this.dg_RuleSets.TabIndex = 0; // + // ColEnabled + // + this.ColEnabled.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColEnabled.HeaderText = "Enabled"; + this.ColEnabled.Name = "ColEnabled"; + this.ColEnabled.ReadOnly = true; + this.ColEnabled.Width = 52; + // + // ColRuleName + // + this.ColRuleName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColRuleName.HeaderText = "Name"; + this.ColRuleName.Name = "ColRuleName"; + this.ColRuleName.ReadOnly = true; + this.ColRuleName.Width = 60; + // + // ColARFrom + // + this.ColARFrom.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColARFrom.HeaderText = "AR From"; + this.ColARFrom.Name = "ColARFrom"; + this.ColARFrom.ReadOnly = true; + this.ColARFrom.Width = 73; + // + // ColARTo + // + this.ColARTo.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColARTo.HeaderText = "AR To"; + this.ColARTo.Name = "ColARTo"; + this.ColARTo.ReadOnly = true; + this.ColARTo.Width = 63; + // + // ColMinWidth + // + this.ColMinWidth.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColMinWidth.HeaderText = "MinWidth"; + this.ColMinWidth.Name = "ColMinWidth"; + this.ColMinWidth.ReadOnly = true; + this.ColMinWidth.Width = 77; + // + // ColMaxWidth + // + this.ColMaxWidth.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColMaxWidth.HeaderText = "MaxWidth"; + this.ColMaxWidth.Name = "ColMaxWidth"; + this.ColMaxWidth.ReadOnly = true; + this.ColMaxWidth.Width = 80; + // + // ColMinHeight + // + this.ColMinHeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColMinHeight.HeaderText = "MinHeight"; + this.ColMinHeight.Name = "ColMinHeight"; + this.ColMinHeight.ReadOnly = true; + this.ColMinHeight.Width = 80; + // + // ColMaxHeight + // + this.ColMaxHeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColMaxHeight.HeaderText = "MaxHeight"; + this.ColMaxHeight.Name = "ColMaxHeight"; + this.ColMaxHeight.ReadOnly = true; + this.ColMaxHeight.Width = 83; + // + // ColChangeAR + // + this.ColChangeAR.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColChangeAR.HeaderText = "ChangeAR"; + this.ColChangeAR.Name = "ColChangeAR"; + this.ColChangeAR.ReadOnly = true; + this.ColChangeAR.Width = 84; + // + // ColViewMode + // + this.ColViewMode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColViewMode.HeaderText = "ViewMode"; + this.ColViewMode.Name = "ColViewMode"; + this.ColViewMode.ReadOnly = true; + this.ColViewMode.Width = 82; + // + // ColChangeOS + // + this.ColChangeOS.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColChangeOS.HeaderText = "ChangeOS"; + this.ColChangeOS.Name = "ColChangeOS"; + this.ColChangeOS.ReadOnly = true; + this.ColChangeOS.Width = 84; + // + // ColOverscan + // + this.ColOverscan.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColOverscan.HeaderText = "Overscan"; + this.ColOverscan.Name = "ColOverscan"; + this.ColOverscan.ReadOnly = true; + this.ColOverscan.Width = 78; + // + // ColEnableLBDetect + // + this.ColEnableLBDetect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.ColEnableLBDetect.HeaderText = "LB Detection"; + this.ColEnableLBDetect.Name = "ColEnableLBDetect"; + this.ColEnableLBDetect.ReadOnly = true; + this.ColEnableLBDetect.Width = 94; + // // bCancel // this.bCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.bCancel.Location = new System.Drawing.Point(682, 435); + this.bCancel.Location = new System.Drawing.Point(682, 452); this.bCancel.Name = "bCancel"; this.bCancel.Size = new System.Drawing.Size(50, 23); this.bCancel.TabIndex = 0; @@ -303,7 +411,7 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Controls.Add(this.cbLBOverScan); - this.groupBox2.Location = new System.Drawing.Point(12, 294); + this.groupBox2.Location = new System.Drawing.Point(12, 314); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(770, 133); this.groupBox2.TabIndex = 8; @@ -613,7 +721,7 @@ // this.label16.AutoSize = true; this.label16.ForeColor = System.Drawing.Color.Red; - this.label16.Location = new System.Drawing.Point(27, 432); + this.label16.Location = new System.Drawing.Point(27, 452); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(177, 13); this.label16.TabIndex = 32; @@ -623,7 +731,7 @@ // this.label17.AutoSize = true; this.label17.ForeColor = System.Drawing.Color.Red; - this.label17.Location = new System.Drawing.Point(27, 448); + this.label17.Location = new System.Drawing.Point(27, 468); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(73, 13); this.label17.TabIndex = 33; @@ -634,121 +742,38 @@ this.label19.AutoSize = true; this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 28F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label19.ForeColor = System.Drawing.Color.Red; - this.label19.Location = new System.Drawing.Point(10, 424); + this.label19.Location = new System.Drawing.Point(10, 444); this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(32, 44); this.label19.TabIndex = 34; this.label19.Text = "!"; // - // ColEnabled + // cbUseFallbackRule // - this.ColEnabled.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColEnabled.HeaderText = "Enabled"; - this.ColEnabled.Name = "ColEnabled"; - this.ColEnabled.ReadOnly = true; - this.ColEnabled.Width = 52; + this.cbUseFallbackRule.AutoSize = true; + this.cbUseFallbackRule.Location = new System.Drawing.Point(6, 220); + this.cbUseFallbackRule.Name = "cbUseFallbackRule"; + this.cbUseFallbackRule.Size = new System.Drawing.Size(430, 17); + this.cbUseFallbackRule.TabIndex = 8; + this.cbUseFallbackRule.Text = "Automatically use the following viewmode if non of the above mentioned rules does" + + " fit:"; + this.cbUseFallbackRule.UseVisualStyleBackColor = true; + this.cbUseFallbackRule.CheckedChanged += new System.EventHandler(this.cbUseFallbackRule_CheckedChanged); // - // ColRuleName + // cmbViewMode // - this.ColRuleName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColRuleName.HeaderText = "Name"; - this.ColRuleName.Name = "ColRuleName"; - this.ColRuleName.ReadOnly = true; - this.ColRuleName.Width = 60; + this.cmbViewMode.Enabled = false; + this.cmbViewMode.FormattingEnabled = true; + this.cmbViewMode.Location = new System.Drawing.Point(450, 218); + this.cmbViewMode.Name = "cmbViewMode"; + this.cmbViewMode.Size = new System.Drawing.Size(121, 21); + this.cmbViewMode.TabIndex = 9; // - // ColARFrom - // - this.ColARFrom.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColARFrom.HeaderText = "AR From"; - this.ColARFrom.Name = "ColARFrom"; - this.ColARFrom.ReadOnly = true; - this.ColARFrom.Width = 73; - // - // ColARTo - // - this.ColARTo.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColARTo.HeaderText = "AR To"; - this.ColARTo.Name = "ColARTo"; - this.ColARTo.ReadOnly = true; - this.ColARTo.Width = 63; - // - // ColMinWidth - // - this.ColMinWidth.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColMinWidth.HeaderText = "MinWidth"; - this.ColMinWidth.Name = "ColMinWidth"; - this.ColMinWidth.ReadOnly = true; - this.ColMinWidth.Width = 77; - // - // ColMaxWidth - // - this.ColMaxWidth.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColMaxWidth.HeaderText = "MaxWidth"; - this.ColMaxWidth.Name = "ColMaxWidth"; - this.ColMaxWidth.ReadOnly = true; - this.ColMaxWidth.Width = 80; - // - // ColMinHeight - // - this.ColMinHeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColMinHeight.HeaderText = "MinHeight"; - this.ColMinHeight.Name = "ColMinHeight"; - this.ColMinHeight.ReadOnly = true; - this.ColMinHeight.Width = 80; - // - // ColMaxHeight - // - this.ColMaxHeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColMaxHeight.HeaderText = "MaxHeight"; - this.ColMaxHeight.Name = "ColMaxHeight"; - this.ColMaxHeight.ReadOnly = true; - this.ColMaxHeight.Width = 83; - // - // ColChangeAR - // - this.ColChangeAR.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColChangeAR.HeaderText = "ChangeAR"; - this.ColChangeAR.Name = "ColChangeAR"; - this.ColChangeAR.ReadOnly = true; - this.ColChangeAR.Width = 84; - // - // ColViewMode - // - this.ColViewMode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColViewMode.HeaderText = "ViewMode"; - this.ColViewMode.Name = "ColViewMode"; - this.ColViewMode.ReadOnly = true; - this.ColViewMode.Width = 82; - // - // ColChangeOS - // - this.ColChangeOS.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColChangeOS.HeaderText = "ChangeOS"; - this.ColChangeOS.Name = "ColChangeOS"; - this.ColChangeOS.ReadOnly = true; - this.ColChangeOS.Width = 84; - // - // ColOverscan - // - this.ColOverscan.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColOverscan.HeaderText = "Overscan"; - this.ColOverscan.Name = "ColOverscan"; - this.ColOverscan.ReadOnly = true; - this.ColOverscan.Width = 78; - // - // ColEnableLBDetect - // - this.ColEnableLBDetect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.ColEnableLBDetect.HeaderText = "LB Detection"; - this.ColEnableLBDetect.Name = "ColEnableLBDetect"; - this.ColEnableLBDetect.ReadOnly = true; - this.ColEnableLBDetect.Width = 94; - // // ViewModeSwitcherConfig // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(794, 470); + this.ClientSize = new System.Drawing.Size(794, 487); this.Controls.Add(this.groupBox2); this.Controls.Add(this.label17); this.Controls.Add(this.label16); @@ -762,6 +787,7 @@ this.Name = "ViewModeSwitcherConfig"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "ViewModeSwitcherConfig - V0.3"; + this.Load += new System.EventHandler(this.ViewModeSwitcherConfig_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dg_RuleSets)).EndInit(); @@ -837,5 +863,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn ColChangeOS; private System.Windows.Forms.DataGridViewTextBoxColumn ColOverscan; private System.Windows.Forms.DataGridViewTextBoxColumn ColEnableLBDetect; + private System.Windows.Forms.CheckBox cbUseFallbackRule; + private System.Windows.Forms.ComboBox cmbViewMode; } } \ No newline at end of file Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.cs =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.cs 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.cs 2007-08-22 11:31:52 UTC (rev 854) @@ -48,6 +48,8 @@ this.cbVerboseLog.Checked = currentSettings.verboseLog; this.cbShowSwitchMsg.Checked = currentSettings.ShowSwitchMsg; this.cbSuppressInitialMsg.Checked = currentSettings.SuppressInitialMsg; + cbUseFallbackRule.Checked = currentSettings.UseFallbackRule; + cmbViewMode.Text = currentSettings.FallBackViewMode.ToString(); ReBuildDataGrid(); @@ -81,6 +83,8 @@ currentSettings.verboseLog = cbVerboseLog.Checked; currentSettings.ShowSwitchMsg = cbShowSwitchMsg.Checked; currentSettings.SuppressInitialMsg = cbSuppressInitialMsg.Checked; + currentSettings.UseFallbackRule = cbUseFallbackRule.Checked; + currentSettings.FallBackViewMode = ViewModeswitcherSettings.StringToViewMode(cmbViewMode.Text); currentSettings.DisableLBGlobaly = cbDisableLBGlobaly.Checked; currentSettings.LBCheckInterval = (int)uadLBCeckInterval.Value; @@ -199,6 +203,47 @@ } } + private void ViewModeSwitcherConfig_Load(object sender, EventArgs e) + { + cmbViewMode.Items.Clear(); + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + if (xmlreader.GetValueAsBool("mytv", "allowarzoom", true)) + { + cmbViewMode.Items.Add(MediaPortal.GUI.Library.Geometry.Type.Zoom.ToString()); + } + if (xmlreader.GetValueAsBool("mytv", "allowarstretch", true)) + { + cmbViewMode.Items.Add(MediaPortal.GUI.Library.Geometry.Type.Stretch.ToString()); + } + if (xmlreader.GetValueAsBool("mytv", "allowarnormal", true)) + { + cmbViewMode.Items.Add(MediaPortal.GUI.Library.Geometry.Type.Normal.ToString()); + } + if (xmlreader.GetValueAsBool("mytv", "allowaroriginal", true)) + { + cmbViewMode.Items.Add(MediaPortal.GUI.Library.Geometry.Type.Original.ToString()); + } + if (xmlreader.GetValueAsBool("mytv", "allowarletterbox", true)) + { + cmbViewMode.Items.Add(MediaPortal.GUI.Library.Geometry.Type.LetterBox43.ToString()); + } + if (xmlreader.GetValueAsBool("mytv", "allowarpanscan", true)) + { + cmbViewMode.Items.Add(MediaPortal.GUI.Library.Geometry.Type.PanScan43.ToString()); + } + if (xmlreader.GetValueAsBool("mytv", "allowarzoom149", true)) + { + cmbViewMode.Items.Add(MediaPortal.GUI.Library.Geometry.Type.Zoom14to9.ToString()); + } + } + } + private void cbUseFallbackRule_CheckedChanged(object sender, EventArgs e) + { + cmbViewMode.Enabled = cbUseFallbackRule.Checked; + } + + } } \ No newline at end of file Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.resx =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.resx 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcherConfig.resx 2007-08-22 11:31:52 UTC (rev 854) @@ -156,4 +156,43 @@ <metadata name="ColEnableLBDetect.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="ColEnabled.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColRuleName.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColARFrom.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColARTo.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColMinWidth.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColMaxWidth.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColMinHeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColMaxHeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColChangeAR.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColViewMode.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColChangeOS.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColOverscan.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColEnableLBDetect.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> </root> \ No newline at end of file Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelper.suo =================================================================== (Binary files differ) Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/Properties/AssemblyInfo.cs 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/Properties/AssemblyInfo.cs 2007-08-22 11:31:52 UTC (rev 854) @@ -6,7 +6,7 @@ // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, // die mit einer Assembly verknüpft sind. [assembly: AssemblyTitle("ViewModeSwitcherHelper")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Helper based on TVE2")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ViewModeSwitcherHelper")] Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/ViewModeSwitcherHelper.suo =================================================================== (Binary files differ) Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/ViewModeSwitcherHelperTVE2.csproj =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/ViewModeSwitcherHelperTVE2.csproj 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV02/ViewModeSwitcherHelperTVE2.csproj 2007-08-22 11:31:52 UTC (rev 854) @@ -28,16 +28,16 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Core, Version=0.2.2.9991, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\xbmc\bin\Release\Core.dll</HintPath> + <HintPath>..\..\Core\bin\Release\Core.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> - <Reference Include="TVCapture, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="TVCapture, Version=0.2.2.9991, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\xbmc\bin\Release\TVCapture.dll</HintPath> + <HintPath>..\..\TVCapture\bin\Release\TVCapture.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/Properties/AssemblyInfo.cs 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/Properties/AssemblyInfo.cs 2007-08-22 11:31:52 UTC (rev 854) @@ -6,7 +6,7 @@ // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, // die mit einer Assembly verknüpft sind. [assembly: AssemblyTitle("ViewModeSwitcherHelper")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Helper based on TVE3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ViewModeSwitcherHelper")] Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelper.sln =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelper.sln 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelper.sln 2007-08-22 11:31:52 UTC (rev 854) @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ViewModeSwitcherHelperTVE3", "ViewModeSwitcherHelperTVE3.csproj", "{27A85D00-8872-45AE-91D4-E41E0EF1C7B4}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ViewModeSwitcherHelperTVE3", "ViewModeSwitcherHelperTVE3.csproj", "{EBFA5141-09F5-43AB-8B96-9DAA8B725284}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,10 +9,10 @@ Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {27A85D00-8872-45AE-91D4-E41E0EF1C7B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {27A85D00-8872-45AE-91D4-E41E0EF1C7B4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {27A85D00-8872-45AE-91D4-E41E0EF1C7B4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {27A85D00-8872-45AE-91D4-E41E0EF1C7B4}.Release|Any CPU.Build.0 = Release|Any CPU + {EBFA5141-09F5-43AB-8B96-9DAA8B725284}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBFA5141-09F5-43AB-8B96-9DAA8B725284}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBFA5141-09F5-43AB-8B96-9DAA8B725284}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBFA5141-09F5-43AB-8B96-9DAA8B725284}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelper.suo =================================================================== (Binary files differ) Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelperTVE3.csproj =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelperTVE3.csproj 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcherHelperTV03/ViewModeSwitcherHelperTVE3.csproj 2007-08-22 11:31:52 UTC (rev 854) @@ -28,16 +28,16 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Core, Version=0.2.2.9991, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\xbmc\bin\Release\Core.dll</HintPath> + <HintPath>..\..\Core\bin\Release\Core.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> <Reference Include="TvPlugin, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\TV Server 3\TVLibrary\TvPlugin\TvPlugin\bin\Debug\TvPlugin.dll</HintPath> + <HintPath>C:\MediaPortal\MediaPortal\Plugins\Windows\TvPlugin.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> Modified: trunk/plugins/ViewModeSwitcher/ViewModeSwitcherRuleDetail.cs =================================================================== --- trunk/plugins/ViewModeSwitcher/ViewModeSwitcherRuleDetail.cs 2007-08-22 05:26:54 UTC (rev 853) +++ trunk/plugins/ViewModeSwitcher/ViewModeSwitcherRuleDetail.cs 2007-08-22 11:31:52 UTC (rev 854) @@ -112,24 +112,9 @@ currentRule.ChangeAR = cbViewModeSwitchEnabled.Checked; String tmpViewMode = cmbViewMode.Text; - switch (tmpViewMode) - { - case "Zoom": currentRule.ViewMode = Geometry.Type.Zoom; - break; - case "Normal": currentRule.ViewMode = Geometry.Type.Normal; - break; - case "Stretch": currentRule.ViewMode = Geometry.Type.Stretch; - break; - case "Original": currentRule.ViewMode = Geometry.Type.Original; - break; - case "LetterBox43": currentRule.ViewMode = Geometry.Type.LetterBox43; - break; - case "PanScan43": currentRule.ViewMode = Geometry.Type.PanScan43; - break; - case "Zoom14to9": currentRule.ViewMode = Geometry.Type.Zoom14to9; - break; - } + currentRule.ViewMode = ViewModeswitcherSettings.StringToViewMode(tmpViewMode); + currentRule.ChangeOs = cbOverScanEnabled.Checked; currentRule.OverScan = Convert.ToInt16(txbOverScan.Text); currentRule.EnableLBDetection = cb_EnableLBDetection.Checked; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |