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


C# FileInfo.ToLongTimeString方法代码示例

本文整理汇总了C#中System.IO.FileInfo.ToLongTimeString方法的典型用法代码示例。如果您正苦于以下问题:C# FileInfo.ToLongTimeString方法的具体用法?C# FileInfo.ToLongTimeString怎么用?C# FileInfo.ToLongTimeString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.IO.FileInfo的用法示例。


在下文中一共展示了FileInfo.ToLongTimeString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

        /// <summary>
        /// Start point of the plugin.
        /// This method gets called by MediaPortal.
        /// </summary>
        public void Start()
        {
            // Log Handler
              Log.OnNewLog += new Log.NewLogHandler(OnNewLog);

              var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
              DateTime buildDate = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).LastWriteTime;
              Log.Info("Version {0}.{1}.{2}.{3}, build on {4} at {5}.", version.Major, version.Minor, version.Build,
            version.Revision, buildDate.ToShortDateString(), buildDate.ToLongTimeString());
              Log.Debug("Loading settings.");
              Settings.LoadSettings();
              Settings.SaveSettings();

              Log.Debug("Initialising event handler.");

              // PowerModeChanged Handler
              SystemEvents.PowerModeChanged += PowerModeChanged;

              // Screensaver Handler
              if (Settings.monitorScreensaverState)
              {
            Thread screensaverMonitorThread = new Thread(monitorScreensaverState);
            screensaverMonitorThread.IsBackground = true;
            screensaverMonitorThread.Start();
              }

              // g_Player Handler
              g_Player.PlayBackStarted += new g_Player.StartedHandler(g_Player_PlayBackStarted);
              g_Player.PlayBackStopped += new g_Player.StoppedHandler(g_Player_PlayBackStopped);
              g_Player.PlayBackEnded += new g_Player.EndedHandler(g_Player_PlayBackEnded);

              // FrameGrabber Handler
              MediaPortal.FrameGrabber.GetInstance().OnNewFrame +=
            new MediaPortal.FrameGrabber.NewFrameHandler(AtmolightPlugin_OnNewFrame);

              // Button Handler
              GUIWindowManager.OnNewAction += new OnActionHandler(OnNewAction);

              // Connection Lost Handler
              Core.OnNewConnectionLost += new Core.NewConnectionLostHandler(OnNewConnectionLost);

              // VU Meter Handler
              Core.OnNewVUMeter += new Core.NewVUMeterHander(OnNewVUMeter);

              staticColorTemp[0] = Settings.staticColorRed;
              staticColorTemp[1] = Settings.staticColorGreen;
              staticColorTemp[2] = Settings.staticColorBlue;

              Log.Debug("Generating new AtmoLight.Core instance.");
              coreObject = Core.GetInstance();

              // General settings
              coreObject.SetDelay(Settings.delayReferenceTime);
              if (Settings.delay)
              {
            coreObject.EnableDelay();
              }
              coreObject.SetGIFPath(Settings.gifFile);
              coreObject.SetReInitOnError(Settings.restartOnError);
              coreObject.SetStaticColor(Settings.staticColorRed, Settings.staticColorGreen, Settings.staticColorBlue);
              coreObject.SetCaptureDimensions(Settings.captureWidth, Settings.captureHeight);
              coreObject.blackbarDetection = Settings.blackbarDetection;
              coreObject.blackbarDetectionTime = Settings.blackbarDetectionTime;
              coreObject.blackbarDetectionThreshold = Settings.blackbarDetectionThreshold;
              coreObject.powerModeChangedDelay = Settings.powerModeChangedDelay;
              coreObject.vuMeterMindB = Settings.vuMeterMindB;
              coreObject.vuMeterMinHue = Settings.vuMeterMinHue;
              coreObject.vuMeterMaxHue = Settings.vuMeterMaxHue;
              coreObject.blackbarDetectionHorizontal = Settings.blackbarDetectionHorizontal;
              coreObject.blackbarDetectionVertical = Settings.blackbarDetectionVertical;
              coreObject.blackbarDetectionLinkAreas = Settings.blackbarDetectionLinkAreas;

              // AmbiBox
              coreObject.ambiBoxIP = Settings.ambiBoxIP;
              coreObject.ambiBoxPort = Settings.ambiBoxPort;
              coreObject.ambiBoxMaxReconnectAttempts = Settings.ambiBoxMaxReconnectAttempts;
              coreObject.ambiBoxReconnectDelay = Settings.ambiBoxReconnectDelay;
              coreObject.ambiBoxMediaPortalProfile = Settings.ambiBoxMediaPortalProfile;
              coreObject.ambiBoxExternalProfile = Settings.ambiBoxExternalProfile;
              coreObject.ambiBoxPath = Settings.ambiBoxPath;
              coreObject.ambiBoxAutoStart = Settings.ambiBoxAutoStart;
              coreObject.ambiBoxAutoStop = Settings.ambiBoxAutoStop;
              if (Settings.ambiBoxTarget)
              {
            coreObject.AddTarget(Target.AmbiBox);
              }

              // AtmoOrb
              coreObject.atmoOrbBlackThreshold = Settings.atmoOrbBlackThreshold;
              coreObject.atmoOrbBroadcastPort = Settings.atmoOrbBroadcastPort;
              coreObject.atmoOrbGamma = Settings.atmoOrbGamma;
              coreObject.atmoOrbLamps = Settings.atmoOrbLamps;
              coreObject.atmoOrbMinDiversion = Settings.atmoOrbMinDiversion;
              coreObject.atmoOrbSaturation = Settings.atmoOrbSaturation;
              coreObject.atmoOrbThreshold = Settings.atmoOrbThreshold;
              coreObject.atmoOrbUseOverallLightness = Settings.atmoOrbUseOverallLightness;
//.........这里部分代码省略.........
开发者ID:WoLpH,项目名称:AtmoLight,代码行数:101,代码来源:Plugin.cs

示例2: Initialise

    private void Initialise()
    {
      // Log Handler
      Log.OnNewLog += new Log.NewLogHandler(OnNewLog);

      // Version Infos
      var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
      DateTime buildDate = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).LastWriteTime;
      Log.Info("Version {0}.{1}.{2}.{3}, build on {4} at {5}.", version.Major, version.Minor, version.Build,
        version.Revision, buildDate.ToShortDateString(), buildDate.ToLongTimeString());

      // Settings
      Log.Debug("Loading settings.");
      settings = new AtmoLight.Settings();
      settings.LoadAll();
      settings.SaveAll();

      // AtmoLight object creation
      Log.Debug("Generating new AtmoLight.Core instance.");
      coreObject = Core.GetInstance();

      // General settings
      coreObject.SetDelay(settings.DelayTime);
      if (settings.Delay)
      {
        coreObject.EnableDelay();
      }
      coreObject.SetGIFPath(settings.GIFFile);
      coreObject.SetReInitOnError(settings.RestartAtmoWinOnError);
      coreObject.SetStaticColor(settings.StaticColorRed, settings.StaticColorGreen, settings.StaticColorBlue);
      coreObject.SetCaptureDimensions(settings.CaptureWidth, settings.CaptureHeight);
      coreObject.blackbarDetection = settings.BlackbarDetection;
      coreObject.blackbarDetectionTime = settings.BlackbarDetectionTime;
      coreObject.blackbarDetectionThreshold = settings.BlackbarDetectionThreshold;
      coreObject.powerModeChangedDelay = settings.PowerModeChangedDelay;
      coreObject.blackbarDetectionLinkAreas = settings.BlackbarDetectionLinkAreas;
      coreObject.blackbarDetectionHorizontal = settings.BlackbarDetectionHorizontal;
      coreObject.blackbarDetectionVertical = settings.BlackbarDetectionVertical;

      // API
      coreObject.apiServerEnabled = settings.RemoteApiServer;

      // AmbiBox
      coreObject.ambiBoxAutoStart = settings.AmbiBoxAutoStart;
      coreObject.ambiBoxAutoStop = settings.AmbiBoxAutoStop;
      coreObject.ambiBoxExternalProfile = settings.AmbiBoxExternalProfile;
      coreObject.ambiBoxIP = settings.AmbiBoxIP;
      coreObject.ambiBoxMaxReconnectAttempts = settings.AmbiBoxMaxReconnectAttempts;
      coreObject.ambiBoxMediaPortalProfile = settings.AmbiBoxMediaPortalProfile;
      coreObject.ambiBoxPath = settings.AmbiBoxPath;
      coreObject.ambiBoxPort = settings.AmbiBoxPort;
      coreObject.ambiBoxReconnectDelay = settings.AmbiBoxReconnectDelay;
      if (settings.AmbiBoxTarget)
      {
        coreObject.AddTarget(Target.AmbiBox);
      }

      // AtmoWin
      coreObject.atmoWinPath = settings.AtmoWinExe;
      coreObject.atmoWinAutoStart = settings.StartAtmoWinOnStart;
      coreObject.atmoWinAutoStop = settings.StopAtmoWinOnExit;
      coreObject.atmoWakeHelperEnabled = settings.AtmoWakeHelperEnabled;
      coreObject.atmoWakeHelperComPort = settings.AtmoWakeHelperComPort;
      coreObject.atmoWakeHelperResumeDelay = settings.AtmoWakeHelperResumeDelay;
      coreObject.atmoWakeHelperDisconnectDelay = settings.AtmoWakeHelperDisconnectDelay;
      coreObject.atmoWakeHelperConnectDelay = settings.AtmoWakeHelperConnectDelay;
      coreObject.atmoWakeHelperReinitializationDelay = settings.AtmoWakeHelperReinitializationDelay;
      if (settings.AtmoWinTarget)
      {
        coreObject.AddTarget(Target.AtmoWin);
      }

      // Boblight
      coreObject.boblightIP = settings.BoblightIP;
      coreObject.boblightPort = settings.BoblightPort;
      coreObject.boblightMaxFPS = settings.BoblightMaxFPS;
      coreObject.boblightMaxReconnectAttempts = settings.BoblightMaxReconnectAttempts;
      coreObject.boblightReconnectDelay = settings.BoblightReconnectDelay;
      coreObject.boblightSpeed = settings.BoblightSpeed;
      coreObject.boblightAutospeed = settings.BoblightAutospeed;
      coreObject.boblightInterpolation = settings.BoblightInterpolation;
      coreObject.boblightSaturation = settings.BoblightSaturation;
      coreObject.boblightValue = settings.BoblightValue;
      coreObject.boblightThreshold = settings.BoblightThreshold;
      coreObject.boblightGamma = settings.BoblightGamma;
      if (settings.BoblightTarget)
      {
        coreObject.AddTarget(Target.Boblight);
      }

      // Hyperion
      coreObject.hyperionIP = settings.HyperionIP;
      coreObject.hyperionPort = settings.HyperionPort;
      coreObject.hyperionPriority = settings.HyperionPriority;
      coreObject.hyperionReconnectDelay = settings.HyperionReconnectDelay;
      coreObject.hyperionReconnectAttempts = settings.HyperionReconnectAttempts;
      coreObject.hyperionPriorityStaticColor = settings.HyperionPriorityStaticColor;
      coreObject.hyperionLiveReconnect = settings.HyperionLiveReconnect;
      if (settings.HyperionTarget)
      {
//.........这里部分代码省略.........
开发者ID:chli,项目名称:AtmoLight,代码行数:101,代码来源:Plugin.cs

示例3: ShowPlugin

        /// <summary>
        /// Opens the AtmoLight setuo form.
        /// </summary>
        public void ShowPlugin()
        {
            if (atmoLightSetupForm == null)
              {
            // Log Handler
            Log.OnNewLog += new Log.NewLogHandler(OnNewLog);

            var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            DateTime buildDate = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).LastWriteTime;
            Log.Info("Version {0}.{1}.{2}.{3}, build on {4} at {5}.", version.Major, version.Minor, version.Build,
              version.Revision, buildDate.ToShortDateString(), buildDate.ToLongTimeString());
            Log.Debug("Loading settings.");
            Settings.LoadSettings();
            atmoLightSetupForm = new SetupForm();
              }
              atmoLightSetupForm.ShowDialog();
        }
开发者ID:WoLpH,项目名称:AtmoLight,代码行数:20,代码来源:Plugin.cs

示例4: Core

 /// <summary>
 /// Core Constructor
 /// </summary>
 private Core()
 {
     var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
       DateTime buildDate = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).LastWriteTime;
       Log.Debug("Core Version {0}.{1}.{2}.{3}, build on {4} at {5}.", version.Major, version.Minor, version.Build, version.Revision, buildDate.ToShortDateString(), buildDate.ToLongTimeString());
       return;
 }
开发者ID:WoLpH,项目名称:AtmoLight,代码行数:10,代码来源:Core.cs


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