Exemplo n.º 1
0
 public BarSetting(string path)
 {
     FileInfo iniFile;
     if (!File.Exists(path + "Menu\\HUD\\GeneralCharacterData_Legacy.ini"))
     {
         iniFile = new FileInfo("GeneralCharacterData_Legacy.ini");
         iniFile.CopyTo(path + "Menu\\HUD\\GeneralCharacterData_Legacy.ini", true);
     }
     GamePermanentCFG = new CFGFile(path + "Menu\\HUD\\GeneralCharacterData_Legacy.ini");
 }
Exemplo n.º 2
0
        public BarSetting(string path)
        {
            FileInfo iniFile;

            if (!File.Exists(path + "Menu\\HUD\\GeneralCharacterData_Legacy.ini"))
            {
                iniFile = new FileInfo("GeneralCharacterData_Legacy.ini");
                iniFile.CopyTo(path + "Menu\\HUD\\GeneralCharacterData_Legacy.ini", true);
            }
            GamePermanentCFG = new CFGFile(path + "Menu\\HUD\\GeneralCharacterData_Legacy.ini");
        }
Exemplo n.º 3
0
 private void FindLOL()
 {
     if (FolderBrowserDialog.ShowDialog() != DialogResult.Cancel)
     {
         string p = FolderBrowserDialog.SelectedPath.Substring(FolderBrowserDialog.SelectedPath.Length - 19);
         if (p == "GameData\\Apps\\LoLTW")
         {
             CFGFile CFGFile = new CFGFile(Directory.GetCurrentDirectory() + "\\LoLManager.ini");
             CFGFile.SetValue("Init", "Path", FolderBrowserDialog.SelectedPath);
             RootPath = FolderBrowserDialog.SelectedPath;
         }
         else
         {
             MessageBox.Show("選擇的路徑無效\n請重新啟動程式.", "無法抓取LOL安裝位置");
         }
     }
     else
     {
         MessageBox.Show("請重新啟動程式.", "無法抓取LOL安裝位置");
     }
 }
Exemplo n.º 4
0
        private void LoLManager_Load(object sender, EventArgs e)
        {
            ManagerINI = new CFGFile(Directory.GetCurrentDirectory() + "\\LoLManager.ini");
            RootPath = ManagerINI.GetValue("Init", "Path");
            if (RootPath != "" && !Directory.Exists(RootPath))
            {
                RootPath = "";
                ManagerINI.SetValue("Init", "Path", "");
            }
            if (RootPath == "")
            {
                if (HaveReg("SOFTWARE\\Wow6432Node\\Garena\\LoLTW"))
                {
                    RootPath = ReadReg("SOFTWARE\\Wow6432Node\\Garena\\LoLTW", "Path");
                }
            }
            if (RootPath == "")
            {
                if (HaveReg("SOFTWARE\\Wow6432Node\\Riot Games\\League of Legends"))
                {
                    RootPath = ReadReg("SOFTWARE\\Wow6432Node\\Riot Games\\League of Legends", "Path");
                }
            }
            if (RootPath == "")
            {
                if (HaveReg("SOFTWARE\\Garena\\LoLTW"))
                {
                    RootPath = ReadReg("SOFTWARE\\Garena\\LoLTW", "Path");
                }
            }
            if (RootPath == "")
            {
                if (HaveReg("SOFTWARE\\Riot Games\\League of Legends"))
                {
                    RootPath = ReadReg("SOFTWARE\\Riot Games\\League of Legends", "Path");
                }
            }
            if (RootPath == "")
            {
                MessageBox.Show("手動設定\n請選擇您安裝的路徑\nGarena/GameData/Apps/LoLTW", "無法抓取LOL安裝位置");
                FindLOL();
            }
            if (RootPath != "")
            {
                if (Directory.Exists(RootPath + "\\Game\\DATA\\") == false)
                {
                    MessageBox.Show("重新設定LOL位置", "遺失LOL位置");
                    FindLOL();
                }

                UpdateCheck = new UpdateCheck(RootPath);

                // 開啟時必定進入Pack自動比對
                BackupEx.Pack(RootPath, UpdateCheck.GetLoLVersion().ToString());
                UpdateCheck.SetMainVersion();
                foreach (string it in BackupEx.GetListString())
                {
                    BackupExListBox.Items.Add(it);
                }

                if (UpdateCheck.CheakLoLVersion())
                {
                    if (MessageBox.Show("偵測到LoL版本有更新\n是否需要匯入上次匯出的資料?", "匯入系統", MessageBoxButtons.OKCancel) == DialogResult.OK)
                    {
                        Import();
                    }
                }
                FontControl = new FontControl(RootPath + "\\Game\\DATA\\");
                ChatControl = new ChatControl(RootPath + "\\Game\\DATA\\");
                //BarSetting = new BarSetting(RootPath + "\\Game\\DATA\\");
                LoLVersionLabel.Text = UpdateCheck.GetLoLVersion().ToString();
                SaveVersionLabel.Text = UpdateCheck.GetSaveVersion().ToString();

                CheckVersionCheckBox.Checked = Int32.Parse(ManagerINI.GetValue("Option", "CheckSaveVersion")) == 0 ? false : true;
                FontNameComboBox.SelectedIndex = 0;
                ReflashFontTypeList();
                NewFontTypeComboBox.SelectedIndex = 0;
                FontSettingComboBox.SelectedIndex = 0;
                ChatSettingComboBox.SelectedIndex = 0;
                HealthBarComboBox.SelectedIndex = 0;
                MpBarLoag();
                LOLPathLabel.Text = RootPath;

                linkLabel1.Links.Add(0, linkLabel1.Text.Length, linkLabel1.Text);
                linkLabel2.Links.Add(0, linkLabel2.Text.Length, linkLabel2.Text);
                linkLabel5.Links.Add(0, linkLabel5.Text.Length, linkLabel5.Text);
                linkLabel6.Links.Add(0, linkLabel6.Text.Length, linkLabel6.Text);
            }
        }
Exemplo n.º 5
0
 private void FindLOL()
 {
     if (FolderBrowserDialog.ShowDialog() != DialogResult.Cancel)
     {
         string p = FolderBrowserDialog.SelectedPath.Substring(FolderBrowserDialog.SelectedPath.Length - 19);
         if (p == "GameData\\Apps\\LoLTW")
         {
             CFGFile CFGFile = new CFGFile(Directory.GetCurrentDirectory() + "\\LoLManager.ini");
             CFGFile.SetValue("Init", "Path", FolderBrowserDialog.SelectedPath);
             RootPath = FolderBrowserDialog.SelectedPath;
         }
         else
         {
             MessageBox.Show("選擇的路徑無效\n請重新啟動程式.", "無法抓取LOL安裝位置");
         }
     }
     else
     {
         MessageBox.Show("請重新啟動程式.", "無法抓取LOL安裝位置");
     }
 }
Exemplo n.º 6
0
        private void LoLManager_Load(object sender, EventArgs e)
        {
            ManagerINI = new CFGFile(Directory.GetCurrentDirectory() + "\\LoLManager.ini");
            RootPath   = ManagerINI.GetValue("Init", "Path");
            if (RootPath != "" && !Directory.Exists(RootPath))
            {
                RootPath = "";
                ManagerINI.SetValue("Init", "Path", "");
            }
            if (RootPath == "")
            {
                if (HaveReg("SOFTWARE\\Wow6432Node\\Garena\\LoLTW"))
                {
                    RootPath = ReadReg("SOFTWARE\\Wow6432Node\\Garena\\LoLTW", "Path");
                }
            }
            if (RootPath == "")
            {
                if (HaveReg("SOFTWARE\\Wow6432Node\\Riot Games\\League of Legends"))
                {
                    RootPath = ReadReg("SOFTWARE\\Wow6432Node\\Riot Games\\League of Legends", "Path");
                }
            }
            if (RootPath == "")
            {
                if (HaveReg("SOFTWARE\\Garena\\LoLTW"))
                {
                    RootPath = ReadReg("SOFTWARE\\Garena\\LoLTW", "Path");
                }
            }
            if (RootPath == "")
            {
                if (HaveReg("SOFTWARE\\Riot Games\\League of Legends"))
                {
                    RootPath = ReadReg("SOFTWARE\\Riot Games\\League of Legends", "Path");
                }
            }
            if (RootPath == "")
            {
                MessageBox.Show("手動設定\n請選擇您安裝的路徑\nGarena/GameData/Apps/LoLTW", "無法抓取LOL安裝位置");
                FindLOL();
            }
            if (RootPath != "")
            {
                if (Directory.Exists(RootPath + "\\Game\\DATA\\") == false)
                {
                    MessageBox.Show("重新設定LOL位置", "遺失LOL位置");
                    FindLOL();
                }

                UpdateCheck = new UpdateCheck(RootPath);

                // 開啟時必定進入Pack自動比對
                BackupEx.Pack(RootPath, UpdateCheck.GetLoLVersion().ToString());
                UpdateCheck.SetMainVersion();
                foreach (string it in BackupEx.GetListString())
                {
                    BackupExListBox.Items.Add(it);
                }

                if (UpdateCheck.CheakLoLVersion())
                {
                    if (MessageBox.Show("偵測到LoL版本有更新\n是否需要匯入上次匯出的資料?", "匯入系統", MessageBoxButtons.OKCancel) == DialogResult.OK)
                    {
                        Import();
                    }
                }
                FontControl = new FontControl(RootPath + "\\Game\\DATA\\");
                ChatControl = new ChatControl(RootPath + "\\Game\\DATA\\");
                //BarSetting = new BarSetting(RootPath + "\\Game\\DATA\\");
                LoLVersionLabel.Text  = UpdateCheck.GetLoLVersion().ToString();
                SaveVersionLabel.Text = UpdateCheck.GetSaveVersion().ToString();

                CheckVersionCheckBox.Checked   = Int32.Parse(ManagerINI.GetValue("Option", "CheckSaveVersion")) == 0 ? false : true;
                FontNameComboBox.SelectedIndex = 0;
                ReflashFontTypeList();
                NewFontTypeComboBox.SelectedIndex = 0;
                FontSettingComboBox.SelectedIndex = 0;
                ChatSettingComboBox.SelectedIndex = 0;
                HealthBarComboBox.SelectedIndex   = 0;
                MpBarLoag();
                LOLPathLabel.Text = RootPath;

                linkLabel1.Links.Add(0, linkLabel1.Text.Length, linkLabel1.Text);
                linkLabel2.Links.Add(0, linkLabel2.Text.Length, linkLabel2.Text);
                linkLabel5.Links.Add(0, linkLabel5.Text.Length, linkLabel5.Text);
                linkLabel6.Links.Add(0, linkLabel6.Text.Length, linkLabel6.Text);
            }
        }
Exemplo n.º 7
0
 public ChatControl(string path)
 {
     GamePermanentCFG = new CFGFile(path + "CFG\\defaults\\GamePermanent_zh_TW.cfg");
 }
Exemplo n.º 8
0
        public FontControl(string path)
        {
            Blind.Add("Critical");
            Blind.Add("PhysicalDamage");
            Blind.Add("EnemyPhysicalDamage");
            Blind.Add("EnemyCritical");

            FilePath = path;

            GamePermanentCFG = new CFGFile(FilePath + "CFG\\defaults\\GamePermanent_zh_TW.cfg");
            StreamReader StreamReader = new StreamReader(FilePath + "Fonts\\FontMappings.txt");
            FontMapping = StreamReader.ReadToEnd();
            StreamReader.Close();
            StreamWriter StreamWriter;
            try
            {
                FontResolutionXML.Load(FilePath + "CFG\\defaults\\FontResolutions.xml");
            }
            catch (Exception)
            {
                StreamReader = new StreamReader(FilePath + "CFG\\defaults\\FontResolutions.xml");
                string FixData = StreamReader.ReadToEnd();
                StreamReader.Close();

                FixData = FixData.Replace("\"ShadowColor", "\" ShadowColor");
                StreamWriter = new StreamWriter(FilePath + "CFG\\defaults\\FontResolutions.xml");
                StreamWriter.Write(FixData);
                StreamWriter.Close();

                FontResolutionXML.Load(FilePath + "CFG\\defaults\\FontResolutions.xml");
                MessageBox.Show("FontResolutions.xml有損,簡易修正完成.");
            }
            try
            {
                FontDescriptionXML.Load(FilePath + "CFG\\defaults\\FontDescriptions.xml");
            }
            catch (Exception)
            {
                StreamReader = new StreamReader(FilePath + "CFG\\defaults\\FontDescriptions.xml");
                string FixData = StreamReader.ReadToEnd();
                StreamReader.Close();

                FixData = FixData.Replace("\"ShadowColor", "\" ShadowColor");
                StreamWriter = new StreamWriter(FilePath + "CFG\\defaults\\FontDescriptions.xml");
                StreamWriter.Write(FixData);
                StreamWriter.Close();

                FontDescriptionXML.Load(FilePath + "CFG\\defaults\\FontDescriptions.xml");
                MessageBox.Show("FontDescriptions.xml有損,簡易修正完成.");
            }
            try
            {
                FontTypeXML.Load(FilePath + "CFG\\defaults\\FontTypes.xml");
            }
            catch (Exception)
            {
                StreamReader = new StreamReader(FilePath + "CFG\\defaults\\FontTypes.xml");
                string FixData = StreamReader.ReadToEnd();
                StreamReader.Close();

                FixData = FixData.Replace("\"ShadowColor", "\" ShadowColor");
                StreamWriter = new StreamWriter(FilePath + "CFG\\defaults\\FontTypes.xml");
                StreamWriter.Write(FixData);
                StreamWriter.Close();

                FontTypeXML.Save(FilePath + "CFG\\defaults\\FontTypes.xml");
                MessageBox.Show("FontTypes.xml有損,簡易修正完成.");
            }
        }
Exemplo n.º 9
0
 public UpdateCheck(string _Path)
 {
     Path       = _Path;
     ManagerINI = new CFGFile(Directory.GetCurrentDirectory() + "\\LoLManager.ini");
 }
Exemplo n.º 10
0
        public FontControl(string path)
        {
            Blind.Add("Critical");
            Blind.Add("PhysicalDamage");
            Blind.Add("EnemyPhysicalDamage");
            Blind.Add("EnemyCritical");

            FilePath = path;

            GamePermanentCFG = new CFGFile(FilePath + "CFG\\defaults\\GamePermanent_zh_TW.cfg");
            StreamReader StreamReader = new StreamReader(FilePath + "Fonts\\FontMappings.txt");

            FontMapping = StreamReader.ReadToEnd();
            StreamReader.Close();
            StreamWriter StreamWriter;

            try
            {
                FontResolutionXML.Load(FilePath + "CFG\\defaults\\FontResolutions.xml");
            }
            catch (Exception)
            {
                StreamReader = new StreamReader(FilePath + "CFG\\defaults\\FontResolutions.xml");
                string FixData = StreamReader.ReadToEnd();
                StreamReader.Close();

                FixData      = FixData.Replace("\"ShadowColor", "\" ShadowColor");
                StreamWriter = new StreamWriter(FilePath + "CFG\\defaults\\FontResolutions.xml");
                StreamWriter.Write(FixData);
                StreamWriter.Close();

                FontResolutionXML.Load(FilePath + "CFG\\defaults\\FontResolutions.xml");
                MessageBox.Show("FontResolutions.xml有損,簡易修正完成.");
            }
            try
            {
                FontDescriptionXML.Load(FilePath + "CFG\\defaults\\FontDescriptions.xml");
            }
            catch (Exception)
            {
                StreamReader = new StreamReader(FilePath + "CFG\\defaults\\FontDescriptions.xml");
                string FixData = StreamReader.ReadToEnd();
                StreamReader.Close();

                FixData      = FixData.Replace("\"ShadowColor", "\" ShadowColor");
                StreamWriter = new StreamWriter(FilePath + "CFG\\defaults\\FontDescriptions.xml");
                StreamWriter.Write(FixData);
                StreamWriter.Close();

                FontDescriptionXML.Load(FilePath + "CFG\\defaults\\FontDescriptions.xml");
                MessageBox.Show("FontDescriptions.xml有損,簡易修正完成.");
            }
            try
            {
                FontTypeXML.Load(FilePath + "CFG\\defaults\\FontTypes.xml");
            }
            catch (Exception)
            {
                StreamReader = new StreamReader(FilePath + "CFG\\defaults\\FontTypes.xml");
                string FixData = StreamReader.ReadToEnd();
                StreamReader.Close();

                FixData      = FixData.Replace("\"ShadowColor", "\" ShadowColor");
                StreamWriter = new StreamWriter(FilePath + "CFG\\defaults\\FontTypes.xml");
                StreamWriter.Write(FixData);
                StreamWriter.Close();

                FontTypeXML.Save(FilePath + "CFG\\defaults\\FontTypes.xml");
                MessageBox.Show("FontTypes.xml有損,簡易修正完成.");
            }
        }
Exemplo n.º 11
0
 public ChatControl(string path)
 {
     GamePermanentCFG = new CFGFile(path + "CFG\\defaults\\GamePermanent_zh_TW.cfg");
 }
Exemplo n.º 12
0
 public UpdateCheck(string _Path)
 {
     Path = _Path;
     ManagerINI = new CFGFile(Directory.GetCurrentDirectory() + "\\LoLManager.ini");
 }