本文整理汇总了C#中Target.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Target.ToString方法的具体用法?C# Target.ToString怎么用?C# Target.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Target
的用法示例。
在下文中一共展示了Target.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EnumerateTarget
public IEnumerable<MLEntity> EnumerateTarget(string directory, Target label, double sampleRate = 1.0)
{
var random = new Random(42); // reci NE nedeterminizmu
var files = System.IO.Directory.GetFiles(directory);
int count = 0;
foreach (var file in files)
{
long size = new System.IO.FileInfo(file).Length;
if (random.NextDouble() <= sampleRate && size < 1024 * 1024)
{
string domain = System.IO.Path.GetFileName(file);
++count;
yield return this.ReadFile(file, domain, label);
}
}
Logger.Log("{0} entities with label {1}", count, label.ToString());
}
示例2: OnNewConnectionLost
/// <summary>
/// Connection lost event handler.
/// This event gets called if connection to AtmoWin is lost and not recoverable.
/// </summary>
private void OnNewConnectionLost(Target target)
{
// Wait until MediaPortal is ready to display a dialog
Process mediaPortalProcess = Process.GetCurrentProcess();
while (mediaPortalProcess.MainWindowHandle == IntPtr.Zero)
{
Thread.Sleep(100);
mediaPortalProcess.Refresh();
}
DialogError(Localization.Translate("ContextMenu", "ConnectionLost").Replace("[Target]", target.ToString()));
}
示例3: OnNewConnectionLost
/// <summary>
/// Connection lost event handler.
/// This event gets called if connection to AtmoWin is lost and not recoverable.
/// </summary>
private void OnNewConnectionLost(Target target)
{
ServiceRegistration.Get<INotificationService>()
.EnqueueNotification(NotificationType.Error, "[AtmoLight.Name]",
MediaPortal.Common.Localization.LocalizationHelper.Translate("[AtmoLight.AtmoWinConnectionLost]")
.Replace("[Target]", target.ToString()), true);
}
示例4: Log
void Log(String action, Target target, double size, double objX, double objY, String inputType, double touchX, double touchY, double gazeX, double gazeY)
{
Log(action + ":" + target.ToString() + ":" + size + ":" + objX + ":" + objY + ":" + inputType + ":" + touchX + ":" + touchY + ":" + gazeX + ":" + gazeY);
}
开发者ID:prgoodwin,项目名称:Modeling-Mobile-Interactions-with-Eye-Tracking-Data,代码行数:4,代码来源:MainWindow.xaml.cs