Пример #1
0
 public Settings( )
 {
     Window = new WindowSettings ( );
     Proxy = new ProxyInfo ( );
     Proxy.Enabled = false;
     WarnWhenNoAdbRoot = true;
     // monitor the settings file and reload when it changes
     FileSystemWatcher watcher = new FileSystemWatcher ( Settings.SettingsFile.DirectoryName, Settings.SettingsFile.Name );
     watcher.NotifyFilter = NotifyFilters.LastWrite;
     watcher.Changed += delegate ( object sender, FileSystemEventArgs e ) {
         try {
             this.Reload ( );
         } catch ( Exception ex ) {
             this.LogWarn ( ex.Message, ex );
         }
     };
     watcher.EnableRaisingEvents = true;
     PluginSettings = new PluginSettings ( );
 }
Пример #2
0
        public Settings( )
        {
            Window            = new WindowSettings( );
            Proxy             = new ProxyInfo( );
            Proxy.Enabled     = false;
            WarnWhenNoAdbRoot = true;
            // monitor the settings file and reload when it changes
            FileSystemWatcher watcher = new FileSystemWatcher(Settings.SettingsFile.DirectoryName, Settings.SettingsFile.Name);

            watcher.NotifyFilter = NotifyFilters.LastWrite;
            watcher.Changed     += delegate(object sender, FileSystemEventArgs e) {
                try {
                    this.Reload( );
                } catch (Exception ex) {
                    this.LogWarn(ex.Message, ex);
                }
            };
            watcher.EnableRaisingEvents = true;
            PluginSettings = new PluginSettings( );
        }