public void ClientsViewCachedLogClick(LocalProcessService localProcess) { // Check for SelectedSlot, and get out if not found if (GridModel.SelectedSlot == null) { return; } string path = Path.Combine(Preferences.Get <string>(Preference.CacheDirectory), GridModel.SelectedSlot.Settings.ClientLogFileName); if (File.Exists(path)) { string errorMessage = String.Format(CultureInfo.CurrentCulture, "An error occurred while attempting to open the client log file.{0}{0}Please check the current log file viewer defined in the preferences.", Environment.NewLine); string fileName = Preferences.Get <string>(Preference.LogFileViewer); string arguments = WrapString.InQuotes(path); localProcess.StartAndNotifyError(fileName, arguments, errorMessage, Logger, MessageBox); } else { string message = String.Format(CultureInfo.CurrentCulture, "The log file for '{0}' does not exist.", GridModel.SelectedSlot.Settings.Name); MessageBox.ShowInformation(Form, message, Core.Application.NameAndVersion); } }
public void ShowHfmDataFiles(LocalProcessService localProcess) { string path = Preferences.Get <string>(Preference.ApplicationDataFolderPath); string errorMessage = String.Format(CultureInfo.CurrentCulture, "An error occurred while attempting to open '{0}'.{1}{1}Please check the current file explorer defined in the preferences.", path, Environment.NewLine); string fileName = Preferences.Get <string>(Preference.FileExplorer); string arguments = WrapString.InQuotes(path); localProcess.StartAndNotifyError(fileName, arguments, errorMessage, Logger, MessageBox); }
// Help Menu Handling Methods public void ShowHfmLogFile(LocalProcessService localProcess) { string path = Path.Combine(Preferences.Get <string>(Preference.ApplicationDataFolderPath), Core.Logging.Logger.LogFileName); string errorMessage = String.Format(CultureInfo.CurrentCulture, "An error occurred while attempting to open the HFM log file.{0}{0}Please check the log file viewer defined in the preferences.", Environment.NewLine); string fileName = Preferences.Get <string>(Preference.LogFileViewer); string arguments = WrapString.InQuotes(path); localProcess.StartAndNotifyError(fileName, arguments, errorMessage, Logger, MessageBox); }