Ejemplo n.º 1
0
        public CecSettings()
        {
            // Read MediaPortal config
            _config = new CecConfig();

            try
            {
                _config.ReadConfig();
            }
            catch (Exception exp)
            {
                MessageBox.Show("Error while reading configuration from MediaPortal.xml" + exp.ToString());
            }

            InitializeComponent();

            AddBindings();
        }
Ejemplo n.º 2
0
    public CecSettings()
    {
      // Read MediaPortal config 
      _config = new CecConfig();

      try
      {
        _config.ReadConfig();
      }
      catch (Exception exp)
      {
        MessageBox.Show("Error while reading configuration from MediaPortal.xml" + exp.ToString());
      }

      InitializeComponent();

      AddBindings();
      
    }
Ejemplo n.º 3
0
        private void PrepareClient()
        {
            if (_client == null)
            {
                _client = new CecRemoteClient();
            }
            if (_config == null)
            {
                _config = new CecConfig();

                try
                {
                    _config.ReadConfig();
                    _client.SetConfig(_config);
                }
                catch (Exception ex)
                {
                    Log.Error("CecRemote: Error while reading config. " + ex.ToString());
                    // Defaults will be used automatically if config reading fails, so we can still try to connect.
                }
            }
        }
Ejemplo n.º 4
0
 private void PrepareClient()
 {
   if (_client == null)
   {
     _client = new CecRemoteClient();
   }
   if (_config == null)
   {
     _config = new CecConfig();
     
     try
     {
       _config.ReadConfig();
       _client.SetConfig(_config);
     }
     catch (Exception ex)
     {
       Log.Error("CecRemote: Error while reading config. " + ex.ToString());
       // Defaults will be used automatically if config reading fails, so we can still try to connect.
     }
   }
 }