コード例 #1
0
ファイル: Parameter.cs プロジェクト: cube-soft/CubePowerSaver
 public static string PowerThrottlePolicyString(PowerThrottlePolicy id)
 {
     switch (id) {
     case PowerThrottlePolicy.PO_THROTTLE_NONE: return "最大のパフォーマンス";
     case PowerThrottlePolicy.PO_THROTTLE_CONSTANT: return "最小のパフォーマンス";
     case PowerThrottlePolicy.PO_THROTTLE_DEGRADE: return "バッテリの低下に応じる";
     case PowerThrottlePolicy.PO_THROTTLE_ADAPTIVE: return "パフォーマンスを動的に変更";
     default: break;
     }
     return "不明";
 }
コード例 #2
0
ファイル: Parameter.cs プロジェクト: cube-soft/CubePowerSaver
 public static int PowerThrottlePolicyToIndex(PowerThrottlePolicy id)
 {
     switch (id) {
     case PowerThrottlePolicy.PO_THROTTLE_NONE: return 0;
     case PowerThrottlePolicy.PO_THROTTLE_CONSTANT: return 1;
     case PowerThrottlePolicy.PO_THROTTLE_ADAPTIVE: return 2;
     default: break;
     }
     return 2;
 }