public void NewLicenses(List <InstalledApplication> aForApplications)
        {
            // Create a new license and then call the license form to define it
            ApplicationLicense newLicense = new ApplicationLicense();

            FormLicenseProperties form = new FormLicenseProperties("Multiple Applications", newLicense);

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ApplicationLicense lNewApplicationLicense = form.GetLicense;
                foreach (InstalledApplication lForApplication in aForApplications)
                {
                    lNewApplicationLicense.LicenseID       = 0;
                    lNewApplicationLicense.ApplicationID   = lForApplication.ApplicationID;
                    lNewApplicationLicense.ApplicationName = lForApplication.Name;
                    lNewApplicationLicense.Add();

                    // Update this installed application with the new license
                    lForApplication.LoadData();
                }

                // The license will have been added to the application already so we simply refresh the views
                workItem.ExplorerView.RefreshView();
                workItem.GetActiveTabView().RefreshView();

                ILaytonView applicationsTabView = WorkItem.Items[Layton.Cab.Interface.ViewNames.MainTabView] as ILaytonView;
                ((ApplicationsTabView)applicationsTabView).Presenter.DisplayPublishers();
            }
        }
        private void EditApplicationLicense(ApplicationLicense theLicense, InstalledOS aSelectedOS)
        {
            FormLicenseProperties form = new FormLicenseProperties(aSelectedOS.Name, theLicense);

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                aSelectedOS.LoadData();

                // The license will have been added to the application already so we simply refresh the active tab view
                workItem.ExplorerView.RefreshView();
                workItem.GetActiveTabView().RefreshView();
            }
        }
        /// <summary>
        /// Called to allow a new application license to be defined
        /// Note that this is only applicable if we are displaying the LicenseTabView or have selected an
        /// application in the explorer view
        /// </summary>
        /// <param name="theApplication"></param>
        public void NewLicense(InstalledOS aOS)
        {
            // Create a new license and then call the license form to define it
            ApplicationLicense newLicense = new ApplicationLicense();

            newLicense.ApplicationID   = aOS.OSid;
            newLicense.ApplicationName = aOS.Name;
            //
            FormLicenseProperties form = new FormLicenseProperties(aOS.Name, newLicense);

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                // Update this installed application with the new license
                aOS.LoadData();

                // The license will have been added to the application already so we simply refresh the views
                //workItem.ExplorerView.RefreshView();
                workItem.GetActiveTabView().RefreshView();

                //ILaytonView applicationsTabView = WorkItem.Items[Layton.Cab.Interface.ViewNames.MainTabView] as ILaytonView;
                //((ApplicationsTabView)applicationsTabView).Presenter.DisplayPublishers();
            }
        }