Пример #1
0
        private void InstallSkin(object sender, EventArgs e)
        {
            var linkToSelected = (SkinLink)SkinsListBox.SelectedItem;
            var skin           = linkToSelected.Load();

            if (skin == null)
            {
                MessageBox.Show("Can not install nothing. Please, select skin in list on left form side or add new skin and try again", "Installation Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            if (cleanInstallCheck.Checked)
            {
                Clean(EnvironmentalVeriables.gamePath);
                InstallSkin(skinPackager.Decompile(@"Skins\default.askin"), forcedInstall: true);
            }
            InstallSkin(skin);
            EnvironmentChecker.SaveState(EnvironmentalVeriables.gamePath, skin.Name);
            GetCurrentlyInstalledSkinDirect();
            MessageBox.Show("Done!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Пример #2
0
 private void FixCurrentState(string stateName)
 {
     EnvironmentChecker.SaveState(EnvironmentalVeriables.gamePath, stateName);
 }