void OnSaveClicked() { string name = panel.Input.Value; string validatedName = name.HasSuffix(Suffix) ? name : name + Suffix; ModuleListPanel.SaveStateConfiguration(validatedName); Close(); }
void OnItemClicked(int index, int subIndex) { switch (subIndex) { case 0: ModuleListPanel.SaveStateConfiguration(files[index].FileName); Close(); break; case 1: string filename = files[index].FullPath; try { File.Delete(filename); } catch (Exception e) { Logger.Internal("Error deleting config file", e); } ReadAllFiles(); break; } }