本文整理汇总了C#中ControlInfo类的典型用法代码示例。如果您正苦于以下问题:C# ControlInfo类的具体用法?C# ControlInfo怎么用?C# ControlInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ControlInfo类属于命名空间,在下文中一共展示了ControlInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResourcePreview
public ResourcePreview()
{
m_controlInfo = new ControlInfo(
"Resource Preview".Localize(),
"Preview selected 3d resource".Localize(),
StandardControlGroup.Hidden);
}
示例2: ListView
/// <summary>
/// Finishes initializing component by creating ListView, and initializing it and subscribing it to events</summary>
void IInitializable.Initialize()
{
m_resourcesListView = new ListView();
m_resourcesListView.AllowDrop = true;
m_resourcesListView.MultiSelect = true;
m_resourcesListView.AllowColumnReorder = true;
m_resourcesListView.LabelEdit = true;
m_resourcesListView.Dock = DockStyle.Fill;
m_resourcesListView.DragOver += resourcesListView_DragOver;
m_resourcesListView.DragDrop += resourcesListView_DragDrop;
m_resourcesListView.MouseUp += resourcesListView_MouseUp;
m_resourcesListViewAdapter = new ListViewAdapter(m_resourcesListView);
m_resourcesListViewAdapter.LabelEdited +=
resourcesListViewAdapter_LabelEdited;
m_resourcesControlInfo = new ControlInfo(
"Resources".Localize(),
"Resources for selected Event".Localize(),
StandardControlGroup.Bottom);
m_controlHostService.RegisterControl(m_resourcesListView, m_resourcesControlInfo, this);
if (m_settingsService != null)
{
m_settingsService.RegisterSettings(this, new BoundPropertyDescriptor(this, () => ListViewSettings, "ListViewSettings", "", ""));
}
}
示例3: ListView
/// <summary>
/// Finishes initializing component by creating ListView and initializing it, subscribing to drag events,
/// and registering the control</summary>
void IInitializable.Initialize()
{
m_characterListView = new ListView();
//m_characterListView.SmallImageList = ResourceUtil.GetImageList16();
m_characterListView.AllowDrop = false;
m_characterListView.MultiSelect = true;
m_characterListView.AllowColumnReorder = true;
m_characterListView.LabelEdit = true;
m_characterListView.Dock = DockStyle.Top;
m_characterListView.MouseUp += characterListView_MouseUp;
m_characteListViewAdapter = new ListViewAdapter(m_characterListView);
m_characteListViewAdapter.LabelEdited +=
resourcesListViewAdapter_LabelEdited;
m_characteControlInfo = new ControlInfo(
"Characters".Localize(),
"Characters".Localize(),
StandardControlGroup.Right);
m_controlHostService.RegisterControl(m_characterListView, m_characteControlInfo, this);
if (m_settingsService != null)
{
m_settingsService.RegisterSettings(this, new BoundPropertyDescriptor(this, () => ListViewSettings, "ListViewSettings", "", ""));
}
}
示例4: Init
public void Init(Uri uri)
{
if (uri == null)
throw new ArgumentNullException("uri");
string filePath = uri.LocalPath;
string fileName = Path.GetFileName(filePath);
Control ctrl = m_editor.Control;
ctrl.Tag = this;
//m_editor.EditorTextChanged += editor_EditorTextChanged;
Story story = this.Cast<Story>();
if (story.Settings == null)
{
story.Settings = Settings.New(Schema.storyType.settingsChild);
}
story.Settings.DomNode.AttributeChanged += DomNode_AttributeChanged;
story.Settings.DomNode.ChildInserted += DomNode_ChildInserted;
story.Settings.DomNode.ChildRemoved += DomNode_ChildRemoved;
MakeSyntaxXml();
m_controlInfo = new ControlInfo(fileName, filePath, StandardControlGroup.Center);
// tell ControlHostService this control should be considered a document in the menu,
// and using the full path of the document for menu text to avoid adding a number in the end
// in control header, which is not desirable for documents that have the same name
// but located at different directories.
m_controlInfo.IsDocument = true;
Uri = uri;
}
示例5: CodeDocument
/// <summary>
/// Constructor</summary>
/// <param name="uri">URI of document</param>
public CodeDocument(Uri uri)
{
if (uri == null)
throw new ArgumentNullException("uri");
m_uri = uri;
string filePath = uri.LocalPath;
string fileName = Path.GetFileName(filePath);
m_type = GetDocumentType(fileName);
m_editor = TextEditorFactory.CreateSyntaxHighlightingEditor();
Languages lang = GetDocumentLanguage(fileName);
m_editor.SetLanguage(lang);
Control ctrl = (Control)m_editor;
ctrl.Tag = this;
m_editor.EditorTextChanged += editor_EditorTextChanged;
m_controlInfo = new ControlInfo(fileName, filePath, StandardControlGroup.Center);
// tell ControlHostService this control should be considered a document in the menu,
// and using the full path of the document for menu text to avoid adding a number in the end
// in control header, which is not desirable for documents that have the same name
// but located at different directories.
m_controlInfo.IsDocument = true;
}
示例6: ListView
/// <summary>
/// Finishes initializing component by creating ListView and initializing it, subscribing to drag events,
/// and registering the control</summary>
void IInitializable.Initialize()
{
m_resourcesListView = new ListView();
m_resourcesListView.SmallImageList = ResourceUtil.GetImageList16();
m_resourcesListView.AllowDrop = true;
m_resourcesListView.MultiSelect = true;
m_resourcesListView.AllowColumnReorder = true;
m_resourcesListView.LabelEdit = true;
m_resourcesListView.Dock = DockStyle.Fill;
m_resourcesListView.DragOver += new DragEventHandler(resourcesListView_DragOver);
m_resourcesListView.DragDrop += new DragEventHandler(resourcesListView_DragDrop);
m_resourcesListView.MouseUp += new MouseEventHandler(resourcesListView_MouseUp);
m_resourcesListViewAdapter = new ListViewAdapter(m_resourcesListView);
m_resourcesListViewAdapter.LabelEdited +=
new EventHandler<LabelEditedEventArgs<object>>(resourcesListViewAdapter_LabelEdited);
m_resourcesControlInfo = new ControlInfo(
Localizer.Localize("Resources"),
Localizer.Localize("Resources for selected Event"),
StandardControlGroup.Bottom);
m_controlHostService.RegisterControl(m_resourcesListView, m_resourcesControlInfo, this);
if (m_settingsService != null)
{
SettingsServices.RegisterSettings(
m_settingsService,
this,
new BoundPropertyDescriptor(this, () => ListViewSettings, "ListViewSettings", "", "")
);
}
}
示例7: SledTreeListViewEditor
public SledTreeListViewEditor(
string name,
string image,
string[] columns,
TreeListView.Style style,
StandardControlGroup controlGroup)
: base(style)
{
TreeListView.Name = name;
foreach (var column in columns)
TreeListView.Columns.Add(new TreeListView.Column(column));
{
var theImage =
(!string.IsNullOrEmpty(image) &&
ResourceUtil.GetImageList16().Images.ContainsKey(image))
? ResourceUtil.GetImageList16().Images[image]
: null;
m_controlInfo =
new ControlInfo(
TreeListView.Name,
TreeListView.Name,
controlGroup,
theImage);
}
}
示例8: CreateRectangle
private static Rectangle CreateRectangle(ControlInfo control)
{
return new Rectangle(
control.Left,
control.Top,
control.Width,
control.Height);
}
示例9: Configure
/// <summary>
/// Configures the property editor</summary>
/// <param name="propertyGrid">Property grid control</param>
/// <param name="controlInfo">Information about the control for the hosting service</param>
protected virtual void Configure(out PropertyGrid propertyGrid, out ControlInfo controlInfo)
{
propertyGrid = new PropertyGrid();
controlInfo = new ControlInfo(
"Property Editor".Localize(),
"Edits selected object properties".Localize(),
StandardControlGroup.Right, null,
"https://github.com/SonyWWS/ATF/wiki/Property-Editing-in-ATF".Localize());
}
示例10: Configure
/// <summary>
/// Configures the property editor</summary>
/// <param name="gridControl">Grid control</param>
/// <param name="controlInfo">Information about the control for the hosting service</param>
protected virtual void Configure(out GridControl gridControl, out ControlInfo controlInfo)
{
gridControl = new GridControl();
controlInfo = new ControlInfo(
"Grid Property Editor".Localize(),
"Edits selected object properties".Localize(),
StandardControlGroup.Bottom, null,
"https://github.com/SonyWWS/ATF/wiki/Property-Editing-in-ATF".Localize());
}
示例11: PerformanceMonitor
public PerformanceMonitor(IControlRegistry controlRegistry, IControlHostService controlHostService)
{
m_controlRegistry = controlRegistry;
m_controlHostService = controlHostService;
m_controlInfo = new ControlInfo(
"Performance Monitor".Localize(),
"Displays performance data on the currently active Control".Localize(),
StandardControlGroup.Floating);
m_controlInfo.VisibleByDefault = false;
}
示例12: GetControlsInfo
public ControlInfo GetControlsInfo(string pstrSource, ref int plonProcessLocation)
{
int slonNestDepth = 0;
slonNestDepth = 0;
ControlInfo sclsControlInfo = null;
//150503 sclsControlInfo = new ControlInfo(pstrSource, ref plonProcessLocation, ref slonNestDepth, ref mcolAllControls, ref mcolControlsByName); //not sure slstAllControls is being used
sclsControlInfo = new ControlInfo(pstrSource, ref plonProcessLocation, ref slonNestDepth, ref mcolAllControls, ref mcolControlsByName, false); //not sure slstAllControls is being used
return sclsControlInfo;
}
示例13: Configure
/// <summary>
/// Configures the property editor</summary>
/// <param name="gridControl">Grid control</param>
/// <param name="controlInfo">Information about the control for the hosting service</param>
protected virtual void Configure(out GridControl gridControl, out ControlInfo controlInfo)
{
gridControl = new GridControl();
controlInfo = new ControlInfo(
"Grid Property Editor", //Is the ID in the layout. We'll localize DisplayName instead.
"Edits selected object properties".Localize(),
StandardControlGroup.Bottom, null,
"https://github.com/SonyWWS/ATF/wiki/Property-Editing-in-ATF".Localize())
{
DisplayName = "Grid Property Editor".Localize()
};
}
示例14: RegisterControl
/// <summary>
/// Registers a control with the control host service</summary>
/// <param name="controlHostService">Control host service</param>
/// <param name="control">Control</param>
/// <param name="name">Control name</param>
/// <param name="description">Control description</param>
/// <param name="group">Initial location of control on main form</param>
/// <param name="client">Client that owns control, or null</param>
/// <returns>ControlInfo for registered control</returns>
public static ControlInfo RegisterControl(
this IControlHostService controlHostService,
Control control,
string name,
string description,
StandardControlGroup group,
IControlHostClient client)
{
var info = new ControlInfo(name, description, group);
controlHostService.RegisterControl(control, info, client);
return info;
}
示例15: PerformanceMonitor
public PerformanceMonitor(IControlRegistry controlRegistry, IControlHostService controlHostService)
{
m_controlRegistry = controlRegistry;
m_controlHostService = controlHostService;
m_controlInfo = new ControlInfo(
"Performance Monitor", //Is the ID in the layout. We'll localize DisplayName instead.
"Displays performance data on the currently active Control".Localize(),
StandardControlGroup.Floating)
{
DisplayName = "Performance Monitor".Localize()
};
m_controlInfo.VisibleByDefault = false;
}