Beispiel #1
0
        public void InitForUninstall(Addin[] info)
        {
            this.uninstallIds = info.Select(a => a.Id);
            buttonOk.Label    = Catalog.GetString("Uninstall");

            HashSet <Addin> sinfos = new HashSet <Addin> ();

            StringBuilder sb = new StringBuilder();

            sb.Append("<b>").Append(Catalog.GetString("The following packages will be uninstalled:")).Append("</b>\n\n");
            foreach (var a in info)
            {
                sb.Append(a.Name + "\n\n");
                sinfos.UnionWith(service.GetDependentAddins(a.Id, true));
            }

            if (sinfos.Count > 0)
            {
                sb.Append("<b>").Append(Catalog.GetString("There are other add-ins that depend on the previous ones which will also be uninstalled:")).Append("</b>\n\n");
                foreach (Addin si in sinfos)
                {
                    sb.Append(si.Description.Name + "\n");
                }
            }

            ShowMessage(sb.ToString());
//			Services.PlaceDialog (this, TransientFor);
        }
Beispiel #2
0
        public void SetUninstallMode(AddinHeader info)
        {
            btnPrev.Hide();
            btnNext.Sensitive = true;

            uninstallId = info.Id;
            wizardNotebook.CurrentPage = 1;

            StringBuilder sb = new StringBuilder();

            sb.Append("<b>").Append(Catalog.GetString("The following packages will be uninstalled:")).Append("</b>\n\n");
            sb.Append(info.Name + "\n\n");

            Addin[] sinfos = service.GetDependentAddins(info.Id, true);
            if (sinfos.Length > 0)
            {
                sb.Append("<b>").Append(Catalog.GetString("There are other extensions that depend on the previous ones which will also be uninstalled:")).Append("</b>\n\n");
                foreach (Addin si in sinfos)
                {
                    sb.Append(si.Description.Name + "\n");
                }
            }

            labelSummary.Markup = sb.ToString();
        }