Example #1
0
        void LoadScheme()
        {
            var currentScheme = XYPackage.GetCurrentScheme();

            if (currentScheme.Length == 0)
            {
                currentScheme = "默认配置";
            }
        }
Example #2
0
        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;
            }
        }
Example #3
0
        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;
            }
        }
Example #4
0
 void UpdateDisabledPackageData(string name)
 {
     listEnabled.Remove(name);
     listDisabled.Add(name);
     XYPackage.PatchCurrentEnabled(listEnabled);
 }
Example #5
0
 void LoadPackage()
 {
     listEnabled  = XYPackage.GetCurrentEnabled();
     listDisabled = XYPackage.GetCurrentDisabled();
 }