• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IMouseInformation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IMouseInformation的典型用法代码示例。如果您正苦于以下问题:C# IMouseInformation类的具体用法?C# IMouseInformation怎么用?C# IMouseInformation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IMouseInformation类属于命名空间,在下文中一共展示了IMouseInformation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Track

		public override bool Track(IMouseInformation mouseInformation)
		{
			if (_graphicBuilder != null)
				return _graphicBuilder.Track(mouseInformation);

			return false;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:7,代码来源:MeasurementTool.cs


示例2: InsertRoadJunctionFourBlocksCommand

        public InsertRoadJunctionFourBlocksCommand( IMouseInformation mouseInformation, Factories.Factories factories, IEventAggregator eventAggregator )
        {
            this._factories = factories;
            this._mouseInformation = mouseInformation.NotNull();

            this._mouseInformation.LeftButtonPressed.Subscribe( this.AddJunction );
        }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:7,代码来源:InsertRoadJunction_FourBlocksCommand.cs


示例3: Start

		/// <summary>
		/// Passes user input to the builder when <see cref="IMouseButtonHandler.Start"/> is called on the owning tool.
		/// </summary>
		/// <param name="mouseInformation">The user input data.</param>
		/// <returns>True if the builder did something as a result of the call, and hence would like to receive capture; False otherwise.</returns>
		public override bool Start(IMouseInformation mouseInformation)
		{
			// We just started creating
			if (_numberOfPointsAnchored == 0)
			{
				this.Graphic.CoordinateSystem = CoordinateSystem.Destination;
				this.Graphic.TopLeft = mouseInformation.Location;
				this.Graphic.BottomRight = mouseInformation.Location;
				this.Graphic.ResetCoordinateSystem();

				_numberOfPointsAnchored++;
			}
			// We're done creating
			else
			{
				_numberOfPointsAnchored++;

                // When user moves the mouse very quickly and events are filtered for performance purpose (eg web viewer case), 
                // the final point may not be the same as the last tracked point. Must update the final point based on the latest mouse position.
                this.Graphic.CoordinateSystem = CoordinateSystem.Destination;
                this.Graphic.BottomRight = mouseInformation.Location;
                this.Graphic.ResetCoordinateSystem();

				this.NotifyGraphicComplete();
			}

			return true;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:33,代码来源:InteractiveBoundableGraphicBuilder.cs


示例4: Start

		public override bool Start(IMouseInformation mouseInformation)
		{
			base.Start(mouseInformation);

			if (_graphicBuilder != null)
				return _graphicBuilder.Start(mouseInformation);

            if (!CanStart(mouseInformation.Tile.PresentationImage))
                return false;

			RoiGraphic roiGraphic = CreateRoiGraphic();

			_graphicBuilder = CreateGraphicBuilder(roiGraphic.Subject);
			_graphicBuilder.GraphicComplete += OnGraphicBuilderComplete;
			_graphicBuilder.GraphicCancelled += OnGraphicBuilderCancelled;

		    AddRoiGraphic(  mouseInformation.Tile.PresentationImage, 
                            roiGraphic, 
                            (IOverlayGraphicsProvider)mouseInformation.Tile.PresentationImage);

			roiGraphic.Suspend();
			try
			{
				if (_graphicBuilder.Start(mouseInformation))
					return true;
			}
			finally
			{
				roiGraphic.Resume(true);
			}

			this.Cancel();
			return false;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:34,代码来源:MeasurementTool.cs


示例5: Start

		public override bool Start(IMouseInformation mouseInformation)
		{
			this.Graphic.CoordinateSystem = CoordinateSystem.Destination;
			this.Graphic.Location = mouseInformation.Location;
			this.Graphic.ResetCoordinateSystem();
			this.NotifyGraphicComplete();
			return true;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:8,代码来源:InteractiveTextAreaBuilder.cs


示例6: Track

		/// <summary>
		/// Called by the framework as the mouse moves while the assigned mouse button
		/// is pressed.
		/// </summary>
		/// <param name="e">Mouse event args</param>
		/// <returns>True if the event was handled, false otherwise</returns>
		public override bool Track(IMouseInformation mouseInformation)
		{
			if (_selectedTile == null || _selectedImageGraphic == null)
				return false;

			Probe(mouseInformation.Location);

			return true;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:15,代码来源:MprProbeTool.cs


示例7: NotifiyAboutClickedControls

 public NotifiyAboutClickedControls( IMouseInformation mouseInformation, IEventAggregator eventAggregator, VisitAllChildren allControls )
 {
     Contract.Requires( mouseInformation != null );
     Contract.Requires( eventAggregator != null );
     this._mouseInformation = mouseInformation;
     this._eventAggreagor = eventAggregator;
     this._allControls = allControls;
     this._mouseInformation.LeftButtonClicked.Subscribe( this.OnLeftButtonClicked );
 }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:9,代码来源:NotifiyAboutClickedControls.cs


示例8: Track

		/// <summary>
		/// Called by the framework when the mouse is moving and results in a transition 
		/// to the <see cref="FocussedGraphicState"/> when
		/// the mouse hovers over the associated 
		/// <see cref="IStandardStatefulGraphic"/>.
		/// </summary>
		/// <param name="mouseInformation"></param>
		/// <returns></returns>
		public override bool Track(IMouseInformation mouseInformation)
		{
			if (this.StatefulGraphic.HitTest(mouseInformation.Location))
			{
				this.StatefulGraphic.State = this.StatefulGraphic.CreateFocussedSelectedState();
				return true;
			}

			return false;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:18,代码来源:SelectedGraphicState.cs


示例9: DebugMouseInformationModel

 public DebugMouseInformationModel( IMouseInformation mouseInformation )
 {
     this._mouseInformation = mouseInformation;
     this._mouseInformation.MousePositionChanged.Where( t => this.ShouldShowMousePositoion).Subscribe(t =>
                                                                {
                                                                    this.MouseXPosition = this._mouseInformation.XnaXMousePosition.ToString();
                                                                    this.MouseYPosition = this._mouseInformation.XnaYMousePosition.ToString();
                                                                });
     this._mouseInformation.StartRecord();
 }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:10,代码来源:DebugMouseInformation.cs


示例10: Start

		/// <summary>
		/// Called by the framework when the user clicks away from the 
		/// associated <see cref="IStandardStatefulGraphic"/>
		/// and results in a transition to the <see cref="InactiveGraphicState"/>.
		/// </summary>
		/// <param name="mouseInformation"></param>
		/// <returns></returns>
		public override bool Start(IMouseInformation mouseInformation)
		{
			if (!this.StatefulGraphic.HitTest(mouseInformation.Location))
			{
				this.StatefulGraphic.State = this.StatefulGraphic.CreateInactiveState();
				return false;
			}

			return true;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:17,代码来源:SelectedGraphicState.cs


示例11: InsertRoadLaneCommand

        public InsertRoadLaneCommand( IMouseInformation mouseInformation, RoadLayer ownr, RoadLaneBuilder roadLaneBuilder )
        {
            this._mouseInformation = mouseInformation;
            this._mouseInformation.LeftButtonPressed.Subscribe( this.MousePressed );
            this._owner = ownr;
            this._roadLaneBuilder = roadLaneBuilder;
            this._roadLaneBuilder.SetOwner( ownr );

            this._visitator = new VisitAllChildren( this._owner );
        }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:10,代码来源:InsertRoadLaneCommand.cs


示例12: SelectToEditCommand

 public SelectToEditCommand( IMouseInformation mouseInformation, Factories.Factories factories, IEventAggregator eventAggregator, VisitAllChildren allControls )
 {
     Contract.Requires( mouseInformation != null );
     Contract.Requires( factories != null );
     Contract.Requires( eventAggregator != null );
     this._eventAggregator = eventAggregator;
     this._mouseInformation = mouseInformation;
     this._mouseInformation.LeftButtonClicked.Subscribe( this.OnLeftButtonClick );
     this._allControl = allControls;
 }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:10,代码来源:SelectToEditCommand.cs


示例13: ConnectObjectCommand

        public ConnectObjectCommand(
                            IMouseInformation mouseInformation,
                            CompositeConnectionCommand compositeConnectionCommand,
                            RoadLayer owner )
        {
            this._mouseInformation = mouseInformation;
            this._compositeConnectionCommand = compositeConnectionCommand;
            this._visitator = new VisitAllChildren( owner );

            this._mouseInformation.LeftButtonClicked.Subscribe( this.LeftButtonClicked );
        }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:11,代码来源:ConnectObjectCommand.cs


示例14: Track

		/// <summary>
		/// Called by the framework when the mouse is moving and results in a transition 
		/// to the <see cref="FocussedGraphicState"/> when
		/// the mouse hovers over the associated <see cref="IStandardStatefulGraphic"/>.
		/// </summary>
		/// <param name="mouseInformation"></param>
		/// <returns></returns>
		public override bool Track(IMouseInformation mouseInformation)
		{
			// If mouse is over object, transition to focused state
			if (this.StatefulGraphic.HitTest(mouseInformation.Location))
			{
				this.StatefulGraphic.State = this.StatefulGraphic.CreateFocussedState();
				return true;
			}

			return false;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:18,代码来源:InactiveGraphicState.cs


示例15: CarsRemoverCommand

 public CarsRemoverCommand( IMouseInformation mouseInformation, Factories.Factories factories, IEventAggregator eventAggregator )
 {
     Contract.Requires( mouseInformation != null );
     Contract.Requires( factories != null );
     Contract.Requires( eventAggregator != null );
     this._mouseInformation = mouseInformation;
     this._mouseInformation.LeftButtonPressed.Subscribe( s =>
                         {
                             var carInserter = new CarsRemover( factories, s.Location );
                             eventAggregator.Publish( new AddControlToRoadLayer( carInserter ) );
                         } );
 }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:12,代码来源:CarsRemoverCommand.cs


示例16: Track

		public override bool Track(IMouseInformation mouseInformation)
		{
			if (clickIndex == 1)
			{
				this.Graphic.CoordinateSystem = CoordinateSystem.Destination;
				this.Graphic.TextLocation = mouseInformation.Location;
				this.Graphic.ResetCoordinateSystem();
				this.Graphic.Draw();
			}

			return true;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:12,代码来源:InteractiveTextCalloutBuilder.cs


示例17: Start

		public override bool Start(IMouseInformation mouseInformation)
		{
			_rotatingGraphic = false;

			if (_currentPinwheelGraphic != null)
			{
				_currentPinwheelGraphic.CoordinateSystem = CoordinateSystem.Destination;
				_rotatingGraphic = _currentPinwheelGraphic.HitTest(mouseInformation.Location);
				_currentPinwheelGraphic.ResetCoordinateSystem();
			}

			return _rotatingGraphic;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:13,代码来源:RotateObliqueTool.cs


示例18: Start

		public override bool Start(IMouseInformation mouseInformation)
		{
			if (this.SelectedImageGraphicProvider == null)
				return false;

			_selectedTile = mouseInformation.Tile as Tile;
			_selectedTile.InformationBox = new InformationBox();
			_selectedImageGraphic = this.SelectedImageGraphicProvider.ImageGraphic;
			_selectedImageSop = (this.SelectedPresentationImage as IImageSopProvider).ImageSop;

			Probe(mouseInformation.Location);

			return true;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:14,代码来源:MprProbeTool.cs


示例19: Start

		/// <summary>
		/// Called by the framework when the associated <see cref="IStandardStatefulGraphic"/>
		/// is clicked on and results in a transition to the <see cref="FocussedSelectedGraphicState"/>.
		/// </summary>
		/// <param name="mouseInformation"></param>
		/// <returns></returns>
		public override bool Start(IMouseInformation mouseInformation)
		{
			if (this.StatefulGraphic.HitTest(mouseInformation.Location))
			{
				this.StatefulGraphic.State = this.StatefulGraphic.CreateFocussedSelectedState();
				this.StatefulGraphic.State.Start(mouseInformation);

				return true;
			}

			//We should never actually get to here, but if we did, this should happen.
			base.StatefulGraphic.State = this.StatefulGraphic.CreateInactiveState();
			return false;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:20,代码来源:FocussedGraphicState.cs


示例20: Start

		public override bool Start(IMouseInformation mouseInformation)
		{
		 	base.Start(mouseInformation);

			IPresentationImage selectedImage = this.Context.Viewer.SelectedPresentationImage;

			vtkGenericRenderWindowInteractor interactor = GetInteractor(selectedImage);

			if (interactor == null)
				return false;

			interactor.SetEventPositionFlipY(mouseInformation.Location.X, mouseInformation.Location.Y);
			interactor.RightButtonPressEvent();

			return true;
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:16,代码来源:ZoomVolumeTool.cs



注:本文中的IMouseInformation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IMove类代码示例发布时间:2022-05-24
下一篇:
C# IMouse类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap