示例#1
0
        /// <summary>
        /// a method that get an object and a FileSystemEventArgs and notify the user about the file
        /// </summary>
        /// <param name="sender">an object</param>
        /// <param name="e">a FileSystemEventArgs that represent the path of the file</param>
        public void OnNewFileCreated(object sender, FileSystemEventArgs e)
        {
            string[] args = new string[] { e.FullPath };
            bool     result;
            string   msg = m_controller.ExecuteCommand((int)CommandEnum.NewFileCommand, args, out result);

            if (result)
            {
                m_logging.Log(msg, MessageTypeEnum.INFO);
            }
            else
            {
                m_logging.Log(msg, MessageTypeEnum.FAIL);
            }
            string s = m_controller.ExecuteCommand((int)CommandEnum.LastLogCommand, null, out result);

            m_tcpServer.NotifyAll(s);
        }