コード例 #1
0
        static void OnLoadUserPrefs(object s, UserPreferencesEventArgs args)
        {
            XmlElement elem = args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService.Breakpoints");

            if (elem == null)
            {
                elem = args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService");
            }

            if (elem != null)
            {
                lock (breakpoints)
                    breakpoints.Load(elem);
            }

            PinnedWatchStore wstore = args.Properties.GetValue <PinnedWatchStore> ("MonoDevelop.Ide.DebuggingService.PinnedWatches");

            if (wstore != null)
            {
                pinnedWatches.LoadFrom(wstore);
            }

            lock (breakpoints)
                pinnedWatches.BindAll(breakpoints);
        }
コード例 #2
0
 internal void LoadFrom(PinnedWatchStore store)
 {
     try
     {
         BeginBatchUpdate();
         lock (watches)
         {
             List <PinnedWatch> ws = new List <PinnedWatch> (watches);
             watches.Clear();
             foreach (PinnedWatch watch in ws)
             {
                 watch.Store = null;
                 OnWatchRemoved(watch);
             }
             foreach (PinnedWatch watch in store.watches)
             {
                 watch.Store = this;
                 watches.Add(watch);
                 OnWatchAdded(watch);
             }
         }
         OnChanged();
     }
     finally
     {
         EndBatchUpdate();
     }
 }
コード例 #3
0
        static Task OnLoadUserPrefs(object s, UserPreferencesEventArgs args)
        {
            var elem = args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService.Breakpoints") ?? args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService");

            if (elem != null)
            {
                lock (breakpoints)
                    breakpoints.Load(elem);
            }

            PinnedWatchStore wstore = args.Properties.GetValue <PinnedWatchStore> ("MonoDevelop.Ide.DebuggingService.PinnedWatches");

            if (wstore != null)
            {
                pinnedWatches.LoadFrom(wstore);
            }

            lock (breakpoints)
                pinnedWatches.BindAll(breakpoints);

            return(Task.FromResult(true));
        }
コード例 #4
0
		internal void LoadFrom (PinnedWatchStore store)
		{
			try {
				BeginBatchUpdate ();
				lock (watches) {
					List<PinnedWatch> ws = new List<PinnedWatch> (watches);
					watches.Clear ();
					foreach (PinnedWatch watch in ws) {
						watch.Store = null;
						OnWatchRemoved (watch);
					}
					foreach (PinnedWatch watch in store.watches) {
						watch.Store = this;
						watches.Add (watch);
						OnWatchAdded (watch);
					}
				}
				OnChanged ();
			} finally {
				EndBatchUpdate ();
			}
		}