Example #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;
     }
 }
Example #2
0
 /// <summary>
 /// Creates new ApplicationLicense instance.
 /// </summary>
 /// <param name="key">License key.</param>
 public ApplicationLicense(IApplicationLicenseKey key)
 {
     if (key != null)
     {
         this.Key = key;
     }
     else
     {
         throw new ArgumentNullException("Key", "License key may not be null.");
     }
 }
Example #3
0
 public override IApplicationLicenseKey EditLicense(IApplicationLicenseKey key, ILicenseProfile profile, ref bool additionHandled, Window owner)
 {
     var context = new DialogContext(DialogType.Process, key, profile);
     if (context.Display(owner))
     {
         return context.Key;
     }
     else
     {
         return null;
     }
 }
Example #4
0
 public override IApplicationLicenseKey EditLicense(IApplicationLicenseKey key, ILicenseProfile profile, ref bool additionHandled, Window owner)
 {
     var context = new DialogContext(DialogType.Steam, key, profile);
     return context.Display(owner) ? context.Key : null;
 }
Example #5
0
 public virtual IApplicationLicenseKey EditLicense(IApplicationLicenseKey key, ILicenseProfile profile, ref bool additionHandled, Window owner)
 {
     return(null);
 }