当前位置: 首页>>代码示例>>C#>>正文


C# Target.ToString方法代码示例

本文整理汇总了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());
        }
开发者ID:trooper,项目名称:websiteclassification,代码行数:18,代码来源:Reader.cs

示例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()));
 }
开发者ID:WoLpH,项目名称:AtmoLight,代码行数:15,代码来源:Plugin.cs

示例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);
 }
开发者ID:chli,项目名称:AtmoLight,代码行数:11,代码来源:Plugin.cs

示例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


注:本文中的Target.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。