/// <summary>
 /// Updates from a particular setting state.
 /// </summary>
 /// <param name="state">The new state that will be set.</param>
 public static void UpdateFromState(SmartTrackSettingsState state)
 {
   ActivationDelayMilliseconds = state.ActivationDelayMilliseconds;
   ActivePointColor = state.ActivePointColor;
   LineColor = state.LineColor;
   PointColor = state.PointColor;
   SmartOrtho = state.SmartOrtho;
   SmartTangents = state.SmartTangents;
   TanPerpLineColor = state.TanPerpLineColor;
   UseDottedLines = state.UseDottedLines;
   UseSmartTrack = state.UseSmartTrack;
 }
    static SmartTrackSettingsState CreateState(bool current)
    {
      IntPtr pSettings = UnsafeNativeMethods.CRhinoAppSmartTrackSettings_New(current);
      SmartTrackSettingsState rc = new SmartTrackSettingsState();
      rc.ActivationDelayMilliseconds = UnsafeNativeMethods.CRhinoAppSmartTrackSettings_GetInt(true, pSettings);
      rc.ActivePointColor = GetColor(idxActivePointColor, pSettings);
      rc.LineColor = GetColor(idxLineColor, pSettings);
      rc.PointColor = GetColor(idxPointColor, pSettings);
      rc.SmartOrtho = GetBool(idxSmartOrtho, pSettings);
      rc.SmartTangents = GetBool(idxSmartTangents, pSettings);
      rc.TanPerpLineColor = GetColor(idxTanPerpLineColor, pSettings);
      rc.UseDottedLines = GetBool(idxDottedLines, pSettings);
      rc.UseSmartTrack = GetBool(idxUseSmartTrack, pSettings);

      UnsafeNativeMethods.CRhinoAppSmartTrackSettings_Delete(pSettings);
      return rc;
    }