public string Mode(List <string> arguments) { bool isModeValid = Enum.TryParse <SystemMode>(arguments[0], out SystemMode newMode); if (!isModeValid) { throw new InvalidSystemModeException("Entered system mode is invalid"); } this.currentSystemMode = newMode; switch (this.currentSystemMode) { case SystemMode.Full: this.energyModifier = 1; this.oreModifier = 1; break; case SystemMode.Half: this.energyModifier = 0.6; this.oreModifier = 0.5; break; case SystemMode.Energy: this.energyModifier = 0; this.oreModifier = 0; break; } return($"Successfully changed working mode to {newMode.ToString()} Mode"); }
public string Mode(List <string> arguments) { var mode = arguments[0]; this.systemMode = (SystemMode)Enum.Parse(typeof(SystemMode), mode); return($"Successfully changed working mode to {mode} Mode"); }
public DraftManager() { this.systemMode = SystemMode.Full; this.TotalStoredEnergy = 0d; this.TotalMinedOre = 0d; this.harvesters = new Dictionary <string, Harvester>(); this.providers = new Dictionary <string, Provider>(); this.miningUnits = new Dictionary <string, MiningUnit>(); }
/// <summary> /// Set the operation mode of the robot. (TestMode Only) /// See http://www.neatorobotics.com/programmers-manual/table-of-robot-application-commands/detailed-command-descriptions/#SetSystemMode for more info. /// </summary> /// <param name="mode">TODO: Describe parameter.</param> public void SetSystemMode(SystemMode mode) { if (!this.neato.TestMode) { throw new NotInTestModeException("SetSystemMode"); } this.neato.Connection.SendCommand("SetSystemMode " + mode); }
public int CompareTo(Trial other ,SystemMode mode ) { double myScore = GetScoreForMode(mode); double othersScore = other.GetScoreForMode(mode); if (myScore < othersScore) return -1; if (myScore > othersScore) return 1; return 0; }
public DraftManager() { this.currentSystemMode = SystemMode.Full; this.energyModifier = 1; this.oreModifier = 1; this.registeredHarvesters = new List <Harvester>(); this.registeredProviders = new List <Provider>(); this.harvesterFactory = new HarvesterFactory(); this.providerFactory = new ProviderFactory(); this.totalStoredEnergy = 0d; this.totalMinedOre = 0d; }
private void MainForm_Load(object sender, EventArgs e) { Control.CheckForIllegalCrossThreadCalls = false; // default settings to encryption this.mainTabCtrl.SelectedTab = this.tabEncrypt; this._userMode = SystemMode.eEncryption; this.labStatus.Text = string.Format("Ready for {0}", ((this._userMode == SystemMode.eEncryption) ? "Encryption" : "Decryption")); this.labDuration.Text = string.Empty; // use supported alogrithms as data source for selection this.comboAlogrithms.DataSource = Enum.GetNames(typeof(SupportedAlogrithm)).ToList(); }
public static string GetSystemModeText(SystemMode m) { switch (m) { case SystemMode.DEV: return Resources.Resource.DEV; case SystemMode.UAT: return Resources.Resource.UAT; case SystemMode.LIVE: return Resources.Resource.LIVE; default: return string.Empty; } }
public double GetScoreForMode(SystemMode mode) { switch (mode) { case SystemMode.StopGuessing: return OurBlockScore; case SystemMode.Basic: return IndustryBlockScore; case SystemMode.SSH: return SSHBlockScore; default: return 0; } }
// Start is called before the first frame update void Start() { ShowAllTextAndHighlights(false); sfxSliderInitialPos = sfxVolumeSlider.localPosition; musicSliderInitialPos = musicVolumeSlider.localPosition; saveSwitchPivotInitialRot = saveSwitchPivot.rotation; resumeSwitchPivotInitialRot = resumeSwitchPivot.rotation; spiderSwitchPivotInitialRot = spiderSwitchPivot.rotation; functionLabelAlphaIsIncreasing = false; SystemState = SystemMode.Selecting; }
private void ShowAllTextAndHighlights(bool show) { if (show) { curSelectedOption = saveGameSelect; labelListImage.texture = saveGameSelect; SystemState = SystemMode.Selecting; } else { SystemState = SystemMode.Selecting; } labelListImage.enabled = show; }
public void PressCircle() { if (SystemState == SystemMode.Saving) { SystemState = SystemMode.Selecting; saveSwitchPivot.rotation = saveSwitchPivotInitialRot; } else if (SystemState == SystemMode.Resuming) { SystemState = SystemMode.Selecting; resumeSwitchPivot.rotation = resumeSwitchPivotInitialRot; } else if (SystemState == SystemMode.AdjustingSFX || SystemState == SystemMode.AdjustingMusic || SystemState == SystemMode.ShuttingDown) { SystemState = SystemMode.Selecting; } }
private void mainTabCtrl_SelectedIndexChanged(object sender, EventArgs e) { // share controls between tabs this.groupFile.Parent = mainTabCtrl.SelectedTab; this.groupText.Parent = mainTabCtrl.SelectedTab; ResetInputControls(); if (mainTabCtrl.SelectedTab == this.tabEncrypt) { this._userMode = SystemMode.eEncryption; } else if (mainTabCtrl.SelectedTab == this.tabDecrypt) { this._userMode = SystemMode.eDecryption; } }
/// <summary> Determines if the given pin can be used in the system mode, or if it used by another device. </summary> public static bool CheckPin(BBBPin Pin, SystemMode Mode) { if (!PinInfo.ContainsKey(Pin)) { return(false); } if (Mode == SystemMode.DEFAULT) { return(PinInfo[Pin].Devices == 0); } // No devices must be present. else if (Mode == SystemMode.NO_STORAGE) { return((PinInfo[Pin].Devices & 0b1111_1110) == 0); } // No devices except for eMMC must be present. else if (Mode == SystemMode.NO_HDMI) { return((PinInfo[Pin].Devices & 0b1111_1101) == 0); } // No devices except for HDMI must be present. return(false); // Invalid system mode. }
public void PressX() { if (SystemState == SystemMode.Selecting) { if (curSelectedOption == saveGameSelect) { SystemState = SystemMode.Saving; saveSwitchPivot.Rotate(0, 0, switchOnRotationY); } else if (curSelectedOption == resumeGameSelect) { SystemState = SystemMode.Resuming; resumeSwitchPivot.Rotate(0, 0, switchOnRotationY); } else if (curSelectedOption == sfxVolumeSelect) { SystemState = SystemMode.AdjustingSFX; } else if (curSelectedOption == musicVolumeSelect) { SystemState = SystemMode.AdjustingMusic; } else if (curSelectedOption == spidersEverywhereSelect) { ToggleSpiders(); } else if (curSelectedOption == shutdownSelect) { SystemState = SystemMode.ShuttingDown; } labelListImage.color = new Color(labelListImage.color.r, labelListImage.color.g, labelListImage.color.b, functionLabelFullAlpha); } else if (SystemState == SystemMode.AdjustingSFX || SystemState == SystemMode.AdjustingMusic) { SystemState = SystemMode.Selecting; } }
private static extern IntPtr Photon_Audio_In_Create(SystemMode systemMode, int micDevIdx, int spkDevIdx, Action <IntPtr, int> callback, bool featrModeOn, bool noiseSup, bool agc, bool cntrClip);
private void ShutDownTheGame() { SystemState = SystemMode.ShuttingDown; }
/// <summary> Prepares the Beaglebone I/O system for use. </summary> /// <param name="UseFastAccess"> /// This switches between memory mapped I/O (true), and filesystem-based I/O (false). /// Filesystem-based I/O is the "correct" Linux way to do it, so is therefore more supported. /// Memory mapping is several orders of magnitude faster (Up to 1000x!), but is not technically supported. That said, it almost always works fine. /// We suggest you try memory-mapped at first, then if you run into odd issues, try filesystem to see if it helps. /// This only affects some I/O types, mainly GPIO. /// </param> public static void Initialize(SystemMode Mode, bool UseFastAccess) { Peripherals = Mode; FastGPIO = UseFastAccess; }
private void SaveGame() { SystemState = SystemMode.Saving; }
private void ResumeGame() { SystemState = SystemMode.Resuming; }
} // 0x0000000180F39A50-0x0000000180F39AC0 // Methods private static extern IntPtr Photon_Audio_In_Create(int instanceID, SystemMode systemMode, int micDevIdx, int spkDevIdx, Action <int, IntPtr, int> callback, bool featrModeOn, bool noiseSup, bool agc, bool cntrClip); // 0x0000000180F39890-0x0000000180F39990
public async Task SetSystemMode(string icd, SystemMode mode) => await _hubProxy.Invoke("SetSystemMode", icd, mode.ToString());