/// <summary>
        /// Constructs a new InheritanceToolConnectAction for the given Diagram.
        /// </summary>
        public InheritanceToolConnectAction(DslDiagrams::Diagram diagram) : base(diagram, true)
        {
            global::System.Resources.ResourceManager resourceManager = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager;
            global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture;

            byte[] sourceCursorBytes = (byte[])resourceManager.GetObject("InheritanceToolSourceCursor", resourceCulture);
            using (global::System.IO.MemoryStream sourceCursorStream = new global::System.IO.MemoryStream(sourceCursorBytes))
            {
                this.sourceCursor = new global::System.Windows.Forms.Cursor(sourceCursorStream);
            }
            byte[] targetCursorBytes = (byte[])resourceManager.GetObject("InheritanceToolTargetCursor", resourceCulture);
            using (global::System.IO.MemoryStream targetCursorStream = new global::System.IO.MemoryStream(targetCursorBytes))
            {
                this.targetCursor = new global::System.Windows.Forms.Cursor(targetCursorStream);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Constructs a new FlowToolConnectAction for the given Diagram.
        /// </summary>
        public FlowToolConnectAction(DslDiagrams::Diagram diagram) : base(diagram, true)
        {
            global::System.Resources.ResourceManager resourceManager = global::JA.Attack.AttackDomainModel.SingletonResourceManager;
            global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture;

            byte[] sourceCursorBytes = (byte[])resourceManager.GetObject("FlowToolSourceCursor", resourceCulture);
            using (global::System.IO.MemoryStream sourceCursorStream = new global::System.IO.MemoryStream(sourceCursorBytes))
            {
                this.sourceCursor = new global::System.Windows.Forms.Cursor(sourceCursorStream);
            }
            byte[] targetCursorBytes = (byte[])resourceManager.GetObject("FlowToolTargetCursor", resourceCulture);
            using (global::System.IO.MemoryStream targetCursorStream = new global::System.IO.MemoryStream(targetCursorBytes))
            {
                this.targetCursor = new global::System.Windows.Forms.Cursor(targetCursorStream);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Gets the cursor corresponding to the given mouse position.
        /// </summary>
        /// <remarks>
        /// Changes the cursor to Cursors.No before the first mouse click if the source shape is not valid.
        /// </remarks>
        public override global::System.Windows.Forms.Cursor GetCursor(global::System.Windows.Forms.Cursor currentCursor, DslDiagrams::DiagramClientView diagramClientView, DslDiagrams::PointD mousePosition)
        {
            if (this.MouseDownHitShape == null && currentCursor != global::System.Windows.Forms.Cursors.No)
            {
                DslDiagrams::DiagramHitTestInfo hitTestInfo = new DslDiagrams::DiagramHitTestInfo(diagramClientView);
                this.Diagram.DoHitTest(mousePosition, hitTestInfo);
                DslDiagrams::ShapeElement shape = hitTestInfo.HitDiagramItem.Shape;

                DslDiagrams::ConnectionType connectionType = GetConnectionTypes(shape, null)[0];
                string warningString = string.Empty;
                if (!connectionType.CanCreateConnection(shape, null, ref warningString))
                {
                    return(global::System.Windows.Forms.Cursors.No);
                }
            }
            return(base.GetCursor(currentCursor, diagramClientView, mousePosition));
        }
 /// <summary>
 /// Disposes custom cursor resources.
 /// </summary>
 protected override void Dispose(bool disposing)
 {
     try
     {
         if (disposing)
         {
             if (this.sourceCursor != null)
             {
                 this.sourceCursor.Dispose();
                 this.sourceCursor = null;
             }
             if (this.targetCursor != null)
             {
                 this.targetCursor.Dispose();
                 this.targetCursor = null;
             }
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }
Beispiel #5
0
		/// <summary>
		/// Disposes custom cursor resources.
		/// </summary>
		protected override void Dispose(bool disposing)
		{
			try
			{
				if(disposing)
				{
					if(this.sourceCursor != null)
					{
						this.sourceCursor.Dispose();
						this.sourceCursor = null;
					}
					if(this.targetCursor != null)
					{
						this.targetCursor.Dispose();
						this.targetCursor = null;
					}
				}
			}
			finally
			{
				base.Dispose(disposing);
			}
		}
Beispiel #6
0
		/// <summary>
		/// Constructs a new AggregateStateRelationshipConnectAction for the given Diagram.
		/// </summary>
		public AggregateStateRelationshipConnectAction(DslDiagrams::Diagram diagram): base(diagram, true) 
		{
			global::System.Resources.ResourceManager resourceManager = global::FourDeep.Dizzle.DizzleDomainModel.SingletonResourceManager;
			global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture;

			byte[] sourceCursorBytes = (byte[])resourceManager.GetObject("AggregateStateRelationshipSourceCursor", resourceCulture);
			using(global::System.IO.MemoryStream sourceCursorStream = new global::System.IO.MemoryStream(sourceCursorBytes))
			{ 
				this.sourceCursor = new global::System.Windows.Forms.Cursor(sourceCursorStream);
			}
			byte[] targetCursorBytes = (byte[])resourceManager.GetObject("AggregateStateRelationshipTargetCursor", resourceCulture);
			using(global::System.IO.MemoryStream targetCursorStream = new global::System.IO.MemoryStream(targetCursorBytes))
			{ 
				this.targetCursor = new global::System.Windows.Forms.Cursor(targetCursorStream);
			}
		}
Beispiel #7
0
		/// <summary>
		/// Constructs a new FlowConnectAction for the given Diagram.
		/// </summary>
		public FlowConnectAction(DslDiagrams::Diagram diagram): base(diagram, true) 
		{
			global::System.Resources.ResourceManager resourceManager = global::Architect.CloudCoreArchitectSubProcessDomainModel.SingletonResourceManager;
			global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture;

			byte[] sourceCursorBytes = (byte[])resourceManager.GetObject("FlowSourceCursor", resourceCulture);
			using(global::System.IO.MemoryStream sourceCursorStream = new global::System.IO.MemoryStream(sourceCursorBytes))
			{ 
				this.sourceCursor = new global::System.Windows.Forms.Cursor(sourceCursorStream);
			}
			byte[] targetCursorBytes = (byte[])resourceManager.GetObject("FlowTargetCursor", resourceCulture);
			using(global::System.IO.MemoryStream targetCursorStream = new global::System.IO.MemoryStream(targetCursorBytes))
			{ 
				this.targetCursor = new global::System.Windows.Forms.Cursor(targetCursorStream);
			}
		}
		/// <summary>
		/// Constructs a new InheritanceToolConnectAction for the given Diagram.
		/// </summary>
		public InheritanceToolConnectAction(DslDiagrams::Diagram diagram): base(diagram, true) 
		{
			global::System.Resources.ResourceManager resourceManager = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager;
			global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture;

			byte[] sourceCursorBytes = (byte[])resourceManager.GetObject("InheritanceToolSourceCursor", resourceCulture);
			using(global::System.IO.MemoryStream sourceCursorStream = new global::System.IO.MemoryStream(sourceCursorBytes))
			{ 
				this.sourceCursor = new global::System.Windows.Forms.Cursor(sourceCursorStream);
			}
			byte[] targetCursorBytes = (byte[])resourceManager.GetObject("InheritanceToolTargetCursor", resourceCulture);
			using(global::System.IO.MemoryStream targetCursorStream = new global::System.IO.MemoryStream(targetCursorBytes))
			{ 
				this.targetCursor = new global::System.Windows.Forms.Cursor(targetCursorStream);
			}
		}