Beispiel #1
0
 private void UpdateAddinStatus()
 {
     for (int i = 0; i < moduleDT.Rows.Count; i++)
     {
         string name = (string)moduleDT.GetValue("Name", i);
         string type = (string)moduleDT.GetValue("Type", i);
         string status;
         if (type == "AddIn")
         {
             AddinStatus addinStatus = FrameworkAddinManager.GetAddinStatus(name);
             status = (addinStatus == AddinStatus.Running) ? "R" : "S";
         }
         else
         {
             status = "R"; // mark framework as running.
         }
         moduleDT.SetValue("Status", i, status);
     }
 }
Beispiel #2
0
        internal void InstallAddin()
        {
            string addinName = AsmLoader.SaveAddIn(modulePath.Value);

            if (addinName == "Framework")
            {
                if (app.MessageBox(Messages.AdminConfirmReboot, 1, Messages.AdminOK, Messages.AdminCancel) == 1)
                {
                    appEventHandler.Reboot();
                }
            }
            else
            {
                if (FrameworkAddinManager.GetAddinStatus(addinName) == AddinStatus.Running)
                {
                    FrameworkAddinManager.ShutdownAddin(addinName);
                    FrameworkAddinManager.StartAddin(addinName);
                }
                UpdateInstallGrid();
                UpdateLicenseGrid();
                SAPAppender.SilentMode = false;
                Logger.Info(Messages.AdminSuccessInstall);
            }
        }