示例#1
0
        private void CB_SkillsMarkers_CheckedChanged(object sender, EventArgs e)
        {
            if (War.HWnd != IntPtr.Zero)
            {
                byte[] modelByte = WjeWar.Properties.Resources.heroflamelord;
                string modelName = "heroflamelord.mdx";

                if (CB_SkillsMarkers.Checked)
                {
                    bool isSetup = FileManage.SetupModel(modelByte, War.Path, modelName);
                    if (isSetup)
                    {
                        SetRegEditData("Allow Local Files", "00000001");
                    }
                    else
                    {
                        MessageBox.Show("安装失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else
                {
                    FileManage.deleteFile(War.Path + "\\" + modelName);
                }
            }
        }
示例#2
0
        private void CB_ShowFuzzy_CheckedChanged(object sender, EventArgs e)
        {
            if (War.HWnd != IntPtr.Zero)
            {
                byte[][] modelByte = { WjeWar.Properties.Resources.FrostGlowBall64, WjeWar.Properties.Resources.Sword_1H_Miev_D_01, WjeWar.Properties.Resources.HeroWarden, WjeWar.Properties.Resources.yuelun };
                string   modelPath = "Units\\nightelf\\HeroWarden";
                string[] modelName = { "FrostGlowBall64.blp", "Sword_1H_Miev_D_01.blp", "HeroWarden.mdx", "yuelun.mdx" };
                string   path      = War.Path + "\\" + modelPath;

                if (CB_ShowFuzzy.Checked)
                {
                    bool isSetup = false;
                    for (int i = 0; i < modelName.Length; i++)
                    {
                        isSetup = FileManage.SetupModel(modelByte[i], path, modelName[i]);
                    }

                    if (isSetup)
                    {
                        SetRegEditData("Allow Local Files", "00000001");
                    }
                    else
                    {
                        MessageBox.Show("安装失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else
                {
                    FileManage.deleteFile(path + "\\" + modelName[0]);
                    FileManage.deleteFile(path + "\\" + modelName[1]);
                    FileManage.deleteFile(path + "\\" + modelName[2]);
                    FileManage.deleteFile(path + "\\" + modelName[3]);
                }
            }
        }
示例#3
0
        private void CB_RowerRange_CheckedChanged(object sender, EventArgs e)
        {
            if (War.HWnd != IntPtr.Zero)
            {
                byte[][] modelByte = { WjeWar.Properties.Resources.AncientProtector, WjeWar.Properties.Resources.ziggurat };
                string[] modelPath = { "Buildings\\nightelf\\AncientProtector", "Buildings\\Undead\\ziggurat" };
                string[] modelName = { "AncientProtector.mdx", "ziggurat.mdx" };

                if (CB_RowerRange.Checked)
                {
                    string path    = War.Path + "\\" + modelPath[0];
                    bool   isSetup = FileManage.SetupModel(modelByte[0], path, modelName[0]);

                    path    = War.Path + "\\" + modelPath[1];
                    isSetup = FileManage.SetupModel(modelByte[1], path, modelName[1]);
                }
                else
                {
                    FileManage.deleteFile(War.Path + "\\" + modelPath[0] + "\\" + modelName [0]);
                    FileManage.deleteFile(War.Path + "\\" + modelPath[1] + "\\" + modelName[1]);
                }
            }
        }