public Command GetCommand()
        {
            TABLE.Add(new CommandArgumentEntry("[string]", false, "[color name/ARGB]"));
            TABLE.Add(new CommandArgumentEntry("[string] -s", true, "[color name/ARGB] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("[string] -b", true, "[color name/ARGB] -b(save to running and startup)"));
            CMD_BACKCOLOR = new Command("BACKCOLOR", TABLE, false, "Changes the background color of the text area.", ExecutionLevel.User, CLIMode.Default);
            CMD_BACKCOLOR.SetFunction(() =>
            {
                switch (CMD_BACKCOLOR.InputArgumentEntry.Arguments.Last().Call)
                {
                case "-s":
                    EnvironmentVariables.ChangeDefaultValue("BACKCOLOR", CMD_BACKCOLOR.InputArgumentEntry.Arguments[0].Value);
                    break;

                case "-b":
                    EnvironmentVariables.ChangeDefaultValue("BACKCOLOR", CMD_BACKCOLOR.InputArgumentEntry.Arguments[0].Value);
                    EnvironmentVariables.ChangeCurrentValue("BACKCOLOR", CMD_BACKCOLOR.InputArgumentEntry.Arguments[0].Value);
                    break;

                default:
                    EnvironmentVariables.ChangeCurrentValue("BACKCOLOR", CMD_BACKCOLOR.InputArgumentEntry.Arguments[0].Value);
                    break;
                }
                return("");
            });
            return(CMD_BACKCOLOR);
        }
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("[double]", false, "[curve value]"));
     TABLE.Add(new CommandArgumentEntry("[double] -s", false, "[curve value] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("[double] -b", false, "[curve value] -b(save to running and startup)"));
     CMD_EFFECT_CURVE = new Command("EFFECT-CURVE", TABLE, false, "Changes the CRT distortion amount.", ExecutionLevel.User, CLIMode.Default);
     CMD_EFFECT_CURVE.SetFunction(() =>
     {
         if (CMD_EFFECT_CURVE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
         {
             EnvironmentVariables.ChangeDefaultValue("CRT_CURVE", (double)CMD_EFFECT_CURVE.InputArgumentEntry.Arguments[0].Value);
         }
         else if (CMD_EFFECT_CURVE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
         {
             EnvironmentVariables.ChangeCurrentValue("CRT_CURVE", (double)CMD_EFFECT_CURVE.InputArgumentEntry.Arguments[0].Value);
             EnvironmentVariables.ChangeDefaultValue("CRT_CURVE", (double)CMD_EFFECT_CURVE.InputArgumentEntry.Arguments[0].Value);
         }
         else
         {
             EnvironmentVariables.ChangeCurrentValue("CRT_CURVE", (double)CMD_EFFECT_CURVE.InputArgumentEntry.Arguments[0].Value);
         }
         return("");
     });
     return(CMD_EFFECT_CURVE);
 }
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("-s", false, "-s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-b", false, "-b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-ns", false, "-ds(change CLI mode to default in startup)"));
     TABLE.Add(new CommandArgumentEntry("-nb", false, "-ds(change CLI mode to default in running and startup)"));
     CMD_REGEDIT = new Command("REGEDIT", TABLE, false, "Sets CLI mode to 'Regedit'.", ExecutionLevel.Administrator, CLIMode.Default);
     CMD_REGEDIT.SetFunction(() =>
     {
         if (CMD_REGEDIT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
         {
             EnvironmentVariables.ChangeDefaultValue("CLI_MODE", "Regedit");
         }
         else if (CMD_REGEDIT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
         {
             EnvironmentVariables.ChangeDefaultValue("CLI_MODE", "Regedit");
             EnvironmentVariables.ChangeCurrentValue("CLI_MODE", "Regedit");
         }
         else if (CMD_REGEDIT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-ns"))
         {
             EnvironmentVariables.ChangeDefaultValue("CLI_MODE", "Default");
         }
         else if (CMD_REGEDIT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-nb"))
         {
             EnvironmentVariables.ChangeDefaultValue("CLI_MODE", "Default");
             EnvironmentVariables.ChangeCurrentValue("CLI_MODE", "Default");
         }
         else
         {
             EnvironmentVariables.ChangeCurrentValue("CLI_MODE", "Regedit");
         }
         return("");
     });
     return(CMD_REGEDIT);
 }
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("[double]", false, "[noise value]"));
     TABLE.Add(new CommandArgumentEntry("[double] -s", true, "[noise value] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("[double] -b", true, "[noise value] -b(save to running and startup)"));
     CMD_EFFECT_NOISE = new Command("EFFECT-NOISE", TABLE, false, "Controls noise effect intensity.", ExecutionLevel.User, CLIMode.Default);
     CMD_EFFECT_NOISE.SetFunction(() =>
     {
         if (CMD_EFFECT_NOISE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
         {
             EnvironmentVariables.ChangeDefaultValue("CRT_NOISE_INTENSITY", (double)CMD_EFFECT_NOISE.InputArgumentEntry.Arguments[0].Value);
         }
         else if (CMD_EFFECT_NOISE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
         {
             EnvironmentVariables.ChangeDefaultValue("CRT_NOISE_INTENSITY", (double)CMD_EFFECT_NOISE.InputArgumentEntry.Arguments[0].Value);
             EnvironmentVariables.ChangeCurrentValue("CRT_NOISE_INTENSITY", (double)CMD_EFFECT_NOISE.InputArgumentEntry.Arguments[0].Value);
         }
         else
         {
             EnvironmentVariables.ChangeCurrentValue("CRT_NOISE_INTENSITY", (double)CMD_EFFECT_NOISE.InputArgumentEntry.Arguments[0].Value);
         }
         return "";
     });
     return CMD_EFFECT_NOISE;
 }
Example #5
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("-rad=[double]", false, "-rad=[blur radius]"));
     TABLE.Add(new CommandArgumentEntry("-rad=[double] -s", false, "-rad=[blur radius] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-rad=[double] -b", false, "-rad=[blur radius] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-type=[string]", false, "-type=[Box/Gaussian]"));
     TABLE.Add(new CommandArgumentEntry("-type=[string] -s", false, "-type=[Box/Gaussian] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-type=[string] -b", false, "-type=[Box/Gaussian] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-rad=[double] -type=[string]", false, "-rad=[blur radius] -type=[Box/Gaussian]"));
     TABLE.Add(new CommandArgumentEntry("-rad=[double] -type=[string] -s", false, "-rad=[blur radius] -type=[Box/Gaussian] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-rad=[double] -type=[string] -b", false, "-rad=[blur radius] -type=[Box/Gaussian] -b(save to running and startup)"));
     CMD_EFFECT_BLUR = new Command("EFFECT-BLUR", TABLE, false, "Controls the text area blur effect radius and type.", ExecutionLevel.User, CLIMode.Default);
     CMD_EFFECT_BLUR.SetFunction(() =>
     {
         if (CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
         {
             if (CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Exists(x => x.Call == "-rad"))
             {
                 EnvironmentVariables.ChangeDefaultValue("BLUR_RADIUS", CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Find(x => x.Call == "-rad").Value);
             }
             if (CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Exists(x => x.Call == "-type"))
             {
                 EnvironmentVariables.ChangeDefaultValue("BLUR_TYPE", CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Find(x => x.Call == "-type").Value);
             }
         }
         else if (CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
         {
             if (CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Exists(x => x.Call == "-rad"))
             {
                 EnvironmentVariables.ChangeDefaultValue("BLUR_RADIUS", CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Find(x => x.Call == "-rad").Value);
                 EnvironmentVariables.SetToDefault("BLUR_RADIUS");
             }
             if (CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Exists(x => x.Call == "-type"))
             {
                 EnvironmentVariables.ChangeDefaultValue("BLUR_TYPE", CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Find(x => x.Call == "-type").Value);
                 EnvironmentVariables.SetToDefault("BLUR_TYPE");
             }
         }
         else
         {
             if (CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Exists(x => x.Call == "-rad"))
             {
                 EnvironmentVariables.ChangeCurrentValue("BLUR_RADIUS", CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Find(x => x.Call == "-rad").Value);
             }
             if (CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Exists(x => x.Call == "-type"))
             {
                 EnvironmentVariables.ChangeCurrentValue("BLUR_TYPE", CMD_EFFECT_BLUR.InputArgumentEntry.Arguments.Find(x => x.Call == "-type").Value);
             }
         }
         return("");
     });
     return(CMD_EFFECT_BLUR);
 }
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("[double]", false, "[density]"));
     TABLE.Add(new CommandArgumentEntry("-speed=[double]", false, "-speed=[up>0>down]"));
     TABLE.Add(new CommandArgumentEntry("[double] -speed=[double]", true, "[density] -speed=[up>0>down]"));
     TABLE.Add(new CommandArgumentEntry("[double] -s", true, "[density] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-speed=[double] -s", true, "-speed=[up>0>down] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("[double] -speed=[double] -s", true, "[density] -speed=[up>0>down] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("[double] -b", true, "[density] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-speed=[double] -b", true, " -speed=[up>0>down] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("[double] -speed=[double] -b", true, "[density] -speed=[up>0>down] -b(save to running and startup)"));
     CMD_EFFECT_SCANLINE = new Command("EFFECT-SCANLINE", TABLE, false, "Changes scan line density and optionally speed and direction.", ExecutionLevel.User, CLIMode.Default);
     CMD_EFFECT_SCANLINE.SetFunction(() =>
     {
         if (CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
         {
             if (CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-speed"))
             {
                 EnvironmentVariables.ChangeDefaultValue("CRT_SCANLINE_SPEED", (double)CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Find(x => x.Call == "-speed").Value);
             }
             if (CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Exists(x => x.Call == ""))
             {
                 EnvironmentVariables.ChangeDefaultValue("CRT_SCANLINE_DENSITY", (double)CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Find(x => x.Call == "").Value);
             }
         }
         else if (CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
         {
             if (CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-speed"))
             {
                 EnvironmentVariables.ChangeDefaultValue("CRT_SCANLINE_SPEED", (double)CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Find(x => x.Call == "-speed").Value);
                 EnvironmentVariables.ChangeCurrentValue("CRT_SCANLINE_SPEED", (double)CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Find(x => x.Call == "-speed").Value);
             }
             if (CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Exists(x => x.Call == ""))
             {
                 EnvironmentVariables.ChangeDefaultValue("CRT_SCANLINE_DENSITY", (double)CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Find(x => x.Call == "").Value);
                 EnvironmentVariables.ChangeCurrentValue("CRT_SCANLINE_DENSITY", (double)CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Find(x => x.Call == "").Value);
             }
         }
         else
         {
             if (CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-speed"))
             {
                 EnvironmentVariables.ChangeCurrentValue("CRT_SCANLINE_SPEED", (double)CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Find(x => x.Call == "-speed").Value);
             }
             if (CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Exists(x => x.Call == ""))
             {
                 EnvironmentVariables.ChangeCurrentValue("CRT_SCANLINE_DENSITY", (double)CMD_EFFECT_SCANLINE.InputArgumentEntry.Arguments.Find(x => x.Call == "").Value);
             }
         }
         return("");
     });
     return(CMD_EFFECT_SCANLINE);
 }
Example #7
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("-in=[int]", false, "-in=[fade in duration>=0]"));
     TABLE.Add(new CommandArgumentEntry("-in=[int] -s", false, "-in=[fade in duration>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-in=[int] -b", false, "-in=[fade in duration>=0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-out=[int]", false, "-out=[fade out duration>=0]"));
     TABLE.Add(new CommandArgumentEntry("-out=[int] -s", false, "-out=[fade out duration>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-out=[int] -b", false, "-out=[fade out duration>=0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-in=[int] -out=[int]", false, "-in=[fade in duration>=0] -out=[fade out duration>=0]"));
     TABLE.Add(new CommandArgumentEntry("-in=[int] -out=[int] -s", false, "-in=[fade in duration>=0] -out=[fade out duration>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-in=[int] -out=[int] -b", false, "-in=[fade in duration>=0] -out=[fade out duration>=0] -b(save to running and startup)"));
     CMD_CARET_FADE = new Command("CARET-FADE", TABLE, false, "Sets custom caret fade in/out durations in milliseconds.", ExecutionLevel.User, CLIMode.Default);
     CMD_CARET_FADE.SetFunction(() =>
     {
         if (CMD_CARET_FADE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-in"))
         {
             int _in = (int)CMD_CARET_FADE.InputArgumentEntry.Arguments.Find(x => x.Call == "-in").Value;
             if (CMD_CARET_FADE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FADEIN_SPEED", _in);
             }
             else if (CMD_CARET_FADE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FADEIN_SPEED", _in);
                 EnvironmentVariables.SetToDefault("SYS_CARET_FADEIN_SPEED");
             }
             else
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FADEIN_SPEED", _in);
             }
         }
         if (CMD_CARET_FADE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-out"))
         {
             int _out = (int)CMD_CARET_FADE.InputArgumentEntry.Arguments.Find(x => x.Call == "-out").Value;
             if (CMD_CARET_FADE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FADEOUT_SPEED", _out);
             }
             else if (CMD_CARET_FADE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FADEOUT_SPEED", _out);
                 EnvironmentVariables.SetToDefault("SYS_CARET_FADEOUT_SPEED");
             }
             else
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FADEOUT_SPEED", _out);
             }
         }
         return("");
     });
     return(CMD_CARET_FADE);
 }
        public Command GetCommand()
        {
            TABLE.Add(new CommandArgumentEntry("-w", false, "-w(windowed)"));
            TABLE.Add(new CommandArgumentEntry("-s", false, "-s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-b", false, "-b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-w -s", false, "-w(windowed) -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-w -b", false, "-w(windowed) -b(save to running and startup)"));
            CMD_FULLSCREEN = new Command("FULLSCREEN", TABLE, false, "Switches between fullscreen and windowed mode.", ExecutionLevel.User, CLIMode.Default);
            CMD_FULLSCREEN.SetFunction(() =>
            {
                if (CMD_FULLSCREEN.InputArgumentEntry.Arguments.Count == 0)
                {
                    EnvironmentVariables.ChangeCurrentValue("FULLSCREEN", true);
                    return("");
                }
                switch (CMD_FULLSCREEN.InputArgumentEntry.Arguments[0].Call)
                {
                case "-w":
                    if (CMD_FULLSCREEN.InputArgumentEntry.Arguments.Count == 2)
                    {
                        switch (CMD_FULLSCREEN.InputArgumentEntry.Arguments[1].Call)
                        {
                        case "-s":
                            EnvironmentVariables.ChangeDefaultValue("FULLSCREEN", false);
                            break;

                        case "-b":
                            EnvironmentVariables.ChangeCurrentValue("FULLSCREEN", false);
                            EnvironmentVariables.ChangeDefaultValue("FULLSCREEN", false);
                            break;
                        }
                    }
                    else
                    {
                        EnvironmentVariables.ChangeCurrentValue("FULLSCREEN", false);
                    }
                    break;

                case "-s":
                    EnvironmentVariables.ChangeDefaultValue("FULLSCREEN", true);
                    break;

                case "-b":
                    EnvironmentVariables.ChangeCurrentValue("FULLSCREEN", true);
                    EnvironmentVariables.ChangeDefaultValue("FULLSCREEN", true);
                    break;
                }
                return("");
            });
            return(CMD_FULLSCREEN);
        }
        public Command GetCommand()
        {
            TABLE.Add(new CommandArgumentEntry("-n", true, "-n(disable caret)"));
            TABLE.Add(new CommandArgumentEntry("-s", false, "-s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-b", false, "-b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-n -s", true, "-n(disable caret) -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-n -b", true, "-n(disable caret) -b(save to running and startup)"));
            CMD_CARET = new Command("CARET", TABLE, false, "Enables/disables the custom caret.", ExecutionLevel.User, CLIMode.Default);
            CMD_CARET.SetFunction(() =>
            {
                if (CMD_CARET.InputArgumentEntry.Arguments.Count == 0)
                {
                    EnvironmentVariables.ChangeCurrentValue("SYS_CARET", true);
                }
                else if (CMD_CARET.InputArgumentEntry.Arguments.Count == 1)
                {
                    switch (CMD_CARET.InputArgumentEntry.Arguments[0].Call)
                    {
                    case "-n":
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET", false);
                        break;

                    case "-s":
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET", true);
                        break;

                    case "-b":
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET", true);
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET", true);
                        break;
                    }
                }
                else
                {
                    switch (CMD_CARET.InputArgumentEntry.Arguments[1].Call)
                    {
                    case "-s":
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET", false);
                        break;

                    case "-b":
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET", false);
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET", false);
                        break;
                    }
                }
                return("");
            });
            return(CMD_CARET);
        }
Example #10
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("[int]", false, "[new size]"));
     TABLE.Add(new CommandArgumentEntry("[int] -s", true, "[new size] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("[int] -b", true, "[new size] -b(save to running and startup)"));
     CMD_HISTORY_SETSIZE = new Command("HISTORY-SETSIZE", TABLE, false, "Sets the history size of the current CLI mode. If the new size is lower than the previous one, some of the entries will be discarded.", ExecutionLevel.User, CLIMode.Any);
     CMD_HISTORY_SETSIZE.SetFunction(() =>
     {
         if ((string)EnvironmentVariables.GetCurrentValue("CLI_MODE") == "Default")
         {
             if (CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments.Count == 2)
             {
                 if (CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[1].Call == "-s")
                 {
                     EnvironmentVariables.ChangeDefaultValue("DEF_HIST_SIZE", (int)CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[0].Value);
                 }
                 else
                 {
                     EnvironmentVariables.ChangeDefaultValue("DEF_HIST_SIZE", (int)CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[0].Value);
                     EnvironmentVariables.ChangeCurrentValue("DEF_HIST_SIZE", (int)CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[0].Value);
                 }
             }
             else
             {
                 EnvironmentVariables.ChangeCurrentValue("DEF_HIST_SIZE", (int)CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[0].Value);
             }
         }
         else
         {
             if (CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments.Count == 2)
             {
                 if (CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[1].Call == "-s")
                 {
                     EnvironmentVariables.ChangeDefaultValue("REG_HIST_SIZE", (int)CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[0].Value);
                 }
                 else
                 {
                     EnvironmentVariables.ChangeDefaultValue("REG_HIST_SIZE", (int)CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[0].Value);
                     EnvironmentVariables.ChangeCurrentValue("REG_HIST_SIZE", (int)CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[0].Value);
                 }
             }
             else
             {
                 EnvironmentVariables.ChangeCurrentValue("REG_HIST_SIZE", (int)CMD_HISTORY_SETSIZE.InputArgumentEntry.Arguments[0].Value);
             }
         }
         return("");
     });
     return(CMD_HISTORY_SETSIZE);
 }
Example #11
0
        public Command GetCommand()
        {
            TABLE.Add(new CommandArgumentEntry("[string]", false, "[color name/ARGB]"));
            TABLE.Add(new CommandArgumentEntry("[string] -s", true, "[color name/ARGB] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("[string] -b", true, "[color name/ARGB] -b(save to running and startup)"));
            CMD_COLOR = new Command("COLOR", TABLE, false, "Changes all color properties(except BACKCOLOR and SYS_CARET_BORDER_COLOR) to the specified value.", ExecutionLevel.User, CLIMode.Default);
            CMD_COLOR.SetFunction(() =>
            {
                if (CMD_COLOR.InputArgumentEntry.Arguments.Count == 1)
                {
                    EnvironmentVariables.ChangeCurrentValue("FORECOLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                    EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FILL_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                    EnvironmentVariables.ChangeCurrentValue("SYS_CARET_SHADOW_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                    EnvironmentVariables.ChangeCurrentValue("SHADOW_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                }
                else
                {
                    switch (CMD_COLOR.InputArgumentEntry.Arguments[1].Call)
                    {
                    case "-s":
                        EnvironmentVariables.ChangeDefaultValue("FORECOLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FILL_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_SHADOW_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeDefaultValue("SHADOW_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        break;

                    case "-b":
                        EnvironmentVariables.ChangeCurrentValue("FORECOLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FILL_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_SHADOW_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeCurrentValue("SHADOW_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeDefaultValue("FORECOLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FILL_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_SHADOW_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        EnvironmentVariables.ChangeDefaultValue("SHADOW_COLOR", CMD_COLOR.InputArgumentEntry.Arguments[0].Value.ToString());
                        break;
                    }
                }
                return("");
            });
            return(CMD_COLOR);
        }
Example #12
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("-n", false, "-n(disable MOTD)"));
     CMD_SHMOTD = new Command("SHMOTD", TABLE, false, "Enables/disables message of the day.", ExecutionLevel.User, CLIMode.Default);
     CMD_SHMOTD.SetFunction(() =>
     {
         if (CMD_SHMOTD.InputArgumentEntry.Arguments.Count == 0)
         {
             EnvironmentVariables.ChangeCurrentValue("SHMOTD", true);
             EnvironmentVariables.ChangeDefaultValue("SHMOTD", true);
         }
         else
         {
             EnvironmentVariables.ChangeCurrentValue("SHMOTD", false);
             EnvironmentVariables.ChangeDefaultValue("SHMOTD", false);
         }
         return("");
     });
     return(CMD_SHMOTD);
 }
Example #13
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("[string]", false));
     CMD_MOTD = new Command("MOTD", TABLE, false, "Sets the text of the message of the day, that is shown on startup if enabled.", ExecutionLevel.User, CLIMode.Default);
     CMD_MOTD.SetFunction(() =>
     {
         if (CMD_MOTD.InputArgumentEntry.Arguments.Count == 0)
         {
             EnvironmentVariables.ChangeCurrentValue("MOTD", "");
             EnvironmentVariables.ChangeDefaultValue("MOTD", "");
         }
         else
         {
             EnvironmentVariables.ChangeCurrentValue("MOTD", CMD_MOTD.InputArgumentEntry.Arguments[0].Value);
             EnvironmentVariables.ChangeDefaultValue("MOTD", CMD_MOTD.InputArgumentEntry.Arguments[0].Value);
         }
         return("");
     });
     return(CMD_MOTD);
 }
Example #14
0
        public Command GetCommand()
        {
            TABLE.Add(new CommandArgumentEntry("[string]", false, "[color name/ARGB]"));
            TABLE.Add(new CommandArgumentEntry("[string] -s", true, "[color name/ARGB] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("[string] -b", true, "[color name/ARGB] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-border=[string] -s", true, "-border=[color name/ARGB] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-border=[string] -b", true, "-border=[color name/ARGB] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("[string] -border=[string]", true, "[color name/ARGB] -border=[color name/ARGB]"));
            TABLE.Add(new CommandArgumentEntry("[string] -border=[string] -s", true, "[color name/ARGB] -border=[color name/ARGB] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("[string] -border=[string] -b", true, "[color name/ARGB] -border=[color name/ARGB] -b(save to running and startup)"));
            CMD_CARET_COLOR = new Command("CARET-COLOR", TABLE, false, "Changes the color of custom caret.", ExecutionLevel.User, CLIMode.Default);
            CMD_CARET_COLOR.SetFunction(() =>
            {
                if (CMD_CARET_COLOR.InputArgumentEntry.Arguments.Count == 1)
                {
                    switch (CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Call)
                    {
                    case "":
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FILL_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        break;

                    case "-border":
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BORDER_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        break;
                    }
                }
                else if (CMD_CARET_COLOR.InputArgumentEntry.Arguments.Count == 2)
                {
                    switch (CMD_CARET_COLOR.InputArgumentEntry.Arguments[1].Call)
                    {
                    case "-border":
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FILL_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BORDER_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[1].Value);
                        break;

                    case "-s" when CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Call == "":
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FILL_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        break;

                    case "-b" when CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Call == "":
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FILL_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FILL_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        break;

                    case "-s" when CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Call == "-border":
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BORDER_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        break;

                    case "-b" when CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Call == "-border":
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BORDER_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BORDER_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        break;
                    }
                }
                else
                {
                    switch (CMD_CARET_COLOR.InputArgumentEntry.Arguments[2].Call)
                    {
                    case "-s":
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BORDER_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[1].Value);
                        break;

                    case "-b":
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BORDER_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[1].Value);
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[0].Value);
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BORDER_COLOR", CMD_CARET_COLOR.InputArgumentEntry.Arguments[1].Value);
                        break;
                    }
                }
                return("");
            });
            return(CMD_CARET_COLOR);
        }
Example #15
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("-w=[int]", false, "-w=[width>=0]"));
     TABLE.Add(new CommandArgumentEntry("-h=[int]", false, "-h=[height>=0]"));
     TABLE.Add(new CommandArgumentEntry("-border=[int]", false, "-border=[boder thickness>=0]"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -s", false, "-w=[width>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-h=[int] -s", false, "-h=[height>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-border=[int] -s", false, "-border=[boder thickness>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -b", false, "-w=[width>=0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-h=[int] -b", false, "-h=[height>=0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-border=[int] -b", false, "-border=[boder thickness>=0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -h=[int]", false, "-w=[width>=0] -h=[height>=0]"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -h=[int] -s", false, "-w=[width>=0] -h=[height>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -h=[int] -b", false, "-w=[width>=0] -h=[height>=0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -border=[int]", false, "-w=[width>=0] -border=[boder thickness>=0]"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -border=[int] -s", false, "-w=[width>=0] -border=[boder thickness>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -border=[int] -b", false, "-w=[width>=0] -border=[boder thickness>=0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-border=[int] -h=[int]", false, "-border=[boder thickness>=0] -h=[height>=0]"));
     TABLE.Add(new CommandArgumentEntry("-border=[int] -h=[int] -s", false, "-border=[boder thickness>=0] -h=[height>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-border=[int] -h=[int] -b", false, "-border=[boder thickness>=0] -h=[height>=0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -h=[int] -border=[int]", false, "-w=[width>=0] -h=[height>0] -border=[boder thickness>=0]"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -h=[int] -border=[int] -s", false, "-w=[width>=0] -h=[height>=0] -border=[boder thickness>=0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-w=[int] -h=[int] -border=[int] -b", false, "-w=[width>=0] -h=[height>=0] -border=[boder thickness>=0] -b(save to running and startup)"));
     CMD_CARET_SHAPE = new Command("CARET-SHAPE", TABLE, false, "Sets the dimensions of the custom caret. If argument '-w'(width) or '-h'(height) is 0, the caret dimensions are set automatically(automatic dimensions are optimized for the default font and are not guaranteed to work correctly when using any other font).", ExecutionLevel.User, CLIMode.Default);
     CMD_CARET_SHAPE.SetFunction(() =>
     {
         if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
         {
             if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-w"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_WIDTH", CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Find(x => x.Call == "-w").Value);
             }
             if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BORDER", CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Find(x => x.Call == "-b").Value);
             }
             if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-h"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_HEIGHT", CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Find(x => x.Call == "-h").Value);
             }
         }
         else if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
         {
             if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-w"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_WIDTH", CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Find(x => x.Call == "-w").Value);
                 EnvironmentVariables.SetToDefault("SYS_CARET_WIDTH");
             }
             if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BORDER", CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Find(x => x.Call == "-b").Value);
                 EnvironmentVariables.SetToDefault("SYS_CARET_BORDER");
             }
             if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-h"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_HEIGHT", CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Find(x => x.Call == "-h").Value);
                 EnvironmentVariables.SetToDefault("SYS_CARET_HEIGHT");
             }
         }
         else
         {
             if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-w"))
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_WIDTH", CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Find(x => x.Call == "-w").Value);
             }
             if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BORDER", CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Find(x => x.Call == "-b").Value);
             }
             if (CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-h"))
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_HEIGHT", CMD_CARET_SHAPE.InputArgumentEntry.Arguments.Find(x => x.Call == "-h").Value);
             }
         }
         return("");
     });
     return(CMD_CARET_SHAPE);
 }
Example #16
0
        public Command GetCommand()
        {
            TABLE.Add(new CommandArgumentEntry("-int=[int]", false, "-int=[fade in/out interval]"));
            TABLE.Add(new CommandArgumentEntry("-int=[int] -s", false, "-int=[blink interval] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-int=[int] -b", false, "-int=[blink interval] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-int=[int] -idle=[int]", false, "-int=[blink interval] -idle=[blink after idle time]"));
            TABLE.Add(new CommandArgumentEntry("-int=[int] -idle=[int] -s", false, "-int=[blink interval] -idle=[blink after idle time] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-int=[int] -idle=[int] -b", false, "-int=[blink interval] -idle=[blink after idle time] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-idle=[int]", false, "-idle=[blink after idle time]"));
            TABLE.Add(new CommandArgumentEntry("-idle=[int] -s", false, "-idle=[blink after idle time] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-idle=[int] -b", false, "-idle=[blink after idle time] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-n", false, "-n(disable blink)"));
            TABLE.Add(new CommandArgumentEntry("-n -s", false, "-n(disable blink) -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-n -b", false, "-n(disable blink) -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-s", false, "-s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-b", false, "-b(save to running and startup)"));
            CMD_CARET_BLINK = new Command("CARET-BLINK", TABLE, false, "Controls the blink behavior of the custom caret.", ExecutionLevel.User, CLIMode.Default);
            CMD_CARET_BLINK.SetFunction(() =>
            {
                if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-n"))
                {
                    if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BLINK", false);
                    }
                    else if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BLINK", false);
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK", false);
                    }
                    else
                    {
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK", false);
                    }
                    return("");
                }
                else if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Count == 0)
                {
                    EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK", true);
                    return("");
                }
                else if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Count == 1)
                {
                    if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BLINK", true);
                    }
                    else if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BLINK", true);
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK", true);
                    }
                    else if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-int"))
                    {
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK_INTERVAL", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-int").Value);
                    }
                    else if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-idle"))
                    {
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK_IDLE_TIME", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-idle").Value);
                    }
                    return("");
                }

                if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
                {
                    if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-int"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BLINK_INTERVAL", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-int").Value);
                    }
                    if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-idle"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BLINK_IDLE_TIME", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-idle").Value);
                    }
                }
                else if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
                {
                    if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-int"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BLINK_INTERVAL", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-int").Value);
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK_INTERVAL", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-int").Value);
                    }
                    if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-idle"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("SYS_CARET_BLINK_IDLE_TIME", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-idle").Value);
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK_IDLE_TIME", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-idle").Value);
                    }
                }
                else
                {
                    if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-int"))
                    {
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK_INTERVAL", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-int").Value);
                    }
                    if (CMD_CARET_BLINK.InputArgumentEntry.Arguments.Exists(x => x.Call == "-idle"))
                    {
                        EnvironmentVariables.ChangeCurrentValue("SYS_CARET_BLINK_IDLE_TIME", (int)CMD_CARET_BLINK.InputArgumentEntry.Arguments.Find(x => x.Call == "-idle").Value);
                    }
                }
                return("");
            });
            return(CMD_CARET_BLINK);
        }
Example #17
0
        public Command GetCommand()
        {
            TABLE.Add(new CommandArgumentEntry("[string]", false, "[path]"));
            TABLE.Add(new CommandArgumentEntry("[string] -s", true, "[path] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("[string] -b", true, "[path] -b(save to running and startup)"));
            CMD_CD = new Command("CD", TABLE, false, "Changes the current(and/or startup) directory.", ExecutionLevel.User, CLIMode.Default);
            CMD_CD.SetFunction(() =>
            {
                string path = CMD_CD.InputArgumentEntry.Arguments[0].Value.ToString();
                if (path == "..")
                {
                    if (EnvironmentVariables.GetCurrentValue("DIRECTORY").ToString().Count(x => x == '\\') > 1)
                    {
                        path = EnvironmentVariables.GetCurrentValue("DIRECTORY").ToString();
                        path = path.Remove(path.Length - 1, 1);
                        path = path.Remove(path.LastIndexOf('\\'));
                    }
                    else
                    {
                        path = EnvironmentVariables.GetCurrentValue("DIRECTORY").ToString();
                    }
                }
                else if (path == "\\sdir")
                {
                    path = EnvironmentVariables.GetDefaultValue("DIRECTORY").ToString();
                }
                else if (path == "\\wdir")
                {
                    path = Environment.CurrentDirectory;
                }
                else if ((Directory.Exists(path) && path.Contains(":")) || Directory.Exists((string)EnvironmentVariables.GetCurrentValue("DIRECTORY") + path))
                {
                    if (Directory.Exists((string)EnvironmentVariables.GetCurrentValue("DIRECTORY") + path))
                    {
                        path = (string)EnvironmentVariables.GetCurrentValue("DIRECTORY") + path;
                    }
                }
                else
                {
                    return("\nInvalid path!");
                }
                path = path + (path[path.Length - 1] == '\\' ? "" : "\\");
                switch (CMD_CD.InputArgumentEntry.Arguments.Last().Call)
                {
                case "-s":
                    EnvironmentVariables.ChangeDefaultValue("DIRECTORY", path);
                    break;

                case "-b":
                    EnvironmentVariables.ChangeDefaultValue("DIRECTORY", path);
                    EnvironmentVariables.ChangeCurrentValue("DIRECTORY", path);
                    break;

                default:
                    EnvironmentVariables.ChangeCurrentValue("DIRECTORY", path);
                    break;
                }
                return("");
            });
            return(CMD_CD);
        }
Example #18
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("-s", false, "-s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-b", false, "-b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-n", false, "-n(disable footprint)"));
     TABLE.Add(new CommandArgumentEntry("-n -s", false, "-n(disable footprint) -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-n -b", false, "-n(disable footprint) -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-out=[int]", false, "-out=[footprint fade out time>0]"));
     TABLE.Add(new CommandArgumentEntry("-out=[int] -s", true, "-out=[footprint fade out time>0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-out=[int] -b", true, "-out=[footprint fade out time>0] -b(save to running and startup)"));
     CMD_CARET_FOOTPRINT = new Command("CARET-FOOTPRINT", TABLE, false, "Contorls custom caret footprint fade out duration in milliseconds or enables/disables footprint.", ExecutionLevel.User, CLIMode.Default);
     CMD_CARET_FOOTPRINT.SetFunction(() =>
     {
         if (CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-out"))
         {
             if (CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments.Count == 2)
             {
                 if (CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments[1].Call == "-s")
                 {
                     EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FOOTPRINT_FADEOUT_SPEED", CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments[1].Value);
                 }
                 else if (CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments[1].Call == "-b")
                 {
                     EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FOOTPRINT_FADEOUT_SPEED", CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments[1].Value);
                     EnvironmentVariables.SetToDefault("SYS_CARET_FOOTPRINT_FADEOUT_SPEED");
                 }
             }
             else
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FOOTPRINT_FADEOUT_SPEED", CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments[0].Value);
             }
         }
         else if (CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
         {
             if (CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-n"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FOOTPRINT", false);
             }
             else
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FOOTPRINT", true);
             }
         }
         else if (CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
         {
             if (CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-n"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FOOTPRINT", false);
                 EnvironmentVariables.SetToDefault("SYS_CARET_FOOTPRINT");
             }
             else
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_FOOTPRINT", true);
                 EnvironmentVariables.SetToDefault("SYS_CARET_FOOTPRINT");
             }
         }
         else
         {
             if (CMD_CARET_FOOTPRINT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-n"))
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FOOTPRINT", false);
             }
             else
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_FOOTPRINT", true);
             }
         }
         return("");
     });
     return(CMD_CARET_FOOTPRINT);
 }
Example #19
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("-save", false));
     TABLE.Add(new CommandArgumentEntry("-save=[string]", false, "-save=[file path]"));
     TABLE.Add(new CommandArgumentEntry("-load=[string]", false, "-load=[file path]"));
     CMD_CONFIG_RUNNING = new Command("CONFIG-RUNNING", TABLE, false, "Saves/loads running config from/to the specified file.", ExecutionLevel.User, CLIMode.Default);
     CMD_CONFIG_RUNNING.SetFunction(() =>
     {
         if (CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments.Count == 0)
         {
             EnvironmentVariables.GetAll().ForEach((x) =>
             {
                 if (x.VarType == VariableType.Constant)
                 {
                     IOInteractLayer.StandardOutput(CMD_CONFIG_RUNNING, $"\n\t{x.Name} = {x.CurrentValue}");
                 }
             });
         }
         else if (CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value != null && CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString() != "")
         {
             if (CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Call == "-save")
             {
                 string path = string.Empty;
                 if (CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString().Contains("\\"))
                 {
                     if (Directory.Exists(CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString().Remove(CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString().LastIndexOf('\\'))) && CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString().Contains(':'))
                     {
                         path = CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString();
                     }
                     else if (Directory.Exists(EnvironmentVariables.GetCurrentValue("DIRECTORY").ToString() + CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString().Remove(CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString().LastIndexOf('\\'))))
                     {
                         path = EnvironmentVariables.GetCurrentValue("DIRECTORY").ToString() + CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString();
                     }
                 }
                 else
                 {
                     path = EnvironmentVariables.GetCurrentValue("DIRECTORY").ToString() + CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString();
                 }
                 if (path != string.Empty)
                 {
                     using (StreamWriter sw = new StreamWriter(CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString()))
                     {
                         EnvironmentVariables.FindAll(x => x.VarType == VariableType.Constant).ForEach((x) =>
                         {
                             sw.WriteLine($"{x.ValueType.FullName}:{x.Name}={x.CurrentValue}");
                         });
                         sw.Close();
                     }
                     return($"\nRunning config saved at: {Path.GetFullPath(path)}");
                 }
                 else
                 {
                     IOInteractLayer.StandardOutput(CMD_CONFIG_RUNNING, "\nInvalid path!");
                 }
             }
             else
             {
                 string path = string.Empty;
                 if (File.Exists(CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString()) && CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString().Contains(':'))
                 {
                     path = CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString();
                 }
                 else if (File.Exists(EnvironmentVariables.GetCurrentValue("DIRECTORY").ToString() + CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString()))
                 {
                     path = EnvironmentVariables.GetCurrentValue("DIRECTORY").ToString() + CMD_CONFIG_RUNNING.InputArgumentEntry.Arguments[0].Value.ToString();
                 }
                 if (path != string.Empty)
                 {
                     List <string> lines = File.ReadAllLines(path).ToList();
                     Type currentType;
                     string name;
                     string value;
                     lines.ForEach((x) =>
                     {
                         currentType = Type.GetType(x.Split(':')[0]);
                         x           = x.Remove(0, x.IndexOf(':') + 1);
                         name        = x.Split('=')[0];
                         value       = x.Split('=')[1];
                         try
                         {
                             EnvironmentVariables.ChangeCurrentValue(name, value);
                         }
                         catch (EnvironmentVariableException ex)
                         {
                             IOInteractLayer.StandardError(CMD_CONFIG_RUNNING, ex);
                         }
                     });
                     return($"\nRunning config loaded from: {Path.GetFullPath(path)}");
                 }
                 else
                 {
                     IOInteractLayer.StandardOutput(CMD_CONFIG_RUNNING, "\nConfig file not found!");
                 }
             }
         }
         else
         {
             using (StreamWriter sw = new StreamWriter("config.ini"))
             {
                 List <string> names = new List <string>();
                 EnvironmentVariables.FindAll(x => x.VarType == VariableType.Constant).ForEach((x) =>
                 {
                     sw.WriteLine($"{x.ValueType.FullName}:{x.Name}={x.CurrentValue}");
                     names.Add(x.Name);
                 });
                 sw.Close();
                 names.ForEach((x) =>
                 {
                     EnvironmentVariables.ChangeDefaultValue(x, EnvironmentVariables.GetCurrentValue(x), false);
                 });
             }
             return($"\nRunning config saved at: {Path.GetFullPath("config.ini")}");
         }
         return("");
     });
     return(CMD_CONFIG_RUNNING);
 }
Example #20
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("[string]", false, "[subkey path]"));
     TABLE.Add(new CommandArgumentEntry("[string] -s", true, "[subkey path] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("[string] -b", true, "[subkey path] -b(save to running and startup)"));
     CMD_CSK = new Command("CSK", TABLE, false, "Changes the current subkey.", ExecutionLevel.Administrator, CLIMode.Regedit);
     CMD_CSK.SetFunction(() =>
     {
         if (CMD_CSK.InputArgumentEntry.Arguments.Count == 0)
         {
             return("\nInvalid arguments!");
         }
         RegistryHive hiveKey;
         string subKey = null;
         if (CMD_CSK.InputArgumentEntry.Arguments[0].Value.ToString() == "\\stsk")
         {
             EnvironmentVariables.SetToDefault("SUBKEY");
         }
         else if (CMD_CSK.InputArgumentEntry.Arguments[0].Value.ToString() == "..")
         {
             if (EnvironmentVariables.GetCurrentValue("SUBKEY").ToString().Count(x => x == '\\') > 1)
             {
                 string path = EnvironmentVariables.GetCurrentValue("SUBKEY").ToString();
                 path        = path.Remove(path.Length - 1, 1);
                 path        = path.Remove(path.LastIndexOf("\\"));
                 if (CMD_CSK.InputArgumentEntry.Arguments.Count == 1)
                 {
                     EnvironmentVariables.ChangeCurrentValue("SUBKEY", path + "\\");
                 }
                 else if (CMD_CSK.InputArgumentEntry.Arguments[1].Call == "-s")
                 {
                     EnvironmentVariables.ChangeDefaultValue("SUBKEY", path + "\\");
                 }
                 else
                 {
                     EnvironmentVariables.ChangeDefaultValue("SUBKEY", path + "\\");
                     EnvironmentVariables.ChangeCurrentValue("SUBKEY", path + "\\");
                 }
             }
         }
         else
         {
             try
             {
                 if (CMD_CSK.InputArgumentEntry.Arguments[0].Value.ToString().Contains("\\"))
                 {
                     hiveKey = (RegistryHive)Enum.Parse(typeof(RegistryHive), CMD_CSK.InputArgumentEntry.Arguments[0].Value.ToString().Substring(0, CMD_CSK.InputArgumentEntry.Arguments[0].Value.ToString().IndexOf("\\")));
                     subKey  = CMD_CSK.InputArgumentEntry.Arguments[0].Value.ToString().Substring(CMD_CSK.InputArgumentEntry.Arguments[0].Value.ToString().IndexOf("\\") + 1);
                 }
                 else
                 {
                     hiveKey = (RegistryHive)Enum.Parse(typeof(RegistryHive), CMD_CSK.InputArgumentEntry.Arguments[0].Value.ToString());
                     subKey  = "";
                 }
             }
             catch (Exception)
             {
                 hiveKey = (RegistryHive)Enum.Parse(typeof(RegistryHive), EnvironmentVariables.GetCurrentValue("SUBKEY").ToString().Substring(0, EnvironmentVariables.GetCurrentValue("SUBKEY").ToString().IndexOf("\\")));
                 subKey  = EnvironmentVariables.GetCurrentValue("SUBKEY").ToString().Substring(EnvironmentVariables.GetCurrentValue("SUBKEY").ToString().IndexOf("\\") + 1) + CMD_CSK.InputArgumentEntry.Arguments[0].Value.ToString();
             }
             try
             {
                 RegistryKey newKey = RegistryKey.OpenBaseKey(hiveKey, RegistryView.Default).OpenSubKey(subKey);
                 if (newKey == null)
                 {
                     return("\nSubkey not found!");
                 }
                 if (CMD_CSK.InputArgumentEntry.Arguments.Count == 1)
                 {
                     EnvironmentVariables.ChangeCurrentValue("SUBKEY", hiveKey.ToString() + "\\" + subKey + ((hiveKey.ToString() + "\\" + subKey).EndsWith("\\") ? "" : "\\"));
                 }
                 else if (CMD_CSK.InputArgumentEntry.Arguments[1].Call == "-s")
                 {
                     EnvironmentVariables.ChangeDefaultValue("SUBKEY", hiveKey.ToString() + "\\" + subKey + ((hiveKey.ToString() + "\\" + subKey).EndsWith("\\") ? "" : "\\"));
                 }
                 else
                 {
                     EnvironmentVariables.ChangeDefaultValue("SUBKEY", hiveKey.ToString() + "\\" + subKey + ((hiveKey.ToString() + "\\" + subKey).EndsWith("\\") ? "" : "\\"));
                     EnvironmentVariables.ChangeCurrentValue("SUBKEY", hiveKey.ToString() + "\\" + subKey + ((hiveKey.ToString() + "\\" + subKey).EndsWith("\\") ? "" : "\\"));
                 }
             }
             catch (Exception ex)
             {
                 IOInteractLayer.StandardError(CMD_CSK, ex);
             }
         }
         return("");
     });
     return(CMD_CSK);
 }
Example #21
0
        public Command GetCommand()
        {
            TABLE.Add(new CommandArgumentEntry("[double]", false, "[size]"));
            TABLE.Add(new CommandArgumentEntry("[double] -sm=[double]", true, "[size] -sm=[smoothness value]"));
            TABLE.Add(new CommandArgumentEntry("[double] -er=[double]", true, "[size] -er=[edge rounding]"));
            TABLE.Add(new CommandArgumentEntry("[double] -sm=[double] -er=[double]", true, "[size] -sm=[smoothness value]"));
            TABLE.Add(new CommandArgumentEntry("[double] -s", false, "[size] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("[double] -sm=[double] -s", true, "[size] -sm=[smoothness value] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("[double] -er=[double] -s", true, "[size] -er=[edge rounding] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("[double] -sm=[double] -er=[double] -s", true, "[size] -sm=[smoothness value] -er=[edge rounding] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("[double] -b", false, "[size] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("[double] -sm=[double] -b", true, "[size] -sm=[smoothness value] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("[double] -er=[double] -b", true, "[size] -er=[edge rounding] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("[double] -sm=[double] -er=[double] -b", true, "[size] -sm=[smoothness value] -er=[edge rounding] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-sm=[double]", false, "-sm=[smoothness value]"));
            TABLE.Add(new CommandArgumentEntry("-er=[double]", false, "-er=[edge rounding]"));
            TABLE.Add(new CommandArgumentEntry("-sm=[double] -er=[double]", true, "-sm=[smoothness value] -er=[edge rounding]"));
            TABLE.Add(new CommandArgumentEntry("-sm=[double] -s", false, "-sm=[smoothness value] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-er=[double] -s", false, "-er=[edge rounding] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-sm=[double] -er=[double] -s", true, "-sm=[smoothness value] -er=[edge rounding] -s(save to startup)"));
            TABLE.Add(new CommandArgumentEntry("-sm=[double] -b", false, "-sm=[smoothness value] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-er=[double] -b", false, "-er=[edge rounding] -b(save to running and startup)"));
            TABLE.Add(new CommandArgumentEntry("-sm=[double] -er=[double] -b", true, "-sm=[smoothness value] -er=[edge rounding] -b(save to running and startup)"));

            CMD_EFFECT_VIGNETTE = new Command("EFFECT-VIGNETTE", TABLE, false, "Controls vignette effect size, smoothness and edge rounding.", ExecutionLevel.User, CLIMode.Default);
            CMD_EFFECT_VIGNETTE.SetFunction(() =>
            {
                if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
                {
                    if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-sm"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("CRT_VIGNETTE_SMOOTHNESS", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "-sm").Value);
                    }
                    if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-er"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("CRT_VIGNETTE_EDGE_ROUNDING", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "-er").Value);
                    }
                    if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == ""))
                    {
                        EnvironmentVariables.ChangeDefaultValue("CRT_VIGNETTE_SIZE", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "").Value);
                    }
                }
                else if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
                {
                    if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-sm"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("CRT_VIGNETTE_SMOOTHNESS", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "-sm").Value);
                        EnvironmentVariables.ChangeCurrentValue("CRT_VIGNETTE_SMOOTHNESS", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "-sm").Value);
                    }
                    if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-er"))
                    {
                        EnvironmentVariables.ChangeDefaultValue("CRT_VIGNETTE_EDGE_ROUNDING", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "-er").Value);
                        EnvironmentVariables.ChangeCurrentValue("CRT_VIGNETTE_EDGE_ROUNDING", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "-er").Value);
                    }
                    if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == ""))
                    {
                        EnvironmentVariables.ChangeDefaultValue("CRT_VIGNETTE_SIZE", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "").Value);
                        EnvironmentVariables.ChangeCurrentValue("CRT_VIGNETTE_SIZE", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "").Value);
                    }
                }
                else
                {
                    if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-sm"))
                    {
                        EnvironmentVariables.ChangeCurrentValue("CRT_VIGNETTE_SMOOTHNESS", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "-sm").Value);
                    }
                    if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == "-er"))
                    {
                        EnvironmentVariables.ChangeCurrentValue("CRT_VIGNETTE_EDGE_ROUNDING", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "-er").Value);
                    }
                    if (CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Exists(x => x.Call == ""))
                    {
                        EnvironmentVariables.ChangeCurrentValue("CRT_VIGNETTE_SIZE", CMD_EFFECT_VIGNETTE.InputArgumentEntry.Arguments.Find(x => x.Call == "").Value);
                    }
                }
                return("");
            });
            return(CMD_EFFECT_VIGNETTE);
        }
Example #22
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("-family=[string]", false, "-family=[family name]"));
     TABLE.Add(new CommandArgumentEntry("-style=[string]", false, "-style=[Regular/Oblique/Italic]"));
     TABLE.Add(new CommandArgumentEntry("-size=[int]", false, "-size=[font size>0]"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -s", false, "-family=[family name] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-style=[string] -s", false, "-style=[Regular/Oblique/Italic] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-size=[int] -s", false, "-size=[font size>0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -b", false, "-family=[family name] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-style=[string] -b", false, "-style=[Regular/Oblique/Italic] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-size=[int] -b", false, "-size=[font size>0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -style=[string]", false, "-family=[family name]"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -style=[string] -s", false, "-family=[family name] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -style=[string] -b", false, "-family=[family name] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -size=[int]", false, "-family=[family name] -size=[font size>0]"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -size=[int] -s", false, "-family=[family name] -size=[font size>0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -size=[int] -b", false, "-family=[family name] -size=[font size>0] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-size=[int] -style=[string]", false, "-size=[font size>0] -style=[Regular/Oblique/Italic]"));
     TABLE.Add(new CommandArgumentEntry("-size=[int] -style=[string] -s", false, "-size=[font size>0] -style=[Regular/Oblique/Italic] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-size=[int] -style=[string] -b", false, "-size=[font size>0] -style=[Regular/Oblique/Italic] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -style=[string] -size=[int]", false, "-family=[family name] -style=[Regular/Oblique/Italic] -size=[font size>0]"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -style=[string] -size=[int] -s", false, "-family=[family name] -style=[Regular/Oblique/Italic] -size=[font size>0] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-family=[string] -style=[string] -size=[int] -b", false, "-family=[family name] -style=[Regular/Oblique/Italic] -size=[font size>0] -b(save to running and startup)"));
     CMD_SYSFONT = new Command("SYSFONT", TABLE, false, "Sets system font properties.", ExecutionLevel.User, CLIMode.Default);
     CMD_SYSFONT.SetFunction(() =>
     {
         if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
         {
             if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-family"))
             {
                 EnvironmentVariables.ChangeDefaultValue("FONT_FAMILY", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-family").Value);
             }
             if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-style"))
             {
                 EnvironmentVariables.ChangeDefaultValue("FONT_STYLE", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-style").Value);
             }
             if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-size"))
             {
                 EnvironmentVariables.ChangeDefaultValue("FONT_SIZE", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-size").Value);
             }
         }
         else if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
         {
             if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-family"))
             {
                 EnvironmentVariables.ChangeDefaultValue("FONT_FAMILY", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-family").Value);
                 EnvironmentVariables.ChangeCurrentValue("FONT_FAMILY", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-family").Value);
             }
             if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-style"))
             {
                 EnvironmentVariables.ChangeDefaultValue("FONT_STYLE", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-style").Value);
                 EnvironmentVariables.ChangeCurrentValue("FONT_STYLE", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-style").Value);
             }
             if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-size"))
             {
                 EnvironmentVariables.ChangeDefaultValue("FONT_SIZE", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-size").Value);
                 EnvironmentVariables.ChangeCurrentValue("FONT_SIZE", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-size").Value);
             }
         }
         else
         {
             if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-family"))
             {
                 EnvironmentVariables.ChangeCurrentValue("FONT_FAMILY", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-family").Value);
             }
             if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-style"))
             {
                 EnvironmentVariables.ChangeCurrentValue("FONT_STYLE", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-style").Value);
             }
             if (CMD_SYSFONT.InputArgumentEntry.Arguments.Exists(x => x.Call == "-size"))
             {
                 EnvironmentVariables.ChangeCurrentValue("FONT_SIZE", CMD_SYSFONT.InputArgumentEntry.Arguments.Find(x => x.Call == "-size").Value);
             }
         }
         return("");
     });
     return(CMD_SYSFONT);
 }
Example #23
0
 public Command GetCommand()
 {
     TABLE.Add(new CommandArgumentEntry("-brad=[double]", false, "-brad=[blur radius]"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -s", false, "-brad=[blur radius] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -b", false, "-brad=[blur radius] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -depth=[double]", false, "-brad=[blur radius] -depth=[shadow depth]"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -depth=[double] -s", false, "-brad=[blur radius] -depth=[shadow depth] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -depth=[double] -b", false, "-brad=[blur radius] -depth=[shadow depth] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -depth=[double] -color=[string]", false, "-brad=[blur radius] -depth=[shadow depth] -color=[color name/ARGB]"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -depth=[double] -color=[string] -s", false, "-brad=[blur radius] -depth=[shadow depth] -color=[color name/ARGB] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -depth=[double] -color=[string] -b", false, "-brad=[blur radius] -depth=[shadow depth] -color=[color name/ARGB] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -color=[string]", false, "-brad=[blur radius]  -color=[color name/ARGB]"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -color=[string] -s", false, "-brad=[blur radius]  -color=[color name/ARGB] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-brad=[double] -color=[string] -b", false, "-brad=[blur radius]  -color=[color name/ARGB] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-depth=[double] -color=[string]", false, "-depth=[shadow depth] -color=[color name/ARGB]"));
     TABLE.Add(new CommandArgumentEntry("-depth=[double] -color=[string] -s", false, "-depth=[shadow depth] -color=[color name/ARGB] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-depth=[double] -color=[string] -b", false, "-depth=[shadow depth] -color=[color name/ARGB] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-depth=[double]", false, "-depth=[shadow depth] "));
     TABLE.Add(new CommandArgumentEntry("-depth=[double] -s", false, "-depth=[shadow depth] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-depth=[double] -b", false, "-depth=[shadow depth] -b(save to running and startup)"));
     TABLE.Add(new CommandArgumentEntry("-color=[string]", false, "-color=[color name/ARGB]"));
     TABLE.Add(new CommandArgumentEntry("-color=[string] -s", false, "-color=[color name/ARGB] -s(save to startup)"));
     TABLE.Add(new CommandArgumentEntry("-color=[string] -b", false, "-color=[color name/ARGB] -b(save to running and startup)"));
     CMD_CARET_SHADOW = new Command("CARET-SHADOW", TABLE, false, "Controls the custom caret shadow blur radius, depth and color.", ExecutionLevel.User, CLIMode.Default);
     CMD_CARET_SHADOW.SetFunction(() =>
     {
         if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-s"))
         {
             if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-brad"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_SHADOW_BLUR_RADIUS", (double)CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Find(x => x.Call == "-brad").Value);
             }
             if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-depth"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_SHADOW_DEPTH", (double)CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Find(x => x.Call == "-depth").Value);
             }
             if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-color"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_SHADOW_COLOR", CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Find(x => x.Call == "-color").Value);
             }
         }
         else if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-b"))
         {
             if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-brad"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_SHADOW_BLUR_RADIUS", (double)CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Find(x => x.Call == "-brad").Value);
                 EnvironmentVariables.SetToDefault("SYS_CARET_SHADOW_BLUR_RADIUS");
             }
             if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-depth"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_SHADOW_DEPTH", (double)CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Find(x => x.Call == "-depth").Value);
                 EnvironmentVariables.SetToDefault("SYS_CARET_SHADOW_DEPTH");
             }
             if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-color"))
             {
                 EnvironmentVariables.ChangeDefaultValue("SYS_CARET_SHADOW_COLOR", CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Find(x => x.Call == "-color").Value);
                 EnvironmentVariables.SetToDefault("SYS_CARET_SHADOW_COLOR");
             }
         }
         else
         {
             if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-brad"))
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_SHADOW_BLUR_RADIUS", (double)CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Find(x => x.Call == "-brad").Value);
             }
             if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-depth"))
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_SHADOW_DEPTH", (double)CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Find(x => x.Call == "-depth").Value);
             }
             if (CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Exists(x => x.Call == "-color"))
             {
                 EnvironmentVariables.ChangeCurrentValue("SYS_CARET_SHADOW_COLOR", CMD_CARET_SHADOW.InputArgumentEntry.Arguments.Find(x => x.Call == "-color").Value);
             }
         }
         return("");
     });
     return(CMD_CARET_SHADOW);
 }