Пример #1
0
 /// <summary>
 /// Delete the configuration for the specified command
 /// </summary>
 /// <param name="command">string with command</param>
 public void Delete(string command)
 {
     if (string.IsNullOrEmpty(command))
     {
         return;
     }
     Commands.Remove(command);
     Commandline.Remove(command);
     Argument.Remove(command);
     RunInbackground.Remove(command);
     if (MsPaint.Equals(command) || PaintDotNet.Equals(command))
     {
         if (!DeletedBuildInCommands.Contains(command))
         {
             DeletedBuildInCommands.Add(command);
         }
     }
 }
Пример #2
0
        public override void AfterLoad()
        {
            base.AfterLoad();

            // Check if we need to add MsPaint
            if (HasPaint && !Commands.Contains(MsPaint) && !DeletedBuildInCommands.Contains(MsPaint))
            {
                Commands.Add(MsPaint);
                Commandline.Add(MsPaint, PaintPath);
                Argument.Add(MsPaint, "\"{0}\"");
                RunInbackground.Add(MsPaint, true);
            }

            // Check if we need to add Paint.NET
            if (HasPaintDotNet && !Commands.Contains(PaintDotNet) && !DeletedBuildInCommands.Contains(PaintDotNet))
            {
                Commands.Add(PaintDotNet);
                Commandline.Add(PaintDotNet, PaintDotNetPath);
                Argument.Add(PaintDotNet, "\"{0}\"");
                RunInbackground.Add(PaintDotNet, true);
            }
        }