本文整理汇总了C#中IItem.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# IItem.ToString方法的具体用法?C# IItem.ToString怎么用?C# IItem.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IItem
的用法示例。
在下文中一共展示了IItem.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override void Execute() {
IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
content = activeView.Content as IItem;
//IOptimizer and IExecutables need some special care
if (content is IOptimizer) {
((IOptimizer)content).Runs.Clear();
}
if (content is IExecutable) {
IExecutable exec = content as IExecutable;
if (exec.ExecutionState != ExecutionState.Prepared) {
exec.Prepare();
}
}
HiveClient.Instance.Refresh();
ItemTask hiveTask = ItemTask.GetItemTaskForItem(content);
HiveTask task = hiveTask.CreateHiveTask();
RefreshableJob rJob = new RefreshableJob();
rJob.Job.Name = content.ToString();
rJob.HiveTasks.Add(task);
task.ItemTask.ComputeInParallel = content is Experiment || content is BatchRun;
progress = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToContent(this.content, "Uploading to Hive...");
rJob.Progress = progress;
progress.ProgressStateChanged += progress_ProgressStateChanged;
HiveClient.StartJob(new Action<Exception>(HandleEx), rJob, new CancellationToken());
}
示例2: ShowMessageInfo
public void ShowMessageInfo(IItem item, Point mousePosition)
{
showBuildMessage(item.ToString(), mousePosition);
}
示例3: DisplayData
public static void DisplayData(string varName, IItem item)
{
Console.WriteLine("{0}: {1} / {2}", varName, item.GetHashCode(), item.ToString());
}
示例4: CreateListViewItem
private ListViewItem CreateListViewItem(string name, IItem value, ListViewGroup group) {
var item = new ListViewItem(new string[] { name, value != null ? value.ToString() : "-" });
item.Tag = value;
item.Group = group;
listView.SmallImageList.Images.Add(value == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : value.ItemImage);
item.ImageIndex = listView.SmallImageList.Images.Count - 1;
return item;
}