using Plane.FormationCreator.Formation; using GalaSoft.MvvmLight; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Plane.FormationCreator { public class AppEx : ObservableObject { public static AppEx Current { get; } = new AppEx(); private AppEx() { } private bool _IsInFastMode = true; public bool IsInFastMode { get { return _IsInFastMode; } set { Set(nameof(IsInFastMode), ref _IsInFastMode, value); } } private AppMode _AppMode = AppMode.ModifyingTask; public AppMode AppMode { get { return _AppMode; } set { bool changed = _AppMode != value; var oldItem = _AppMode; Set(nameof(AppMode), ref _AppMode, value); if (changed) { AppModeChanged?.Invoke(this, new PropertyChangedEventArgs { OldItem = oldItem, NewItem = value }); } } } private bool _ShowModifyTaskView = true; public bool ShowModifyTaskView { get { return _ShowModifyTaskView; } set { Set(nameof(ShowModifyTaskView), ref _ShowModifyTaskView, value); } } public event EventHandler> AppModeChanged; } }