本文整理汇总了C#中ITool类的典型用法代码示例。如果您正苦于以下问题:C# ITool类的具体用法?C# ITool怎么用?C# ITool使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITool类属于命名空间,在下文中一共展示了ITool类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: DefaultToolProviderToolInfo
/// <summary>
/// Creates an instance of DLLToolInfo
/// </summary>
/// <param name="tool"></param>
/// <param name="AssemblyFileName"></param>
/// <param name="ToolClassName"></param>
/// <param name="DateFileModified">The dane the file was modified</param>
public DefaultToolProviderToolInfo(ITool tool, string AssemblyFileName, string ToolClassName, DateTime DateFileModified)
{
base.Name = tool.Name;
base.UniqueName = tool.UniqueName;
base.Description = tool.Description;
base.ToolTip = tool.ToolTip;
base.Category = tool.Category;
base.Icon = tool.Icon;
_assemblyFileName = AssemblyFileName;
_toolClassName = ToolClassName;
_dateFileModified = DateFileModified;
}
开发者ID:zhongshuiyuan,项目名称:mapwindowsix,代码行数:19,代码来源:DefaultToolProviderToolInfo.cs
示例17: GetNextTool
private IToolInstance GetNextTool(ITool tool)
{
foreach (var toolInstanceState in _toolAvailableStates[tool])
{
if (toolInstanceState.Value)
{
// return first worker that is available
return _converter.ToolTypes[tool][toolInstanceState.Key];
}
}
return null;
}
开发者ID:mikesurface,项目名称:SchedulingManager,代码行数:12,代码来源:ToolManager.cs
示例18: FattyDiver
public FattyDiver(ITool tool1, ITool tool2, int x, int y)
: base(tool1, tool2, x, y)
{
Size = new Point(16, 40);
StandingGrid = new SpriteGrid("tiny_standing", 2, 1);
WalkingGrid = new SpriteGrid("tiny_walking", 12, 1);
JumpingGrid = new SpriteGrid("tiny_jumping", 6, 1);
ClimbingGrid = new SpriteGrid("fatty_climbing", 2, 1);
Name = "Fatty";
originalBoatPosition = new Point(200, 224 - Height);
Strength = 20;
}
开发者ID:weimingtom,项目名称:db-diver,代码行数:12,代码来源:FattyDiver.cs
示例19: ToolIndex
public ToolIndex(ITool tool, ToolOptionBase options, string name, Image image, Keys defaultKey)
{
Name = name;
DefaultKeys = defaultKey;
OptionsPanel = options;
Tool = tool;
MenuItem = new ToolStripMenuItem(Name, image);
MenuItem.Text = name;
MenuItem.Tag = this;
Button = new ToolStripButton(image);
Button.Text = name;
Button.DisplayStyle = ToolStripItemDisplayStyle.Image;
Button.Tag = this;
}
开发者ID:rmbzlib,项目名称:mcskin3d,代码行数:15,代码来源:ToolIndex.cs
示例20: FormDis
public ITool m_Tool; //��������axMapControl��IToolʵ��
#endregion Fields
#region Constructors
/// <summary>
/// ��ʼ������
/// </summary>
/// <param name="type">��������</param>
/// <param name="ipTool">��������axMapControl��IToolʵ��</param>
public FormDis(MeasureType type,ITool ipTool)
{
InitializeComponent();
this.m_MeasureType = type;
this.m_Tool = ipTool;
this.TopMost = true;
this.WriteLabelText(null);
if (this.m_Tool.GetType() == typeof(ToolMeasureLength))
{
(this.m_Tool as ToolMeasureLength).MyInit();
}
if (this.m_Tool.GetType() == typeof(ToolMeasureArea))
{
(this.m_Tool as ToolMeasureArea).MyInit();
}
}
开发者ID:hy1314200,项目名称:HyDM,代码行数:28,代码来源:FormDis.cs
注:本文中的ITool类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论