当前位置: 首页>>代码示例>>C#>>正文


C# ITool类代码示例

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


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

示例1: MultiLineTextTool

		public MultiLineTextTool (IDrawingEditor editor, MultiLineTextFigure fig, ITool dt): base (editor, fig, dt) {	
			_textview = new Gtk.TextView ();
			_textview.Buffer.Changed += new System.EventHandler (ChangedHandler);
			_textview.ModifyFont (fig.PangoLayout.FontDescription.Copy ());
			_textview.RightMargin = 5;
			_textview.Justification = ConvertJustificaton ();
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:7,代码来源:MultiLineTextTool.cs

示例2: PopupMenuTool

 public PopupMenuTool(IDrawingEditor editor, IPopupMenuFigure figure, ITool defaultTool, ITool delegateTool, bool mainMenu)
     : base(editor, figure, defaultTool)
 {
     _figure = figure;
     DelegateTool = delegateTool;
     primaryMenu = mainMenu;
 }
开发者ID:xiul,项目名称:Monodevelop-Database-Modeler-Addin,代码行数:7,代码来源:PopupMenuTool.cs

示例3: ToolDialog

        /// <summary>
        /// The constructor for the ToolDialog
        /// </summary>
        /// <param name="tool">The ITool to create the dialog box for</param>
        /// <param name="modelElements">A list of all model elements</param>
        public ToolDialog(ITool tool, IEnumerable<ModelElement> modelElements)
        {
            // Required by the designer
            InitializeComponent();

            // We store all the element names here and extract the datasets
            foreach (ModelElement me in modelElements)
            {
                if (me as DataElement != null)
                {
                    bool addData = true;
                    foreach (Parameter par in tool.OutputParameters)
                    {
                        if (par.ModelName == (me as DataElement).Parameter.ModelName)
                        {
                            addData = false;
                        }

                        break;
                    }

                    if (addData)
                    {
                        _dataSets.Add(new DataSetArray(me.Name, (me as DataElement).Parameter.Value as IDataSet));
                    }
                }
            }

            Initialize(tool);
        }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:35,代码来源:ToolDialog.cs

示例4: InsertTool

        private void InsertTool(ITool tool)
        {
            // Create the view.
            var view = tool.CreateView();
            if (view.DataContext == null) view.DataContext = tool;
            view.HorizontalAlignment = tool.HorizontalAlignment;
            view.VerticalAlignment = tool.VerticalAlignment;

            // Assign the margin (if the generated view did not arrive with an explicitly set value).
            if (view.Margin == default(Thickness)) view.Margin = tool.Parent.DefaultToolMargin;

            // Get the column (and update it's width if required).
            var columnIndex = tool.Parent.GetColumn(tool);
            if (tool is IGridCellWidth)
            {
                toolContainer.ColumnDefinitions[columnIndex].Width = ((IGridCellWidth) tool).ColumnWidth;
            }

            // Assign Row/Column position.
            Grid.SetRow(view, tool.Parent.GetRow(tool));
            Grid.SetColumn(view, columnIndex);

            // Set spans.
            Grid.SetRowSpan(view, tool.Parent.GetRowSpan(tool));
            Grid.SetColumnSpan(view, tool.Parent.GetColumnSpan(tool));

            // Insert into the visual tree.
            toolContainer.Children.Add(view);
        }
开发者ID:philcockfield,项目名称:Open.TestHarness.SL,代码行数:29,代码来源:ToolLayoutController.cs

示例5: GetOrAddToolSchedule

 private IActivityToolSchedulingEventCollection GetOrAddToolSchedule(ITool tool)
 {
     if (!_toolSchedules.ContainsKey(tool))
     {
         _toolSchedules.Add(tool, new ActivityToolSchedulingEventCollection(tool));
     }
     return _toolSchedules[tool];
 }
开发者ID:mikesurface,项目名称:SchedulingManager,代码行数:8,代码来源:ProjectSchedulingEventManager.cs

示例6: Pickup

 public Pickup(int x, int y, ITool tool, string text)
 {
     Tool = tool;
     this.text = text;
     X = x;
     startY = Y = y;
     Size = new Point(16, 16);
 }
开发者ID:olofn,项目名称:db_public,代码行数:8,代码来源:Pickup.cs

示例7: SimpleTextTool

		public SimpleTextTool (IDrawingEditor editor, SimpleTextFigure fig, ITool dt) 
			: base (editor, fig, dt) {
			_entry = new Gtk.Entry ();
			_entry.HasFrame = false;
			_entry.Alignment = 0.5f;
			_entry.Changed += new System.EventHandler (ChangedHandler);
			_entry.ModifyFont (fig.PangoLayout.FontDescription.Copy ());
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:8,代码来源:SimpleTextTool.cs

示例8: Inventory

 public Inventory(int x, int y, ITool[] tools)
     : this(x, y)
 {
     foreach (ITool tool in tools)
     {
         this.tools.Add(tool);
     }
 }
开发者ID:olofn,项目名称:db_public,代码行数:8,代码来源:Inventory.cs

示例9: ToolDialog

        /// <summary>
        /// The constructor for the ToolDialog
        /// </summary>
        /// <param name="Tool">The ITool to create the dialog box for</param>
        /// <param name="DataSets">The list of available DataSets available</param>
        public ToolDialog(ITool Tool, List<DataSetArray> DataSets)
        {
            //Required by the designer
            InitializeializeializeComponent();

            _dataSets = DataSets;

            Initialize(Tool);
        }
开发者ID:zhongshuiyuan,项目名称:mapwindowsix,代码行数:14,代码来源:ToolDialog.cs

示例10: ToolInstance

 private ToolInstance(int id, ITool definition) : this()
 {
     if (id == -1)
     {
         id = this.NextId();
     }
     ID = id;
     Definition = definition;
 }
开发者ID:mikesurface,项目名称:SchedulingManager,代码行数:9,代码来源:ToolInstance.cs

示例11: Show

        public void Show(ITool tool, Action applyCallback, Action cancelCallback)
        {
            this.Content = tool.GetSettingsUI();
            this.Header = tool.ToString().Split('.').Last();

            if (!this.IsOpen && this.Content != null)
            {
              this.Show();
            }
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:10,代码来源:CustomSettingsContainer.xaml.cs

示例12: AddPlugin

        private void AddPlugin(ITool plugin)
        {
            var tabitem = new TabItem
            {
                Header = plugin.Name,
                Content = plugin.View
            };

            tabControl.Items.Add(tabitem);
        }
开发者ID:AMMing,项目名称:KcvExtension,代码行数:10,代码来源:MainWindow.xaml.cs

示例13: TinyDiver

 public TinyDiver(ITool tool1, ITool tool2, int x, int y)
     : base(tool1, tool2, x, y)
 {
     Size = new Point(16, 28);
     StandingGrid = new SpriteGrid("tiny_standing", 2, 1);
     WalkingGrid = new SpriteGrid("tiny_walking", 12, 1);
     JumpingGrid = new SpriteGrid("tiny_jumping", 6, 1);
     ClimbingGrid = new SpriteGrid("tiny_climbing", 2, 1);
     Name = "Tiny";
     originalBoatPosition = new Point(250, 224 - Height);
 }
开发者ID:olofn,项目名称:db_public,代码行数:11,代码来源:TinyDriver.cs

示例14: SetCurrentTool

        public static void SetCurrentTool(ITool tool)
        {
            if (currentTool != null)
            {
                currentTool.OnRemove();
            }

            currentTool = tool;

            currentTool.OnAdd();
        }
开发者ID:dgi09,项目名称:2DGameEngine,代码行数:11,代码来源:ToolManager.cs

示例15: CreateObject

        private void CreateObject(ITool tool)
        {
            using ( var scope = RecordingServices.DefaultRecorder.OpenScope() )
            {
                var newItem = tool.CreateItem( EditingContext );
                newItem.SetPosition( 100, 100 );

                // We name the scope after we created.
                scope.OperationDescriptor = new NamedOperationDescriptor(string.Format("Creating {0}", newItem.Name));

            }
        }
开发者ID:modulexcite,项目名称:VisualDesigner,代码行数:12,代码来源:ToolbarViewModel.cs


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