void LoadScheme() { var currentScheme = XYPackage.GetCurrentScheme(); if (currentScheme.Length == 0) { currentScheme = "默认配置"; } }
void UpSelectPackage() { var name = (string)lbEnabled.SelectedItem; var index = listEnabled.IndexOf(name); if (index > 0) { listEnabled.RemoveAt(index); listEnabled.Insert(index - 1, name); XYPackage.PatchCurrentEnabled(listEnabled); UpdateEnabledPackageUI(); lbEnabled.SelectedIndex = index - 1; } }
void DownSelectPackage() { var name = (string)lbEnabled.SelectedItem; var maxIndex = listEnabled.Count - 1; var index = listEnabled.IndexOf(name); if (index < maxIndex) { listEnabled.RemoveAt(index); listEnabled.Insert(index + 1, name); XYPackage.PatchCurrentEnabled(listEnabled); UpdateEnabledPackageUI(); lbEnabled.SelectedIndex = index + 1; } }
void UpdateDisabledPackageData(string name) { listEnabled.Remove(name); listDisabled.Add(name); XYPackage.PatchCurrentEnabled(listEnabled); }
void LoadPackage() { listEnabled = XYPackage.GetCurrentEnabled(); listDisabled = XYPackage.GetCurrentDisabled(); }