Exemplo n.º 1
0
 public DialogContext(DialogType type, IApplicationLicenseKey key, ILicenseProfile profile)
 {
     this.Key = key;
     this.Profile = profile;
     switch (type)
     {
         case DialogType.Steam:
               this.Content = new AddSteamKey();
             break;
         case DialogType.UserNamePassword:
             this.Content = new AddSteamKey(false);
             break;
         case DialogType.Executable:
         case DialogType.Process:
             this.Content = new AddProcessKey();
             break;
         case DialogType.Registry:
             this.Content = new AddRegistryKey();
             break;
         case DialogType.RegistryImport:
             this.Content = new RegistryImportKey();
             break;
         default: break;
     }
 }
Exemplo n.º 2
0
 public override IApplicationLicenseKey GetLicense(ILicenseProfile profile, ref bool additionHandled, Window owner)
 {
     var context = new DialogContext(DialogType.Process, new ProcessLicenseKey(), profile);
     if (context.Display(owner))
     {
         return context.Key;
     }
     else
     {
         return null;
     }
 }
Exemplo n.º 3
0
 public override IApplicationLicenseKey EditLicense(IApplicationLicenseKey key, ILicenseProfile profile, ref bool additionHandled, Window owner)
 {
     var context = new DialogContext(DialogType.UserNamePassword, key, profile);
     if (context.Display(owner))
     {
         return context.Key;
     }
     else
     {
         return null;
     }
 }
Exemplo n.º 4
0
 public override IApplicationLicenseKey GetLicense(ILicenseProfile profile, ref bool additionHandled, Window owner)
 {
     var totalInstances = profile.Licenses.Count;
     return new InstanceKey() { Value = (totalInstances + 1).ToString() };
 }
Exemplo n.º 5
0
 public override IApplicationLicenseKey GetLicense(ILicenseProfile profile, ref bool additionHandled, Window owner)
 {
     var context = new DialogContext(DialogType.Steam, new SteamLicenseKey(), profile);
     return context.Display(owner) ? context.Key : null;
 }
Exemplo n.º 6
0
 public override IApplicationLicenseKey GetLicense(ILicenseProfile profile, ref bool additionHandled, System.Windows.Window owner)
 {
     var context = new DialogContext(DialogType.UserNamePassword, this.GetKeyInstance(), profile);
     if (context.Display(owner))
     {
         return context.Key;
     }
     else
     {
         return null;
     }
 }
Exemplo n.º 7
0
 public virtual IApplicationLicenseKey EditLicense(IApplicationLicenseKey key, ILicenseProfile profile, ref bool additionHandled, Window owner)
 {
     return(null);
 }