public frmDefineCharts(MessageQueue message) { InitializeComponent(); helpProvider1.HelpNamespace = Path.Combine(WOTHelper.GetEXEPath(), "Help", "WoT_Stats.chm"); helpProvider1.SetHelpNavigator(this, HelpNavigator.TopicId); helpProvider1.SetHelpKeyword(this, "520"); }
public frmDefineGroupings() { InitializeComponent(); helpProvider1.HelpNamespace = Path.Combine(WOTHelper.GetEXEPath(), "Help", "WoT_Stats.chm"); helpProvider1.SetHelpNavigator(this, HelpNavigator.TopicId); helpProvider1.SetHelpKeyword(this, "500"); }
private void SetValues() { Player pl = _players.GetPlayer(_dm.GetPlayerID); if (new string[] { "0", "1", "2", "3" }.Contains(pl.PreviousFile)) { OldDossier.EditValue = pl.PreviousFile; } else { OldDossier.EditValue = "4"; oldSelection.Text = pl.PreviousFile.Insert(4, "-").Insert(7, "-"); } if (new string[] { "0", "1", "2", "3" }.Contains(pl.CurrentFile)) { NewDossier.EditValue = pl.CurrentFile; } else { NewDossier.EditValue = "4"; newSelection.Text = pl.CurrentFile.Insert(4, "-").Insert(7, "-"); } helpProvider1.HelpNamespace = Path.Combine(WOTHelper.GetEXEPath(), "Help", "WoT_Stats.chm"); helpProvider1.SetHelpNavigator(this, HelpNavigator.TopicId); helpProvider1.SetHelpKeyword(this, "420"); }
public frmAddEditPlayer() { InitializeComponent(); Text = Translations.TranslationGet("WNDCAPTION_ADDPLAYER", "DE", "Add Player"); helpProvider1.HelpNamespace = Path.Combine(WOTHelper.GetEXEPath(), "Help", "WoT_Stats.chm"); helpProvider1.SetHelpNavigator(this, HelpNavigator.TopicId); helpProvider1.SetHelpKeyword(this, "120"); }
public frmUpdater() { InitializeComponent(); WOTHelper.CreateAppDataFolder(); if (!File.Exists(WOTHelper.GetUserFile())) { File.Copy(Path.Combine(WOTHelper.GetEXEPath(), "User.xml"), WOTHelper.GetUserFile()); } prgBarProgress.CustomDisplayText += prgBarProgress_CustomDisplayText; }
void ListViewSettings() { tankListView.View = View.Details; tankListView.Columns.Add(Translations.TranslationGet("HTML_HEAD_TANK", "DE", "Tank")); tankListView.Columns.Add(Translations.TranslationGet("HTML_HEAD_VEHICLECLASS", "DE", "Vehicle Class")); tankListView.Columns.Add(Translations.TranslationGet("HTML_HEAD_VEHICLETIER", "DE", "Vehicle Tier")); tankListView.CheckBoxes = true; tankListView.ShowGroups = true; tankListView.GridLines = true; helpProvider1.HelpNamespace = Path.Combine(WOTHelper.GetEXEPath(), "Help", "WoT_Stats.chm"); helpProvider1.SetHelpNavigator(this, HelpNavigator.TopicId); helpProvider1.SetHelpKeyword(this, "500"); }
public GraphSetup(MessageQueue message) { InitializeComponent(); _message = message; _tDescription = new TankDescriptions(_message); _cDescription = new CountryDescriptions(_message); _typeDescription = new TankTypeDescription(_message); _graphSettings = new GraphsSettings(_message); helpProvider1.HelpNamespace = Path.Combine(WOTHelper.GetEXEPath(), "Help", "WoT_Stats.chm"); helpProvider1.SetHelpNavigator(this, HelpNavigator.TopicId); helpProvider1.SetHelpKeyword(this, "520"); ListViewSettings(); LoadSettings(); }
public frmAddEditPlayer(Player player) { InitializeComponent(); txtWatchFile.Text = player.WatchFile; txtPlayerID.Text = player.PlayerID; if (player.Monitor.ToUpper() == "YES") { checkFTPFile.Checked = true; } else { checkFTPFile.Checked = false; } Text = Translations.TranslationGet("WNDCAPTION_EDITPLAYER", "DE", "Edit Player"); helpProvider1.HelpNamespace = Path.Combine(WOTHelper.GetEXEPath(), "Help", "WoT_Stats.chm"); helpProvider1.SetHelpNavigator(this, HelpNavigator.TopicId); helpProvider1.SetHelpKeyword(this, "120"); }
public WOTTrayApp() { //WOTHelper.FindandKillProcess("WOT.Stats"); // Create a simple tray menu with only one item. trayMenu = new ContextMenu(); trayMenu.MenuItems.Add("WOT Statistics", SetupOnClick); trayMenu.MenuItems.Add("Exit", OnExit); // Create a tray icon. In this example we use a // standard system icon for simplicity, but you // can of course use your own custom icon too. trayIcon = new NotifyIcon(); trayIcon.Text = "WOT Statistics Monitor"; trayIcon.Icon = new Icon(new Icon(WOTHelper.GetEXEPath() + @"\wot_statistics.ico"), 40, 40); trayIcon.DoubleClick += trayIcon_DoubleClick; // Add menu to tray icon and show it. trayIcon.ContextMenu = trayMenu; trayIcon.Visible = true; }
public frmSetup(string page) { _propertyFields.Add("StartMonOnStartUp", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.StartMonOnStartUp, NewValue = UserSettings.StartMonOnStartUp }); _propertyFields.Add("LaunchWithWindows", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.LaunchWithWindows, NewValue = UserSettings.LaunchWithWindows }); _propertyFields.Add("MinimiseonStartup", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.MinimiseonStartup, NewValue = UserSettings.MinimiseonStartup }); _propertyFields.Add("MinimiseToTray", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.MinimiseToTray, NewValue = UserSettings.MinimiseToTray }); _propertyFields.Add("LastPlayedCompare", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.LastPlayedCompare, NewValue = UserSettings.LastPlayedCompare }); _propertyFields.Add("AllowVersionCheck", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AllowVersionCheck, NewValue = UserSettings.AllowVersionCheck }); _propertyFields.Add("VersionCounter", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.VersionCounter, NewValue = UserSettings.VersionCounter }); _propertyFields.Add("SystemFont", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.SystemFont, NewValue = UserSettings.SystemFont }); _propertyFields.Add("HTMLCellFont", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.HTMLCellFont, NewValue = UserSettings.HTMLCellFont }); _propertyFields.Add("HTMLHeaderFont", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.HTMLHeaderFont, NewValue = UserSettings.HTMLHeaderFont }); _propertyFields.Add("HTMLTankInfoHeader", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.HTMLTankInfoHeader, NewValue = UserSettings.HTMLTankInfoHeader }); _propertyFields.Add("HTMLShowMovementPics", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.HTMLShowMovementPics, NewValue = UserSettings.HTMLShowMovementPics }); _propertyFields.Add("KillCountsShowTierTotals", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.KillCountsShowTierTotals, NewValue = UserSettings.KillCountsShowTierTotals }); _propertyFields.Add("KillCountsShowRowTotals", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.KillCountsShowRowTotals, NewValue = UserSettings.KillCountsShowRowTotals }); _propertyFields.Add("KillCountsShowColumnTotals", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.KillCountsShowColumnTotals, NewValue = UserSettings.KillCountsShowColumnTotals }); _propertyFields.Add("DateFormat", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.DateFormat, NewValue = UserSettings.DateFormat }); _propertyFields.Add("TimeStamp", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.TimeStamp, NewValue = UserSettings.TimeStamp }); _propertyFields.Add("TimeFormat", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.TimeFormat, NewValue = UserSettings.TimeFormat }); _propertyFields.Add("GroupLPT", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.GroupLPT, NewValue = UserSettings.GroupLPT }); _propertyFields.Add("AllowvBAddictUpload", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AllowvBAddictUpload, NewValue = UserSettings.AllowvBAddictUpload }); _propertyFields.Add("AllowvBAddictUploadDossier", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AllowvBAddictUploadDossier, NewValue = UserSettings.AllowvBAddictUploadDossier }); _propertyFields.Add("AllowvBAddictUploadDossierBattleResult", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AllowvBAddictUploadDossierBattleResult, NewValue = UserSettings.AllowvBAddictUploadDossierBattleResult }); _propertyFields.Add("AllowvBAddictUploadDossierBattleResultReplay", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AllowvBAddictUploadDossierBattleResultReplay, NewValue = UserSettings.AllowvBAddictUploadDossierBattleResultReplay }); _propertyFields.Add("LastPlayedCompareQuota", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.LastPlayedCompareQuota, NewValue = UserSettings.LastPlayedCompareQuota }); _propertyFields.Add("ColorPositive", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.ColorPositive, NewValue = UserSettings.ColorPositive }); _propertyFields.Add("ColorNeutral", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.ColorNeutral, NewValue = UserSettings.ColorNeutral }); _propertyFields.Add("ColorNegative", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.ColorNegative, NewValue = UserSettings.ColorNegative }); _propertyFields.Add("ChartAppearance", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.ChartAppearance, NewValue = UserSettings.ChartAppearance }); _propertyFields.Add("ChartPalette", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.ChartPalette, NewValue = UserSettings.ChartPalette }); _propertyFields.Add("colorWNClass1", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.colorWNClass1, NewValue = UserSettings.colorWNClass1 }); _propertyFields.Add("colorWNClass2", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.colorWNClass2, NewValue = UserSettings.colorWNClass2 }); _propertyFields.Add("colorWNClass3", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.colorWNClass3, NewValue = UserSettings.colorWNClass3 }); _propertyFields.Add("colorWNClass4", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.colorWNClass4, NewValue = UserSettings.colorWNClass4 }); _propertyFields.Add("colorWNClass5", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.colorWNClass5, NewValue = UserSettings.colorWNClass5 }); _propertyFields.Add("colorWNClass6", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.colorWNClass6, NewValue = UserSettings.colorWNClass6 }); _propertyFields.Add("colorWNClass7", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.colorWNClass7, NewValue = UserSettings.colorWNClass7 }); _propertyFields.Add("colorWNClass8", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.colorWNClass8, NewValue = UserSettings.colorWNClass8 }); _propertyFields.Add("colorWNClass9", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.colorWNClass9, NewValue = UserSettings.colorWNClass9 }); _propertyFields.Add("Cloud_Allow", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.Cloud_Allow, NewValue = UserSettings.Cloud_Allow }); _propertyFields.Add("Cloud_Path", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.Cloud_Path, NewValue = UserSettings.Cloud_Path }); _propertyFields.Add("TimeAdjustment", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.TimeAdjustment, NewValue = UserSettings.TimeAdjustment }); _propertyFields.Add("TopMinPlayed", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.TopMinPlayed, NewValue = UserSettings.TopMinPlayed }); _propertyFields.Add("LangID", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.LangID, NewValue = UserSettings.LangID }); //_propertyFields.Add("RatingSystem", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.RatingSystem, NewValue = UserSettings.RatingSystem }); _propertyFields.Add("AutoCreateSession", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AutoCreateSession, NewValue = UserSettings.AutoCreateSession }); _propertyFields.Add("AutoSessionOnStartUp", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AutoSessionOnStartUp, NewValue = UserSettings.AutoSessionOnStartUp }); _propertyFields.Add("AutoSessionOnStartUpMessage", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AutoSessionOnStartUpMessage, NewValue = UserSettings.AutoSessionOnStartUpMessage }); _propertyFields.Add("AutoSessionXBattles", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AutoSessionXBattles, NewValue = UserSettings.AutoSessionXBattles }); _propertyFields.Add("AutoSessionXBattlesMessage", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AutoSessionXBattlesMessage, NewValue = UserSettings.AutoSessionXBattlesMessage }); _propertyFields.Add("AutoSessionXBattlesValue", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AutoSessionXBattlesValue, NewValue = UserSettings.AutoSessionXBattlesValue }); _propertyFields.Add("AutoSessionXHours", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AutoSessionXHours, NewValue = UserSettings.AutoSessionXHours }); _propertyFields.Add("AutoSessionXHoursMessage", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AutoSessionXHoursMessage, NewValue = UserSettings.AutoSessionXHoursMessage }); _propertyFields.Add("AutoSessionXHoursValue", new PropertyFields() { FieldType = typeof(string), OldValue = UserSettings.AutoSessionXHoursValue, NewValue = UserSettings.AutoSessionXHoursValue }); FTPDetails ftpDetails = new FTPDetails(); _propertyFields.Add("FTP_AllowFTP", new PropertyFields() { FieldType = typeof(string), OldValue = ftpDetails.AllowFTP, NewValue = ftpDetails.AllowFTP }); _propertyFields.Add("FTP_Host", new PropertyFields() { FieldType = typeof(string), OldValue = ftpDetails.Host, NewValue = ftpDetails.Host }); _propertyFields.Add("FTP_UserID", new PropertyFields() { FieldType = typeof(string), OldValue = ftpDetails.UserID, NewValue = ftpDetails.UserID }); _propertyFields.Add("FTP_UserPWD", new PropertyFields() { FieldType = typeof(string), OldValue = ftpDetails.UserPWD, NewValue = ftpDetails.UserPWD }); InitializeComponent(); treeList1.ExpandAll(); treeList1.Columns[0].SortOrder = SortOrder.None; if (page == "LastPlayedTanks") { SetNodeFocus(Translations.TranslationGet("STR_RECENTBATTLES", "DE", "Recent Battles")); } else if (page == "KillCounts") { SetNodeFocus(Translations.TranslationGet("STR_KILLCOUNTS", "DE", "Kill Counts")); } else if (page == "CustomGroupings") { SetNodeFocus("Custom Grouping"); } else if (page == "Players") { SetNodeFocus(Translations.TranslationGet("STR_PLAYERS", "DE", "Players")); } else { } helpProvider1.HelpNamespace = Path.Combine(WOTHelper.GetEXEPath(), "Help", "WoT_Stats.chm"); }
// Public MemoryStream property containing PDF Data private void VerifyImages() { string tanksWebPath = "wotstatistics/sync/images/tanks/"; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(WOTHelper.GetSettingsFile()); XmlElement root = xmlDoc.DocumentElement; XmlNodeList nodes = root.SelectSingleNode(@"Tanks").ChildNodes; foreach (XmlNode node in nodes) { string tankID = String.Format("{0}_{1}", node.Attributes["Country"].Value, node.Attributes["Code"].Value); bool updatePicture = false; try { updatePicture = node.Attributes["Update"] == null ? false : bool.Parse(node.Attributes["Update"].Value); } catch { //silently handle the error updatePicture = false; } //first check if we should update if (updatePicture) { DownloadFile(tanksWebPath, Path.Combine(WOTHelper.GetApplicationData(), "Images", "Tanks"), tankID + ".png"); DownloadFile(tanksWebPath, Path.Combine(WOTHelper.GetApplicationData(), "Images", "Tanks"), tankID + "_Large.png"); } else { //only check the small in appdata it is not there we download both' if (!File.Exists(Path.Combine(WOTHelper.GetApplicationData(), "Images", "Tanks", tankID + ".png"))) { //ok now check if it exists in the exe path if (!File.Exists(Path.Combine(WOTHelper.GetEXEPath(), "Images", "Tanks", tankID + ".png"))) { //Download both the normal and large file DownloadFile(tanksWebPath, Path.Combine(WOTHelper.GetApplicationData(), "Images", "Tanks"), tankID + ".png"); DownloadFile(tanksWebPath, Path.Combine(WOTHelper.GetApplicationData(), "Images", "Tanks"), tankID + "_Large.png"); } //ok now check if the large file exists in the appdata path if (!File.Exists(Path.Combine(WOTHelper.GetApplicationData(), "Images", "Tanks", tankID + "_Large.png"))) { //ok now check if the large file exists in the exe path if (!File.Exists(Path.Combine(WOTHelper.GetEXEPath(), "Images", "Tanks", tankID + "_Large.png"))) { //Download both the large file DownloadFile(tanksWebPath, Path.Combine(WOTHelper.GetApplicationData(), "Images", "Tanks"), tankID + "_Large.png"); } } } else { //Okay we found the small one in appdata now check for big one if (!File.Exists(Path.Combine(WOTHelper.GetApplicationData(), "Images", "Tanks", tankID + "_Large.png"))) { //download Large file DownloadFile(tanksWebPath, Path.Combine(WOTHelper.GetApplicationData(), "Images", "Tanks"), tankID + "_Large.png"); } } } } }