/// <summary> /// コンストラクタ /// </summary> public Employee(string name, EDestination dest, ObservableCollection <DestinationHistory> histories) { DispName = name; Destination = dest; OrgDestination = dest; Histories = histories; }
/// <summary> /// 行き先をじゅんぐり変える /// </summary> public void ChangeDestination() { // じゅんぐり変える。 EDestination now = Destination; now += 1; if ((int)now >= Enum.GetValues(typeof(EDestination)).GetLength(0)) { now = 0; } Destination = now; // 行き先と背景色が変わることを通知する。 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(DispDestination))); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(BackColor))); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Histories))); }