Ejemplo n.º 1
0
 protected override void LoadFromIni()
 {
     _apps = Ini.Where(x => x.Value.ContainsKey(@"ACTIVE")).ToDictionary(
         x => x.Key.ToLowerInvariant(),
         x => x.Value.GetBool("ACTIVE", false));
     OnPropertyChanged(nameof(Apps));
     AppActiveStateChanged?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 2
0
        public void SetActivated([NotNull] string appId, bool value)
        {
            if (appId == null)
            {
                throw new ArgumentNullException(nameof(appId));
            }

            _apps[appId.ToLowerInvariant()] = value;
            Save();

            AppActiveStateChanged?.Invoke(this, EventArgs.Empty);
        }
Ejemplo n.º 3
0
 protected override void LoadFromIni()
 {
     _apps = Ini.Where(x => x.Value.ContainsKey(@"ACTIVE")).ToDictionary(
         x => x.Key.ToLowerInvariant(),
         x => x.Value.GetBool("ACTIVE", false));
     OnPropertyChanged(nameof(Apps));
     AppActiveStateChanged?.Invoke(this, EventArgs.Empty);
     if (_fullyLoaded)
     {
         foreach (var app in PythonAppsManager.Instance.Loaded)
         {
             app?.OnActiveChanged();
         }
     }
     _fullyLoaded = true;
 }
Ejemplo n.º 4
0
        public void SetActivated([NotNull] string appId, bool value)
        {
            if (appId == null)
            {
                throw new ArgumentNullException(nameof(appId));
            }

            _apps[appId.ToLowerInvariant()] = value;
            Save();

            AppActiveStateChanged?.Invoke(this, EventArgs.Empty);

            if (_fullyLoaded)
            {
                PythonAppsManager.Instance.GetById(appId)?.OnActiveChanged();
            }
        }