public ViewerViewModel( IWindowManager windowManager, ISyncThingManager syncThingManager, IConfigurationProvider configurationProvider, IProcessStartProvider processStartProvider, IApplicationPathsProvider pathsProvider) { this.windowManager = windowManager; this.syncThingManager = syncThingManager; this.processStartProvider = processStartProvider; this.configurationProvider = configurationProvider; this.pathsProvider = pathsProvider; var configuration = this.configurationProvider.Load(); this.zoomLevel = configuration.SyncthingWebBrowserZoomLevel; this.syncThingManager.StateChanged += (o, e) => { this.syncThingState = e.NewState; this.RefreshBrowser(); }; this.callback = new JavascriptCallbackObject(this.OpenFolder); this.Bind(x => x.WebBrowser, (o, e) => { if (e.NewValue != null) this.InitializeBrowser(e.NewValue); }); this.SetCulture(configuration); configurationProvider.ConfigurationChanged += (o, e) => this.SetCulture(e.NewConfiguration); }
public ViewerViewModel( IWindowManager windowManager, ISyncThingManager syncThingManager, IConfigurationProvider configurationProvider, IProcessStartProvider processStartProvider) { this.windowManager = windowManager; this.syncThingManager = syncThingManager; this.processStartProvider = processStartProvider; this.configurationProvider = configurationProvider; var configuration = this.configurationProvider.Load(); this.zoomLevel = configuration.SyncthingWebBrowserZoomLevel; this.syncThingManager.StateChanged += (o, e) => { this.syncThingState = e.NewState; this.RefreshBrowser(); }; this.callback = new JavascriptCallbackObject(this.OpenFolder); this.Bind(x => x.WebBrowser, (o, e) => { if (e.NewValue != null) { this.InitializeBrowser(e.NewValue); } }); this.SetCulture(configuration); configurationProvider.ConfigurationChanged += (o, e) => this.SetCulture(e.NewConfiguration); }
public ViewerViewModel( IWindowManager windowManager, ISyncthingManager syncthingManager, IConfigurationProvider configurationProvider, IProcessStartProvider processStartProvider, IApplicationPathsProvider pathsProvider) { this.windowManager = windowManager; this.syncthingManager = syncthingManager; this.processStartProvider = processStartProvider; this.configurationProvider = configurationProvider; this.pathsProvider = pathsProvider; var configuration = this.configurationProvider.Load(); this.zoomLevel = configuration.SyncthingWebBrowserZoomLevel; this.syncthingManager.StateChanged += this.SyncthingStateChanged; this.callback = new JavascriptCallbackObject(this.OpenFolder, this.BrowseFolderPath); this.SetCulture(configuration); configurationProvider.ConfigurationChanged += this.ConfigurationChanged; }