Exemplo n.º 1
0
 public ActiveExtensions GetMirrorPreset()
 {
     Guid[] processors = { ScreenshotProcesor };
     ActiveExtensions result = new ActiveExtensions(ScreenDriverCoupler, ScreenGrabber, processors, Empty, Empty);
     result.Init(lib);
     return result;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="id"></param>
 /// <param name="extensions"></param>
 public ExtensionInstance(int id, ActiveExtensions extensions)
 {
     this.id = id;
     AttachObserver(LoggerHelper.GetInstance());
     Extensions = extensions;
     UpdateExtensionsDevId();
 }
Exemplo n.º 3
0
 public ActiveExtensions GetSinFadePreset()
 {
     ActiveExtensions result = new ActiveExtensions(SinDriver, Guid.Empty, Empty, Empty, Empty);
     result.Init(lib);
     return result;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create an ExtensionInstance for the specified id and mode
 /// </summary>
 /// <param name="id"></param>
 /// <param name="preset"></param>
 /// <returns></returns>
 public ExtensionInstance CreateInstance(int id, MODE preset) {
     ActiveExtensions actives;
     switch(preset) {
         case MODE.HSV:
             actives = PresetBuilder.GetHSVFadePreset();
             break;
         case MODE.SIN:
             actives = PresetBuilder.GetSinFadePreset();
             break;
         case MODE.NEON:
             actives = PresetBuilder.GetNeonFadePreset();
             break;
         case MODE.MIRROR://Both use same extensions, just different settings
         case MODE.SMOOTH:
             actives = PresetBuilder.GetMirrorPreset();
             break;
         case MODE.AUGMENT:
             actives = PresetBuilder.GetAugmentMirrorPreset();
             break;
         case MODE.GAME:
             actives = PresetBuilder.GetGameMirrorPreset();
             break;
         case MODE.EMPTY:
         default:
             actives = new ActiveExtensions();
             break;
     }
     ExtensionInstance instance = new ExtensionInstance(id, actives);
     instance.AttachObserver((AntumbraColorObserver)this);
     return instance;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Load the Serialized ActiveExtensions info
 /// Note: The ExtensionInstance cannot be used until InitActives() is called
 /// </summary>
 public void Load()
 {
     Stop();
     Dispose();
     Saver saver = Saver.GetInstance();
     Extensions = (ActiveExtensions)saver.Load(SAVE_FILE_PREFIX + id);
 }