Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        // 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);
        }