private bool AreFilesModified() { foreach (string filePath in filesToCheck) { if (!CUpdater.IsFileNonexistantOrOriginal(filePath)) { return(true); } } return(false); }
private void BtnLaunch_LeftClick(object sender, EventArgs e) { int selectedMissionId = lbCampaignList.SelectedIndex; Mission mission = Missions[selectedMissionId]; if (!ClientConfiguration.Instance.ModMode && (!CUpdater.IsFileNonexistantOrOriginal(mission.Scenario) || AreFilesModified())) { // Confront the user by showing the cheater screen missionToLaunch = mission; cheaterWindow.Enable(); return; } LaunchMission(mission); }
private void BtnLaunch_LeftClick(object sender, EventArgs e) { var mission = lbCampaignList.SelectedItem.Tag as Mission; isCheater = false; missionToLaunch = mission; if (!ClientConfiguration.Instance.ModMode && (!CUpdater.IsFileNonexistantOrOriginal(mission.Scenario) || AreFilesModified())) { // Confront the user by showing the cheater screen isCheater = true; cheaterWindow.Enable(); return; } PostCheaterWindow(); }