private void AddOptionArg(string key, string switchName, string value)
        {
            var option = new OptionArg {
                name = $"-{(switchName ?? $"-{key}")}", value = value
            };

            AddOptionArg(key, option);
        }
Esempio n. 2
0
 void selector_SelectedEvent(object sender, OptionArg e)
 {
     AnimationEngine.Resume();
     this.lasso.ClearLassco();
     if (this.strokesWillDoAnimation != null)
     {
         this.SwithAnimation(e.Option);
     }
 }
Esempio n. 3
0
 public OptionDesc(string optLong, string optShort, OptionArg arg)
 {
   LongName = optLong;
   ShortName = optShort ?? optLong;
   Argument = arg;
   switch (Argument) {
   case OptionArg.None:
     Regex = new System.Text.RegularExpressions.Regex($"^(?:{ShortName}|{LongName})$");
     break;
   case OptionArg.Optional:
   case OptionArg.Required:
     Regex = new System.Text.RegularExpressions.Regex($"^(?:{ShortName}|{LongName})(?:=(.*))?$");
     break;
   }
 }
Esempio n. 4
0
 public void Add(string optLong, string optShort, OptionArg argc)
 {
   options.Add(new OptionDesc(optLong, optShort, argc));
 }
 private void AddOptionArg(string key, OptionArg option)
 {
     optionKeys.Add(key);
     optionArgs.Add(option);
 }