public void RaisePropertyChanged(string property) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(property)); GlobalEnums.GetIntance().RaisePropertyChanged("Options"); } }
public static void Save(string root_path) { if (GlobalEnums.IsDirty()) { System.IO.File.WriteAllText(root_path + "\\Enums.json", JsonConvert.SerializeObject(GlobalEnums.GetDictionary(), Formatting.Indented)); instance.Dirty = false; } }
public ProjectModel(string root_path) { RootPath = root_path; GlobalEnums.Reset(); GlobalEnums.LoadEnums(RootPath); RootExplorerItem = new ProjectExplorerItem(RootPath, this, this); GlobalEnums.NotifyOnChangeTo(this); FocusedTab = -1; }
public void Delete() { ContainingGlobalEnum.Options.Remove(this); GlobalEnums.GetIntance().Dirty = true; ContainingGlobalEnum.RaisePropertyChanged("Options"); }
internal void Delete() { GlobalEnums.RemoveEnum(this); }
internal void AddOption(string text) { Options.Add(new GlobalEnumValue(text, this)); GlobalEnums.GetIntance().Dirty = true; RaisePropertyChanged("Options"); }
public static void Reset() { instance = new GlobalEnums(); }
public bool IsDirty() { return(GetAllProjectExplorerItems().Any(pei => pei.IsDirty) || GlobalEnums.IsDirty()); }
/// <summary> /// Each file will save its content to the disk, and each configuration variable property "Dirty" /// will be set with "false", so that aditional saving will be suggested. /// </summary> internal void Save() { RootExplorerItem.Save(); GlobalEnums.Save(RootPath); }