コード例 #1
0
ファイル: ExecController.cs プロジェクト: sjvannTMU/Sage
 /// <summary>
 /// Initializes a new instance of the <see cref="ExecController"/> class. The caller may specify userData.
 /// <br></br>Frame rate must be from zero to 25. If zero, no contraint is imposed. For this constructor,
 /// the executive will be set while the model sets its ExecController.
 /// </summary>
 /// <param name="scale">The (logarithmic) run time scale. If set to double.MinValue, the model runs at full speed.</param>
 /// <param name="frameRate">The frame rate in render events per second. If zero, execution is unconstrained.</param>
 /// <param name="userData">The user data.</param>
 public ExecController(double scale, int frameRate, object userData = null)
 {
     if (!Disable)
     {
         m_userData   = userData;
         Scale        = scale;
         FrameRate    = frameRate;
         m_doThrottle = ThrottleExecution;
     }
 }
コード例 #2
0
ファイル: ExecController.cs プロジェクト: sjvannTMU/Sage
 /// <summary>
 /// Initializes a new instance of the <see cref="ExecController"/> class. The caller may specify userData.
 /// <br></br>Frame rate must be from zero to 25. If zero, no contraint is imposed.
 /// </summary>
 /// <param name="exec">The executive being controlled.</param>
 /// <param name="scale">The (logarithmic) run time scale. If set to double.MinValue, the model runs at full speed.</param>
 /// <param name="frameRate">The frame rate in render events per second. If zero, execution is unconstrained.</param>
 /// <param name="userData">The user data.</param>
 public ExecController(IExecutive exec, double scale, int frameRate, object userData)
 {
     if (!Disable)
     {
         m_userData  = userData;
         m_executive = exec;
         m_executive.ExecutiveStarted += m_executive_ExecutiveStarted;
         Scale            = scale;
         FrameRate        = frameRate;
         m_kickoffManager = new KickoffMgr(this, m_executive);
         m_doThrottle     = ThrottleExecution;
     }
 }