/// <summary> /// Get the status string based off the status given. /// </summary> /// <param name="status">Status given.</param> /// <returns>String based off status given.</returns> public static string GetStatusString(eAdcpStatus status) { switch (status) { case eAdcpStatus.Unknown: return(""); case eAdcpStatus.Compass: return("Compass Mode"); case eAdcpStatus.NotConnected: return("Not Connected"); case eAdcpStatus.Connected: return("Connected"); case eAdcpStatus.Downloading: return("Downloading"); case eAdcpStatus.Uploading: return("Uploading"); case eAdcpStatus.Importing: return("Importing"); default: return(""); } }
/// <summary> /// Get a color brush for the given status. /// This is used to give alert colors based off /// the status. /// </summary> /// <param name="status">Status to get the color.</param> /// <returns>Color brush based off status given.</returns> public static Brush GetStatusColor(eAdcpStatus status) { switch (status) { case eAdcpStatus.Unknown: return(new SolidColorBrush(Colors.Black)); case eAdcpStatus.Compass: case eAdcpStatus.Downloading: case eAdcpStatus.Uploading: case eAdcpStatus.Importing: return(new SolidColorBrush(Colors.Yellow)); case eAdcpStatus.NotConnected: return(new SolidColorBrush(Colors.Red)); case eAdcpStatus.Connected: return(new SolidColorBrush(Colors.Green)); default: return(new SolidColorBrush(Colors.Black)); } }
/// <summary> /// Initialize the object with the status. /// </summary> /// <param name="status">Current status.</param> public AdcpStatus(eAdcpStatus status) { Status = status; }
/// <summary> /// Initialize the object with the Unknown status. /// </summary> public AdcpStatus() { Status = eAdcpStatus.Unknown; }