public void LoadSettings() { SettingsConfiguration.HomeMaticSettings = new HomeMaticSettings("192.168.0.14"); //SettingsConfiguration.HomeMaticSettings = new HomeMaticSettings("192.168.127.16"); var homeMaticCcu = new Ccu("My HomeMatic", SettingsConfiguration.HomeMaticSettings.Address); App.HomeMaticXmlApi = new HomeMaticXmlApi(homeMaticCcu); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; // Initialize HomeMatic API var ccu = new Ccu("Demo", "192.168.0.14"); HomeMatic = new HomeMaticXmlApi(ccu); }
public HomeMaticXmlApi(Ccu ccu, bool isDemoMode = false, string owner = null) { this.Ccu = ccu; this.IsDemoMode = isDemoMode; _HttpService = new HttpService(); if (IsDemoMode) _HttpService = new MockedHttpService(owner); }