Пример #1
0
        public void ApplyFeature(SolutionFolder parentCombine, SolutionItem entry, Widget ed)
        {
            AddinFeatureWidget editor = (AddinFeatureWidget)ed;
            AddinData          data   = AddinData.EnableAddinAuthoringSupport((DotNetProject)entry);

            DotNetProject project = (DotNetProject)entry;

            if (editor.HasRegistryInfo)
            {
                project.GetAddinData().ApplicationName = editor.ApplicationName;
            }

            AddinDescription desc = data.LoadAddinManifest();

            if (editor.AddinId.Length > 0)
            {
                desc.LocalId = editor.AddinId;
            }
            if (editor.AddinName.Length > 0)
            {
                desc.Name = editor.AddinName;
            }
            desc.Namespace = editor.AddinNamespace;
            desc.IsRoot    = project.CompileTarget != CompileTarget.Library || editor.IsRoot;
            desc.Version   = "1.0";
            desc.Save();
            data.NotifyChanged();
        }
Пример #2
0
        internal static void RemoveReferences(AddinData data, string[] fullIds)
        {
            AddinDescription     desc = data.LoadAddinManifest();
            AddinDescriptionView view = FindLoadedDescription(data);

            foreach (string ad in fullIds)
            {
                RemoveReference(desc, ad);
                if (view != null)
                {
                    RemoveReference(view.AddinDescription, ad);
                }
            }
            if (view != null)
            {
                view.Update();
                view.BeginInternalUpdate();
            }

            try {
                desc.Save();
                data.NotifyChanged(true);
            } finally {
                if (view != null)
                {
                    view.EndInternalUpdate();
                }
            }
        }
 public override void Save()
 {
     descWidget.Save();
     AddinAuthoringService.SaveFormatted(adesc);
     IsDirty = false;
     data.NotifyChanged(true);
 }
Пример #4
0
 public void NotifyChanged()
 {
     foreach (DotNetProject p in solution.GetAllSolutionItems <DotNetProject> ())
     {
         AddinData data = p.GetAddinData();
         if (data != null)
         {
             data.NotifyChanged(false);
         }
     }
 }
Пример #5
0
        internal static void RemoveReferences(AddinData data, string[] fullIds)
        {
            AddinDescription desc = data.CachedAddinManifest;

            foreach (string ad in fullIds)
            {
                RemoveReference(desc, ad);
            }

            data.SaveAddinManifest();
            data.NotifyChanged(false);
        }
Пример #6
0
        internal static void AddReferences(AddinData data, object[] addins)
        {
            AddinDescription desc = data.CachedAddinManifest;

            foreach (Addin ad in addins)
            {
                AddReference(desc, ad);
            }

            data.SaveAddinManifest();
            data.NotifyChanged(false);
        }
		internal static void RemoveReferences (AddinData data, string[] fullIds)
		{
			AddinDescription desc = data.LoadAddinManifest ();
			AddinDescriptionView view = FindLoadedDescription (data);
			foreach (string ad in fullIds) {
				RemoveReference (desc, ad);
				if (view != null)
					RemoveReference (view.AddinDescription, ad);
			}
			if (view != null) {
				view.Update ();
				view.BeginInternalUpdate ();
			}
			
			try {
				desc.Save ();
				data.NotifyChanged (true);
			} finally {
				if (view != null)
					view.EndInternalUpdate ();
			}
		}
Пример #8
0
		internal static void RemoveReferences (AddinData data, string[] fullIds)
		{
			AddinDescription desc = data.CachedAddinManifest;
			foreach (string ad in fullIds)
				RemoveReference (desc, ad);
			
			data.SaveAddinManifest ();
			data.NotifyChanged (false);
		}
Пример #9
0
		internal static void AddReferences (AddinData data, object[] addins)
		{
			AddinDescription desc = data.CachedAddinManifest;
			foreach (Addin ad in addins)
				AddReference (desc, ad);
			
			data.SaveAddinManifest ();
			data.NotifyChanged (false);
		}