public void SetSaveVersion() { StreamReader StreamReader = new StreamReader(Path + "\\lol.version"); int LoLVersion = Int32.Parse(StreamReader.ReadToEnd()); ManagerINI.SetValue("Version", "Save", LoLVersion.ToString()); StreamReader.Close(); }
public void SetFontSetting(string Key, FontSetting FontSetting) { if (FontSetting.EnableList[0]) { GamePermanentCFG.SetValue("FloatingText", Key + "_MinYVelocity", FontSetting.MinYVelocity.ToString()); } if (FontSetting.EnableList[1]) { GamePermanentCFG.SetValue("FloatingText", Key + "_MaxYVelocity", FontSetting.MaxYVelocity.ToString()); } if (FontSetting.EnableList[2]) { GamePermanentCFG.SetValue("FloatingText", Key + "_ContinualForceY", FontSetting.ContinualForceY.ToString()); } if (FontSetting.EnableList[3]) { GamePermanentCFG.SetValue("FloatingText", Key + "_Decay", FontSetting.Decay.ToString()); } if (FontSetting.EnableList[4]) { GamePermanentCFG.SetValue("FloatingText", Key + "_ShrinkTime", FontSetting.ShrinkTime.ToString()); } if (FontSetting.EnableList[5]) { GamePermanentCFG.SetValue("FloatingText", Key + "_ShrinkScale", FontSetting.ShrinkScale.ToString()); } }
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安裝位置"); } }
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); } }
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安裝位置"); } }
private void CheckVersionCheckBox_CheckedChanged(object sender, EventArgs e) { ManagerINI.SetValue("Option", "CheckSaveVersion", CheckVersionCheckBox.Checked ? "1" : "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); } }
public void SetChatSize(string Name, int FontSize, int OutlineSize, int GlowSize) { GamePermanentCFG.SetValue(Name, "FontSize", " " + FontSize.ToString()); GamePermanentCFG.SetValue(Name, "OutlineSize", " " + OutlineSize.ToString()); GamePermanentCFG.SetValue(Name, "Glow", " " + GlowSize.ToString()); }
public void SetHealthBar( string Target, Color HealthBarColor, Color HealthFadeColor, Color AllShieldColor, Color PhysShieldColor, Color MagicShieldColor) { GamePermanentCFG.SetValue(Target, "HealthBarColor", " " + HealthBarColor.R + " " + HealthBarColor.G + " " + HealthBarColor.B + " " + HealthBarColor.A); GamePermanentCFG.SetValue(Target, "HealthFadeColor", " " + HealthFadeColor.R + " " + HealthFadeColor.G + " " + HealthFadeColor.B + " " + HealthFadeColor.A); GamePermanentCFG.SetValue(Target, "AllShieldColor", " " + AllShieldColor.R + " " + AllShieldColor.G + " " + AllShieldColor.B + " " + AllShieldColor.A); GamePermanentCFG.SetValue(Target, "PhysShieldColor", " " + PhysShieldColor.R + " " + PhysShieldColor.G + " " + PhysShieldColor.B + " " + PhysShieldColor.A); GamePermanentCFG.SetValue(Target, "MagicShieldColor", " " + MagicShieldColor.R + " " + MagicShieldColor.G + " " + MagicShieldColor.B + " " + MagicShieldColor.A); }