/// <summary> /// Set status bar colors based on the settings loaded /// </summary> public void InitStatusBar() { this.StatusIdle.Background = StatusColorEditor.GetStatusColor(PhoneStatusCodes.Idle); this.StatusRinging.Background = StatusColorEditor.GetStatusColor(PhoneStatusCodes.Ringing); this.StatusOutOfService.Background = StatusColorEditor.GetStatusColor(PhoneStatusCodes.OutOfService); this.StatusBusy.Background = StatusColorEditor.GetStatusColor(PhoneStatusCodes.Busy); this.StatusNotExisting.Background = StatusColorEditor.GetStatusColor(PhoneStatusCodes.NotExisting); }
public void SetRangeStatus(int Index, PhoneStatusCodes NewStatus) { if (Index < 0 || Index > 9) { return; } if (NewStatus < PhoneStatusCodes.NumberOfStatusCodes) { if (Index == 0) { this.StatusText0.Background = StatusColorEditor.GetStatusColor(NewStatus); } else if (Index == 1) { this.StatusText1.Background = StatusColorEditor.GetStatusColor(NewStatus); } else if (Index == 2) { this.StatusText2.Background = StatusColorEditor.GetStatusColor(NewStatus); } else if (Index == 3) { this.StatusText3.Background = StatusColorEditor.GetStatusColor(NewStatus); } else if (Index == 4) { this.StatusText4.Background = StatusColorEditor.GetStatusColor(NewStatus); } else if (Index == 5) { this.StatusText5.Background = StatusColorEditor.GetStatusColor(NewStatus); } else if (Index == 6) { this.StatusText6.Background = StatusColorEditor.GetStatusColor(NewStatus); } else if (Index == 7) { this.StatusText7.Background = StatusColorEditor.GetStatusColor(NewStatus); } else if (Index == 8) { this.StatusText8.Background = StatusColorEditor.GetStatusColor(NewStatus); } else if (Index == 9) { this.StatusText9.Background = StatusColorEditor.GetStatusColor(NewStatus); } } //unknown status ? Bail out else { return; } CurrentStatusRange[Index] = NewStatus; }
/// <summary> /// Change the status of this phone.It will have different color /// </summary> /// <param name="NewStatus"></param> public void SetStatus(PhoneStatusCodes NewStatus) { if (NewStatus < PhoneStatusCodes.NumberOfStatusCodes) { this.StatusText.Background = StatusColorEditor.GetStatusColor(NewStatus); } //unknown status ? Bail out else { return; } CurrentStatus = NewStatus; }
/// <summary> /// This is a global event passed from main window to all children /// </summary> public void OnStatusColorChanged() { this.StatusText.Background = StatusColorEditor.GetStatusColor(CurrentStatus); }