Beispiel #1
0
 public void ShowPlugin()
 {
     using (Settings xmlwriter = new MPSettings())
     {
         SetupForm setupForm = new SetupForm();
         setupForm.ServerSettings = PluginMain.LoadServerSettings();
         setupForm.NoClientStandbyWhenNotHome = PluginMain.NoClientStandbyWhenNotHome;
         setupForm.PreferRtspForLiveTv = PluginMain.PreferRtspForLiveTv;
         setupForm.PlayRecordingsOverRtsp = PluginMain.PlayRecordingsOverRtsp;
         setupForm.AutoStreamingMode = PluginMain.AutoStreamingMode;
         setupForm.DisableRadio = PluginMain.DisableRadio;
         if (setupForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             xmlwriter.SetValue(_settingSection, SettingName.Server, setupForm.ServerSettings.ServerName);
             xmlwriter.SetValue(_settingSection, SettingName.TcpPort, setupForm.ServerSettings.Port);
             xmlwriter.SetValue(_settingSection, SettingName.MacAddresses, setupForm.ServerSettings.WakeOnLan.MacAddresses);
             xmlwriter.SetValue(_settingSection, SettingName.IPAddress, setupForm.ServerSettings.WakeOnLan.IPAddress);
             xmlwriter.SetValueAsBool(_settingSection, SettingName.UseWakeOnLan, setupForm.ServerSettings.WakeOnLan.Enabled);
             xmlwriter.SetValue(_settingSection, SettingName.WakeOnLanTimeoutSeconds, setupForm.ServerSettings.WakeOnLan.TimeoutSeconds);
             xmlwriter.SetValueAsBool(_settingSection, SettingName.NoClientStandbyWhenNotHome, setupForm.NoClientStandbyWhenNotHome);
             xmlwriter.SetValueAsBool(_settingSection, SettingName.AvoidRtspForLiveTv, !setupForm.PreferRtspForLiveTv);
             xmlwriter.SetValueAsBool(_settingSection, SettingName.PlayRecordingsOverRtsp, setupForm.PlayRecordingsOverRtsp);
             xmlwriter.SetValueAsBool(_settingSection, SettingName.AutoStreamingMode, setupForm.AutoStreamingMode);
             xmlwriter.SetValueAsBool(_settingSection, SettingName.IsSingleSeat, setupForm.IsSingleSeat);
             xmlwriter.SetValueAsBool(_settingSection, SettingName.DisableRadio, setupForm.DisableRadio);
             PluginMain.ClearCachedBooleanSettings();
         }
     }
 }