public string GetConfigString() { switch (chosenStatus) { case PowerStatusChoice.Percentage: return(string.Format("Battery falls to {0}%", percentage)); default: return("Battery hits " + chosenBCS.ToString() + " status"); } }
/// <summary> /// <para>Returns the current Power status</para> /// </summary> /// <returns></returns> public static TreeNode GetStatus() { TreeNode tnMain = new TreeNode("Power"); tnMain.Nodes.Add("Active power scheme: " + ActivePowerScheme.Name + " (" + ActivePowerScheme.Guid.ToString() + ")"); tnMain.Nodes.Add("Power Line Status: " + PowerLineStatus.ToString()); tnMain.Nodes.Add("Battery charge status: " + BatteryChargeStatus.ToString()); tnMain.Nodes.Add("Battery available: " + BatteryAvailable.ToString()); tnMain.Nodes.Add("Battery full life time: " + BatteryFullLifetime.ToString()); tnMain.Nodes.Add("Battery remaining life time: " + BatteryLifeRemaining.ToString()); tnMain.Nodes.Add("Battery charge percent: " + BatteryLifePercent + "%"); return(tnMain); }