private void FileHandler_FileStateChanged(object sender, FileStateChangedEventArgs e) { Title = "FPLedit" + (e.FileState.Opened ? " - " + (e.FileState.FileName != null ? (Path.GetFileName(e.FileState.FileName) + " ") : "") + (e.FileState.Saved ? "" : "*") : ""); saveMenu.Enabled = saveAsMenu.Enabled = exportMenu.Enabled = convertMenu.Enabled = e.FileState.Opened; FileStateChanged?.Invoke(sender, e); }
public Bootstrapper(LastFileHandler lfh) { timetableBackup = new Dictionary <object, Timetable>(); var configPath = Path.Combine(PathManager.Instance.SettingsDirectory, "fpledit.conf"); #pragma warning disable CA2000 settings = new Settings(GetConfigStream(configPath)); #pragma warning restore CA2000 var lang = settings.Get("lang", "de-DE"); T.SetLocale(Path.Combine(PathManager.Instance.AppDirectory, "Languages"), lang); registry = new RegisterStore(); Update = new UpdateManager(settings); undo = new UndoManager(); ExtensionManager = new ExtensionManager(this); FileHandler = new FileHandler(this, lfh, undo); FileHandler.FileOpened += (o, args) => FileOpened?.Invoke(o, args); FileHandler.FileStateChanged += (o, args) => FileStateChanged?.Invoke(o, args); }
private void OnFileStateChanged(EventArgs e) { FileStateChanged?.Invoke(this, e); }
private void OnFileStateChanged() { FileState.UpdateMetaProperties(Timetable, undo); FileStateChanged?.Invoke(this, new FileStateChangedEventArgs(FileState)); }
public static void FSC_DMS(bool newvalue) { FileStateChanged?.Invoke(newvalue, dms.PathToFile); }