private void LoadSuspectedCurrentProject(ArrayList alProjects) { if (alProjects.Count > 0) { // Ok we have projects but which one is the Current project? // probably the last written to? FileInfo finfoLatest = null; foreach (FileInfo finfo in alProjects) { if (finfoLatest == null) { finfoLatest = finfo; } if (finfo.LastWriteTime > finfoLatest.LastWriteTime) { finfoLatest = finfo; } } // finfoLatest should now be the Current Project !! // so save the information to Properties so that the rest of the app can get the information easily frmMainLog("Loading Suspected Current Project", LoggingEnumerations.LogEventTypes.Warning); LoadProject.OpenProject(finfoLatest); } else { frmMainLog("There are no projects currently available."); } }
private void LoadReportedCurrentProject() { frmMainLog("Loading Reported Current Project", LoggingEnumerations.LogEventTypes.Success); LoadProject.OpenProject(Properties.Settings.Default.CurrentProjectPath); }