aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Graphics/arrow-long-down.png
blob: e3a8623993d6c212f313a67f79c783b443ddcd61 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 a7 00 00 01 f4 08 06 00 00 00 58 7b 3d .PNG........IHDR.............X{=
0020 01 00 00 00 01 73 52 47 42 00 ae ce 1c e9 00 00 00 04 67 41 4d 41 00 00 b1 8f 0b fc 61 05 00 00 .....sRGB.........gAMA......a...
0040 00 09 70 48 59 73 00 00 0e c3 00 00 0e c3 01 c7 6f a8 64 00 00 00 07 74 49 4d 45 07 d9 0c 10 15 ..pHYs..........o.d....tIME.....
0060 01 26 bd f7 88 fe 00 00 00 19 74 45 58 74 53 6f 66 74 77 61 72 65 00 70 61 69 6e 74 2e 6e 65 74 .&........tEXtSoftware.paint.net
0080 20 34 2e 30 2e 31 37 33 6e 9f 63 00 00 0a 8e 49 44 41 54 78 5e ed dd 67 88 64 69 19 86 e1 31 c7 .4.0.173n.c....IDATx^..g.di...1.
00a0 35 67 45 77 d5 35 47 0c 88 22 a2 88 39 8b 8a 39 22 82 08 22 26 44 4c 88 39 21 22 82 88 3f 44 74 5gEw.5G.."..9..9".."&DL.9!"..?Dt
00c0 15 73 16 73 42 44 30 e7 9c 15 cc d9 35 be af ce 48 4f ef 37 5d dd 5d e9 a9 3a d7 05 0f db b3 3b .s.sBD0.....5...HO.7].]..:.....;
00e0 dd d3 5d 75 f7 50 df 99 c3 ce 11 20 cf 29 b5 7b 6e c0 4e aa 31 31 0f a9 fd 3b 7c ff aa 9d 5a 63 ..]u.P.......).{n.N.11...;|...Zc
0100 62 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 b.I,q.K...'..I,q.K...'..I,q.K...
0120 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 '..I,q.K...'..I,q.K...'..I,q.K..
0140 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c .'..I,q.K...'..I,q.K...'..I,q.K.
0160 c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b ..'..I,q.K...'..I,q.K...'..I,q.K
0180 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 ...'..I,q.K...'..I,q.K...'..I,q.
01a0 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 K...'..I,q.K...'..I,q.K...'..I,q
01c0 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c .K...'..I,q.K...'..I,q.K...'..I,
01e0 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 q.K...'..I,q.K...'..I,q.K...'..I
0200 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 49 2c 71 12 4b 9c c4 12 27 b1 c4 ,q.K...'..I,q.K...'..I,q.K...'..
0220 49 2c 71 12 4b 9c c4 12
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)

using System;
using System.Diagnostics;
using System.Windows;

namespace Tango.Scripting.Editors.Utils
{
	/// <summary>
	/// WeakEventManager with AddListener/RemoveListener and CurrentManager implementation.
	/// Helps implementing the WeakEventManager pattern with less code.
	/// </summary>
	public abstract class WeakEventManagerBase<TManager, TEventSource> : WeakEventManager
		where TManager : WeakEventManagerBase<TManager, TEventSource>, new()
		where TEventSource : class
	{
		/// <summary>
		/// Creates a new WeakEventManagerBase instance.
		/// </summary>
		protected WeakEventManagerBase()
		{
			Debug.Assert(GetType() == typeof(TManager));
		}
		
		/// <summary>
		/// Adds a weak event listener.
		/// </summary>
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
		public static void AddListener(TEventSource source, IWeakEventListener listener)
		{
			CurrentManager.ProtectedAddListener(source, listener);
		}
		
		/// <summary>
		/// Removes a weak event listener.
		/// </summary>
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
		public static void RemoveListener(TEventSource source, IWeakEventListener listener)
		{
			CurrentManager.ProtectedRemoveListener(source, listener);
		}
		
		/// <inheritdoc/>
		protected sealed override void StartListening(object source)
		{
			if (source == null)
				throw new ArgumentNullException("source");
			StartListening((TEventSource)source);
		}
		
		/// <inheritdoc/>
		protected sealed override void StopListening(object source)
		{
			if (source == null)
				throw new ArgumentNullException("source");
			StopListening((TEventSource)source);
		}
		
		/// <summary>
		/// Attaches the event handler.
		/// </summary>
		protected abstract void StartListening(TEventSource source);
		
		/// <summary>
		/// Detaches the event handler.
		/// </summary>
		protected abstract void StopListening(TEventSource source);
		
		/// <summary>
		/// Gets the current manager.
		/// </summary>
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
		protected static TManager CurrentManager {
			get {
				Type managerType = typeof(TManager);
				TManager manager = (TManager)GetCurrentManager(managerType);
				if (manager == null) {
					manager = new TManager();
					SetCurrentManager(managerType, manager);
				}
				return manager;
			}
		}
	}
}