private void 获取皮肤信息() { var skinconfig = Zip.UnZipOneFile(FilePath, "skin.cfg"); if (skinconfig != null) { Skin = Config.SkinConfigGet(skinconfig) ?? new Skin(); } else { DialogHero spw = new DialogHero(); spw.ShowDialog(); if (spw.DialogResult == true) { Skin.Hero = spw.HeroName; } else { AyMessageBox.ShowCus("未能正常识别皮肤英雄!皮肤导入失败", "识别失败"); _canGoOn = false; } } if (string.IsNullOrEmpty(Skin.SkinName)) { Skin.SkinName = Path.GetFileNameWithoutExtension(FilePath); } if (string.IsNullOrEmpty(Skin.FileName)) { Skin.FileName = Path.GetFileName(FilePath); } }
private void ChooseHero(object sender, System.Windows.RoutedEventArgs e) { DialogHero spw = new DialogHero(); spw.ShowDialog(); if (spw.DialogResult == true) { skin.Hero = spw.HeroName; Changed = true; } }