本文整理汇总了C#中WorkspaceItem类的典型用法代码示例。如果您正苦于以下问题:C# WorkspaceItem类的具体用法?C# WorkspaceItem怎么用?C# WorkspaceItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WorkspaceItem类属于命名空间,在下文中一共展示了WorkspaceItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: create_a_selected_workspace_item
public void create_a_selected_workspace_item()
{
var item = new WorkspaceItem("something", true);
item.Children[0].ShouldBeOfType<CheckBox>().IsChecked.ShouldEqual(true);
item.Selected.ShouldBeTrue();
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:7,代码来源:WorkspaceItemTester.cs
示例2: GetService
public virtual object GetService (WorkspaceItem item, Type type)
{
if (type.IsInstanceOfType (this))
return this;
else
return GetNext (item).GetService (item, type);
}
开发者ID:jgranick,项目名称:haxedevelop,代码行数:7,代码来源:ProjectServiceExtension.cs
示例3: ExportSolutionDialog
public ExportSolutionDialog(WorkspaceItem item, FileFormat selectedFormat)
{
this.Build();
labelNewFormat.Text = item.FileFormat.Name;
formats = Services.ProjectService.FileFormats.GetFileFormatsForObject (item);
foreach (FileFormat format in formats)
comboFormat.AppendText (format.Name);
int sel = Array.IndexOf (formats, selectedFormat);
if (sel == -1) sel = 0;
comboFormat.Active = sel;
if (formats.Length < 2) {
table.Remove (newFormatLabel);
newFormatLabel.Destroy ();
newFormatLabel = null;
table.Remove (comboFormat);
comboFormat.Destroy ();
comboFormat = null;
}
//auto height
folderEntry.WidthRequest = 380;
Resize (1, 1);
folderEntry.Path = item.ItemDirectory;
UpdateControls ();
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:30,代码来源:ExportSolutionDialog.cs
示例4: Initialize
public override void Initialize (OptionsDialog dialog, object dataObject)
{
base.Initialize (dialog, dataObject);
solutionItem = dataObject as SolutionEntityItem;
if (solutionItem != null)
workspaceItem = solutionItem.ParentSolution;
else
workspaceItem = dataObject as WorkspaceItem;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:10,代码来源:ItemOptionsPanel.cs
示例5: ProcessWorkspaceItems
string ProcessWorkspaceItems(WorkspaceItem[] items, ProcessWorkspaceItemDelegate process)
{
string result = String.Empty;
int i = 0;
int count = items.Length;
foreach (WorkspaceItem item in items)
{
UpdateResult(ref result, process(item, ++i, count));
}
return result;
}
开发者ID:rlefever68,项目名称:Broobu.HamRadio,代码行数:11,代码来源:WorkspaceBrowserTestFixture.cs
示例6: should_expose_the_selected_value
public void should_expose_the_selected_value()
{
var item = new WorkspaceItem("something", false);
item.Selected.ShouldBeFalse();
item.Children[0].ShouldBeOfType<CheckBox>().IsChecked = true;
item.Selected.ShouldBeTrue();
item.Children[0].ShouldBeOfType<CheckBox>().IsChecked = false;
item.Selected.ShouldBeFalse();
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:11,代码来源:WorkspaceItemTester.cs
示例7: PrintWorkspaceItem
string PrintWorkspaceItem(WorkspaceItem item, int counter, int count)
{
int indentLevelOrig = Debug.IndentLevel;
int indentLevel = Debug.IndentLevel;
Debug.IndentLevel = ++indentLevel;
Debug.WriteLine(item.ToString());
Debug.IndentLevel = ++indentLevel;
if (item.Descriptions != null)
{
int i = 1;
int length = item.Descriptions.Length;
Debug.WriteLine(String.Format("Descriptions[{0}]", length)); Logger.InfoFormat("Descriptions[{0}]", length);
Debug.IndentLevel = ++indentLevel;
foreach (WorkspaceItemDescription description in item.Descriptions)
{
Debug.WriteLine(String.Format("Description {0} of {1} => {2}", i, length, description));
Logger.InfoFormat("\tDescription {0} of {1} => {2}", i++, length, description);
}
Debug.IndentLevel = --indentLevel;
}
if (item.Children != null)
{
int i = 1;
int length = item.Children.Length;
Debug.WriteLine(String.Format("Children[{0}]", length)); Logger.InfoFormat("Children[{0}]", length);
Debug.IndentLevel = ++indentLevel;
foreach (WorkspaceItem child in item.Children)
{
Debug.WriteLine(String.Format("Child {0} of {1} => {2}", i, length, child));
Logger.InfoFormat("\tChild {0} of {1} => {2}", i++, length, child);
}
Debug.IndentLevel = --indentLevel;
}
if (item.Properties != null)
{
int i = 1;
int length = item.Properties.Length;
Debug.WriteLine(String.Format("Properties[{0}]", length)); Logger.InfoFormat("Properties[{0}]", length);
Debug.IndentLevel = ++indentLevel;
foreach (WorkspaceItemProperty property in item.Properties)
{
Debug.WriteLine(String.Format("Property {0} of {1} => {2}", i, length, property));
Logger.InfoFormat("\tProperty {0} of {1} => {2}", i++, length, property);
}
Debug.IndentLevel = --indentLevel;
}
Debug.IndentLevel = indentLevelOrig;
return String.Empty;
}
开发者ID:rlefever68,项目名称:Broobu.HamRadio,代码行数:49,代码来源:WorkspaceBrowserTestFixture.cs
示例8: Export
public void Export (WorkspaceItem item)
{
Export (item, null);
}
开发者ID:nocache,项目名称:monodevelop,代码行数:4,代码来源:ProjectOperations.cs
示例9: InternalWriteWorkspaceItem
internal void InternalWriteWorkspaceItem (IProgressMonitor monitor, string file, WorkspaceItem item)
{
string newFile = WriteFile (monitor, file, item, item.FileFormat);
if (newFile != null)
item.FileName = newFile;
else
throw new InvalidOperationException ("FileFormat not provided for workspace item '" + item.Name + "'");
}
开发者ID:hduregger,项目名称:monodevelop,代码行数:8,代码来源:ProjectService.cs
示例10: Load
public static void Load (WorkspaceItem item)
{
if (IncLoadCount (item) != 1)
return;
lock (databases) {
if (item is Workspace) {
Workspace ws = (Workspace) item;
foreach (WorkspaceItem it in ws.Items)
Load (it);
ws.ItemAdded += OnWorkspaceItemAdded;
ws.ItemRemoved += OnWorkspaceItemRemoved;
}
else if (item is Solution) {
Solution solution = (Solution) item;
foreach (Project project in solution.GetAllProjects ())
Load (project);
// Refresh the references of all projects. This is necessary because
// some project may have been loaded before the projects their reference,
// in which case those references are not properly registered.
foreach (Project project in solution.GetAllProjects ()) {
ProjectDom dom = GetProjectDom (project);
// referenced by main project - prevents the removal if a project is referenced one time inside the solution
// and the project that references it is reloaded.
dom.ReferenceCount++;
if (dom != null)
dom.UpdateReferences ();
}
solution.SolutionItemAdded += OnSolutionItemAdded;
solution.SolutionItemRemoved += OnSolutionItemRemoved;
}
}
}
开发者ID:Poiros,项目名称:monodevelop,代码行数:33,代码来源:ProjectDomService.cs
示例11: GetUserTasksFilename
static FilePath GetUserTasksFilename (WorkspaceItem item)
{
FilePath combinePath = item.FileName.ParentDirectory;
return combinePath.Combine (item.FileName.FileNameWithoutExtension + ".usertasks");
}
开发者ID:head-thrash,项目名称:monodevelop,代码行数:5,代码来源:TaskService.cs
示例12: GetNeedsBuilding
protected virtual bool GetNeedsBuilding (WorkspaceItem item, ConfigurationSelector configuration)
{
if (item is Solution)
return GetNeedsBuilding ((Solution) item, configuration);
return GetNext (item).GetNeedsBuilding ((IBuildTarget) item, configuration);
}
开发者ID:jgranick,项目名称:haxedevelop,代码行数:6,代码来源:ProjectServiceExtension.cs
示例13: WorkspaceItemChangeEventArgs
public WorkspaceItemChangeEventArgs (WorkspaceItem item, bool reloading): base (item)
{
this.reloading = reloading;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:4,代码来源:WorkspaceItemEventArgs.cs
示例14: WorkspaceItemEventArgs
public WorkspaceItemEventArgs (WorkspaceItem item)
{
this.item = item;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:4,代码来源:WorkspaceItemEventArgs.cs
示例15: Unload
public static void Unload (WorkspaceItem item)
{
if (DecLoadCount (item) != 0)
return;
if (item is Workspace) {
Workspace ws = (Workspace) item;
foreach (WorkspaceItem it in ws.Items)
Unload (it);
ws.ItemAdded -= OnWorkspaceItemAdded;
ws.ItemRemoved -= OnWorkspaceItemRemoved;
}
else if (item is Solution) {
Solution solution = (Solution) item;
foreach (Project project in solution.GetAllProjects ())
Unload (project);
solution.SolutionItemAdded -= OnSolutionItemAdded;
solution.SolutionItemRemoved -= OnSolutionItemRemoved;
}
}
开发者ID:trustme,项目名称:monodevelop,代码行数:20,代码来源:ProjectDomService.cs
示例16: CanExecute
protected virtual bool CanExecute (WorkspaceItem item, ExecutionContext context, ConfigurationSelector configuration)
{
if (item is Solution)
return CanExecute ((Solution) item, context, configuration);
else
return GetNext (item).CanExecute ((IBuildTarget) item, context, configuration);
}
开发者ID:jgranick,项目名称:haxedevelop,代码行数:7,代码来源:ProjectServiceExtension.cs
示例17: GetExecutionTargets
protected virtual IEnumerable<ExecutionTarget> GetExecutionTargets (WorkspaceItem item, ConfigurationSelector configuration)
{
if (item is Solution)
return GetExecutionTargets ((Solution) item, configuration);
else
return GetNext (item).GetExecutionTargets ((IBuildTarget) item, configuration);
}
开发者ID:jgranick,项目名称:haxedevelop,代码行数:7,代码来源:ProjectServiceExtension.cs
示例18: should_put_the_workspace_name_in_the_label
public void should_put_the_workspace_name_in_the_label()
{
var item = new WorkspaceItem("something", true);
item.Children[1].ShouldBeOfType<Label>().Content.ShouldEqual("something");
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:5,代码来源:WorkspaceItemTester.cs
示例19: SetNeedsBuilding
protected virtual void SetNeedsBuilding (WorkspaceItem item, bool val, ConfigurationSelector configuration)
{
if (item is Solution)
SetNeedsBuilding ((Solution) item, val, configuration);
else
GetNext (item).SetNeedsBuilding ((IBuildTarget) item, val, configuration);
}
开发者ID:jgranick,项目名称:haxedevelop,代码行数:7,代码来源:ProjectServiceExtension.cs
示例20: should_remember_the_workspace_name
public void should_remember_the_workspace_name()
{
var item = new WorkspaceItem("something", true);
item.WorkspaceName.ShouldEqual("something");
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:5,代码来源:WorkspaceItemTester.cs
注:本文中的WorkspaceItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论