public void AddRange(BehaviorServiceAdornerCollection value)
 {
     for (int i = 0; i < value.Count; i++)
     {
         this.Add(value[i]);
     }
 }
		public void AddRange (BehaviorServiceAdornerCollection value)
		{
			state++;
			if (value == null)
				throw new ArgumentNullException ("value");
			InnerList.AddRange (value);
		}
 public void AddRange(BehaviorServiceAdornerCollection value)
 {
     for (int i = 0; i < value.Count; i++)
     {
         this.Add(value[i]);
     }
 }
예제 #4
0
 /// <summary>
 ///  Adds the contents of another
 ///  <see cref="BehaviorServiceAdornerCollection"/> to the end of the
 ///  collection.
 /// </summary>
 /// <param name="value">
 ///  A <see cref="BehaviorServiceAdornerCollection"/> containing the objects to
 ///  add to the collection.
 /// </param>
 /// <returns>
 ///  None.
 /// </returns>
 /// <seealso cref="Add"/>
 public void AddRange(BehaviorServiceAdornerCollection value)
 {
     for (int i = 0; (i < value.Count); i = (i + 1))
     {
         Add(value[i]);
     }
 }
 internal BehaviorService(IServiceProvider serviceProvider, Control windowFrame)
 {
     this.serviceProvider = serviceProvider;
     this.adornerWindow = new AdornerWindow(this, windowFrame);
     IOverlayService service = (IOverlayService) serviceProvider.GetService(typeof(IOverlayService));
     if (service != null)
     {
         this.adornerWindowIndex = service.PushOverlay(this.adornerWindow);
     }
     this.dragEnterReplies = new Hashtable();
     this.adorners = new BehaviorServiceAdornerCollection(this);
     this.behaviorStack = new ArrayList();
     this.hitTestedGlyph = null;
     this.validDragArgs = null;
     this.actionPointer = null;
     this.trackMouseEvent = null;
     this.trackingMouseEvent = false;
     IMenuCommandService menuService = serviceProvider.GetService(typeof(IMenuCommandService)) as IMenuCommandService;
     IDesignerHost host = serviceProvider.GetService(typeof(IDesignerHost)) as IDesignerHost;
     if ((menuService != null) && (host != null))
     {
         this.menuCommandHandler = new MenuCommandHandler(this, menuService);
         host.RemoveService(typeof(IMenuCommandService));
         host.AddService(typeof(IMenuCommandService), this.menuCommandHandler);
     }
     this.useSnapLines = false;
     this.queriedSnapLines = false;
     WM_GETALLSNAPLINES = System.Design.SafeNativeMethods.RegisterWindowMessage("WM_GETALLSNAPLINES");
     WM_GETRECENTSNAPLINES = System.Design.SafeNativeMethods.RegisterWindowMessage("WM_GETRECENTSNAPLINES");
     SystemEvents.DisplaySettingsChanged += new EventHandler(this.OnSystemSettingChanged);
     SystemEvents.InstalledFontsChanged += new EventHandler(this.OnSystemSettingChanged);
     SystemEvents.UserPreferenceChanged += new UserPreferenceChangedEventHandler(this.OnUserPreferenceChanged);
 }
		public BehaviorServiceAdornerCollectionEnumerator (BehaviorServiceAdornerCollection mappings)
		{
			if (mappings == null)
				throw new ArgumentNullException ("mappings");
			this.mappings = mappings;

			Reset ();
		}
 public BehaviorServiceAdornerCollection(BehaviorServiceAdornerCollection value)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     InnerList.AddRange(value);
 }
        public BehaviorServiceAdornerCollectionEnumerator(BehaviorServiceAdornerCollection mappings)
        {
            if (mappings == null)
            {
                throw new ArgumentNullException("mappings");
            }
            this.mappings = mappings;

            Reset();
        }
예제 #9
0
        private const string ToolboxFormat = ".NET Toolbox Item"; // used to detect if a drag is coming from the toolbox.

        internal BehaviorService(IServiceProvider serviceProvider, Control windowFrame)
        {
            _serviceProvider = serviceProvider;
            _adornerWindow   = new AdornerWindow(this, windowFrame);

            // Use the adornerWindow as an overlay
            IOverlayService os = (IOverlayService)serviceProvider.GetService(typeof(IOverlayService));

            if (os != null)
            {
                AdornerWindowIndex = os.PushOverlay(_adornerWindow);
            }

            _dragEnterReplies = new Hashtable();

            // Start with an empty adorner collection & no behavior on the stack
            Adorners       = new BehaviorServiceAdornerCollection(this);
            _behaviorStack = new ArrayList();

            _hitTestedGlyph     = null;
            _validDragArgs      = null;
            DesignerActionUI    = null;
            _trackMouseEvent    = default;
            _trackingMouseEvent = false;

            // Create out object that will handle all menucommands
            if (serviceProvider.GetService(typeof(IMenuCommandService)) is IMenuCommandService menuCommandService &&
                serviceProvider.GetService(typeof(IDesignerHost)) is IDesignerHost host)
            {
                _menuCommandHandler = new MenuCommandHandler(this, menuCommandService);
                host.RemoveService(typeof(IMenuCommandService));
                host.AddService(typeof(IMenuCommandService), _menuCommandHandler);
            }

            // Default layoutmode is SnapToGrid.
            _useSnapLines     = false;
            _queriedSnapLines = false;

            // Test hooks
            WM_GETALLSNAPLINES    = User32.RegisterWindowMessageW("WM_GETALLSNAPLINES");
            WM_GETRECENTSNAPLINES = User32.RegisterWindowMessageW("WM_GETRECENTSNAPLINES");

            // Listen to the SystemEvents so that we can resync selection based on display settings etc.
            SystemEvents.UserPreferenceChanged += new UserPreferenceChangedEventHandler(OnUserPreferenceChanged);
        }
예제 #10
0
		public void AddRange(BehaviorServiceAdornerCollection value)
		{
			throw null;
		}
예제 #11
0
		public BehaviorServiceAdornerCollection(BehaviorServiceAdornerCollection value)
		{
			throw null;
		}
예제 #12
0
 /// <summary>
 ///  Initializes a new instance of <see cref='BehaviorServiceAdornerCollection'/> based on another
 ///  <see cref='BehaviorServiceAdornerCollection'/>.
 /// </summary>
 public BehaviorServiceAdornerCollection(BehaviorServiceAdornerCollection value)
 {
     throw new NotImplementedException(SR.NotImplementedByDesign);
 }
예제 #13
0
 public BehaviorServiceAdornerCollectionEnumerator(BehaviorServiceAdornerCollection mappings)
 {
     throw null;
 }
 public BehaviorServiceAdornerCollectionEnumerator(BehaviorServiceAdornerCollection mappings)
 {
     this.temp = mappings;
     this.baseEnumerator = this.temp.GetEnumerator();
 }
 public BehaviorServiceAdornerCollection(BehaviorServiceAdornerCollection value)
 {
     this.AddRange(value);
 }
예제 #16
0
 /// <summary>
 ///  Initializes a new instance of <see cref="BehaviorServiceAdornerCollection"/> based on another
 ///  <see cref="BehaviorServiceAdornerCollection"/>.
 /// </summary>
 public BehaviorServiceAdornerCollection(BehaviorServiceAdornerCollection value)
 {
     AddRange(value);
 }
 public BehaviorServiceAdornerCollectionEnumerator(BehaviorServiceAdornerCollection mappings)
 {
     this.temp           = mappings;
     this.baseEnumerator = this.temp.GetEnumerator();
 }