Example #1
0
        /// <summary>
        /// c = command, c_Edit
        /// </summary>
        /// <param name="edit">The file you wish to edit</param>
        /// /// <param name="startIndex">The start index for remove.</param>
        /// <param name="count">The count index for remove.</param>
        public static void c_Edit(string edit, short startIndex = 0, short count = 5)
        {
            string file = edit.Remove(startIndex, count);

            if (File.Exists(Uszka.Kernel.cd + file))
            {
                Apps.User.Editor application = new Apps.User.Editor();
                application.Start(file, Uszka.Kernel.cd);
            }
            else
            {
                L.Text.Display("doesnotexit");
            }
        }
Example #2
0
        public static void Run(string edit, short startIndex = 0, short count = 5)
        {
            string file = edit;//edit.Remove(startIndex, count);

            if (File.Exists(Kernel.currentDirectory + file))
            {
                Apps.User.Editor application = new Apps.User.Editor();
                application.Start(file, Kernel.currentDirectory);
            }
            else
            {
                CustomConsole.WriteLineError("This file doesn't exist");
            }
        }
        //TODO: optinal grammar fix add periods '.'
        /// <summary>
        /// c = commnad, c_mkfil
        /// </summary>
        /// <param name="mkfil">The file you wish to create</param>
        /// <param name="startIndex">The start index for remove.</param>
        /// <param name="count">The count index for remove.</param>
        public static void c_mkfil(string mkfil, short startIndex = 0, short count = 6)
        {
            string file = mkfil.Remove(startIndex, count);

            if (!File.Exists(Kernel.current_directory + file))
            {
                Apps.User.Editor application = new Apps.User.Editor();
                application.Start(file, Kernel.current_directory);
            }
            else
            {
                L.Text.Display("alreadyexist", file);
            }
        }