Esempio n. 1
0
        /// <summary>
        /// execute command.
        /// </summary>
        /// <param name="args"> arguments for command</param>
        /// <param name="result">true if success, otherwise false</param>
        /// <param name="type">{info,warning,fail} according to execute</param>
        /// <returns>path if success, else error messege  </returns>
        public string Execute(string[] args, out bool result, out MessageTypeEnum type)
        {
            Thread.Sleep(1000);
            return(m_model.AddFile(args[0], out result, out type));

            // The String Will Return the New Path if result = true, and will return the error message
        }
Esempio n. 2
0
 /// <summary>
 /// The function executes a NewFileCommand ussing the ImageModel.
 /// </summary>
 /// <param name="args">Arguments for the command</param>
 /// <param name="result">Indication if the execute was successful</param>
 /// <returns>If succeed - the image's new path, else - an error message</returns>
 public string Execute(string[] args, out bool result)
 {
     // The String Will Return the New Path if result = true, and will return the error message
     // assuming the first argument is the path we pass on args[0]
     return(m_model.AddFile(args[0], out result));
 }