Exemple #1
0
 private void UpdateConfig(byte[] config)
 {
     using (var stream = new MemoryStream(config))
     {
         BinaryFormatter binaryFormatter = new BinaryFormatter()
         {
             Binder = new ExecutingAssemblyBinder()
         };
         speedoConfig = (SpeedoConfig)binaryFormatter.Deserialize(stream);
     }
     speedoConfigUpdated = true;
 }
Exemple #2
0
 public void UpdateConfig(SpeedoConfig speedoConfig)
 {
     enabled     = speedoConfig.Enabled;
     speedoScale = speedoConfig.Scale;
     speedoPos   = new Vector2(speedoConfig.PosX, speedoConfig.PosY);
     maxOpacity  = speedoConfig.Opacity;
     if (theme != speedoConfig.Theme)
     {
         theme = speedoConfig.Theme;
         this.Dispose();
     }
     if (!loaded)
     {
         this.Load();
     }
 }