Example #1
0
        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);
            }
        }
Example #2
0
 private void AllUninstall(object sender, RoutedEventArgs e)
 {
     if (AyMessageBox.ShowCus("是否要卸载全部皮肤?", "卸载全部", "/Resources/logo.png", MessageBoxButton.YesNo) != MessageBoxResult.Yes)
     {
         return;
     }
     _softParam.AllUninstall();
 }
Example #3
0
 private void ReInstall(object sender, RoutedEventArgs e)
 {
     // if (NavigationService != null) NavigationService.Navigate(new PageSet());
     if (AyMessageBox.ShowCus("是否要重新挂载全部皮肤?", "重新挂载", "/Resources/logo.png", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     {
         _softParam.ReInstall();
     }
 }
Example #4
0
 private void 保存皮肤信息()
 {
     Comment = "保存皮肤信息";
     if (State == 1)
     {
         AyMessageBox.ShowCus("皮肤  " + Skin.SkinName + "  导入成功", "导入成功!", Picture.HeroSquarePath(Skin.Hero));
         _skin.SaveOrEdit(Skin);
         _softParam.BackPageHero();
     }
 }
Example #5
0
 private void 查看压缩包结构()
 {
     ZipFiles = Zip.GetZipFilesName(FilePath);
     if (!ZipFiles.Any(a => a.ToLower().Contains("data")) || ZipFiles.Any(a => a.ToLower().Contains("lol_game_client")))
     {
         if (AyMessageBox.ShowCus(string.Format("皮肤包结构异常,可能为未整理过的美服皮肤包{0}是否使用自动整理功能?", Environment.NewLine), "皮肤包异常", "", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
         {
             重新整理皮肤包();
         }
     }
 }
Example #6
0
 /// <summary>
 /// 打开文件
 /// </summary>
 /// <param name="filepath"></param>
 public static void OpenFile(string filepath)
 {
     if (File.Exists(filepath) || Directory.Exists(filepath))
     {
         Process.Start(filepath);
     }
     else
     {
         AyMessageBox.ShowCus("文件:" + filepath + "  不存在!", "文件不存在!", "/Resources/logo.png");
     }
 }
Example #7
0
        private void Sure(object sender, RoutedEventArgs e)
        {
            if (HeroList.SelectedIndex == -1 || HeroList.SelectedItem == null)
            {
                AyMessageBox.ShowCus("Message", "Title");
                return;
            }
            var item = (Hero)HeroList.SelectedItem;

            HeroName          = item.EnName;
            this.DialogResult = true;
        }
Example #8
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SkinDelete(object sender, RoutedEventArgs e)
        {
            if (SkinList.SelectedIndex < 0)
            {
                return;
            }
            var skin = (Skin)SkinList.SelectedItem;

            if (AyMessageBox.ShowCus("确认要删除皮肤 " + skin.SkinName + " 吗?", "确认删除", "/Resources/logo.png", MessageBoxButton.YesNo) == MessageBoxResult.No)
            {
                return;
            }
            UpdateSkinList(skin);
            _soft.SetBackImage(skin.Hero);
            GC.Collect();
            _lumei.SkinDelete(skin);
        }
Example #9
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     AyMessageBox.ShowCus("这里是内容", "成功!", @"F:\NetDisk\360\Sync\Other\Model\8-18\bianfu\m003_2.png");
 }
Example #10
0
 private void openIconMessageBox_Click(object sender, RoutedEventArgs e)
 {
     AyMessageBox.ShowCus(winThis, "确认删除吗", "", "pack://application:,,,/ay.contents;component/Content/Icon/Image/ay/1.png");
 }