Esempio n. 1
0
 private static object parseArgs(string[] args)
 {
     if (args[0] == "--charstats")
     {
         if (args.Length != 5)
         {
             return(null);
         }
         OptCharStats opt = new OptCharStats(args[1], args[2], args[3], args[4]);
         return(opt);
     }
     if (args[0] == "--strokes")
     {
         if (args.Length != 4)
         {
             return(null);
         }
         OptStrokes opt = new OptStrokes(args[1], args[2], args[3]);
         return(opt);
     }
     if (args[0] == "--pinyin")
     {
         if (args.Length != 3)
         {
             return(null);
         }
         OptPinyinSyllables opt = new OptPinyinSyllables(args[1], args[2]);
         return(opt);
     }
     if (args[0] == "--fontscope")
     {
         if (args.Length != 8)
         {
             return(null);
         }
         OptFontScope opt = new OptFontScope(args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
         return(opt);
     }
     return(null);
 }
Esempio n. 2
0
 public WrkFontScope(OptFontScope opt)
 {
     this.opt = opt;
 }