Пример #1
0
        private static void AddCommandToHistory(string Command)
        {
            List <string> History = GetCommandHistory();

            if (History.Count > 0 && History[0].Equals(Command))
            {
                // Don't store the last as last command
                return;
            }

            File CmdFile = GetHistoryFile();

            if (CmdFile == null)
            {
                return;
            }

            CmdFile.SeekEnd();
            CmdFile.StoreLine(Command);
            CmdFile.Close();
        }
Пример #2
0
 // Writes the message to the log file
 private static void LogToFile(string Message)
 {
     OpenLogFile();
     LogFile?.StoreLine(Message);
     LogFile?.Close();
 }