public static ApplicationController FromString(CECController controller, CECSettings settings, string serialisedConfig)
    {
      var splitString = serialisedConfig.Split(';');
      if (splitString.Length != 4)
        throw new InvalidDataException("incorrect number of parameters");

      return new ApplicationController(controller, splitString[0], splitString[1], splitString[2], splitString[3]);
    }
Exemple #2
0
 public WMCController(CECSettings settings)
     : base(settings,
    Resources.application_windows_media_center,
    "ehshell",
    "ehshell.exe",
    Environment.GetFolderPath(Environment.SpecialFolder.System) + @"\..\ehome")
 {
     IsInternal = true;
 }
 public ApplicationController(CECSettings settings, string uiName, string processName, string filename, string workingDirectory)
 {
     Settings = settings;
       UiName = uiName;
       ProcessName = processName;
       ApplicationFilename = filename;
       ApplicationWorkingDirectory = workingDirectory;
       SuppressApplicationStart = false;
       IsInternal = false;
 }
Exemple #4
0
        public ConfigureApplication(CECSettings settings, CECController controller)
        {
            _cecController = controller;
              _settings = settings;
              InitializeComponent();

              // take the icon of the main window
              ComponentResourceManager resources = new ComponentResourceManager(typeof(CECTray));
              Icon = resources.GetObject("$this.Icon") as Icon;

              Text = Resources.add_new_application;
        }
Exemple #5
0
        public XBMCController(CECSettings settings)
            : base(settings,
           Resources.application_xbmc,
           "XBMC",
           "XBMC.exe",
           Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\XBMC")
        {
            IsInternal = true;
              AutoStartApplication.Value = false;
              ControlApplication.Value = false;

              LoadXMLConfiguration();

              ApplicationRunningChanged += RunningChanged;
        }
Exemple #6
0
 /// <summary>
 /// Replaces the gui controls by the ones that are bound to the settings.
 /// this is a fugly way to do it, but the gui designer doesn't allow us to ref CECSettings, since it uses symbols from LibCecSharp
 /// </summary>
 public void InitialiseSettingsComponent(CECSettings settings)
 {
     settings.WakeDevices.ReplaceControls(this, Configuration.Controls, lWakeDevices, cbWakeDevices);
       settings.PowerOffDevices.ReplaceControls(this, Configuration.Controls, lPowerOff, cbPowerOffDevices);
       settings.OverridePhysicalAddress.ReplaceControls(this, Configuration.Controls, cbOverrideAddress);
       settings.OverrideTVVendor.ReplaceControls(this, Configuration.Controls, cbVendorOverride);
       settings.PhysicalAddress.ReplaceControls(this, Configuration.Controls, tbPhysicalAddress);
       settings.HDMIPort.ReplaceControls(this, Configuration.Controls, lPortNumber, cbPortNumber);
       settings.ConnectedDevice.ReplaceControls(this, Configuration.Controls, lConnectedDevice, cbConnectedDevice);
       settings.ActivateSource.ReplaceControls(this, Configuration.Controls, cbActivateSource);
       settings.DeviceType.ReplaceControls(this, Configuration.Controls, lDeviceType, cbDeviceType);
       settings.TVVendor.ReplaceControls(this, Configuration.Controls, cbVendorId);
       settings.StartHidden.ReplaceControls(this, Configuration.Controls, cbStartMinimised);
       settings.StopTvStandby.ReplaceControls(this, Configuration.Controls, cbStopTvStandby);
 }