public DisplayLevel(string input)
        {
            switch (input)
            {
            case "EventSeries":
                lvl = ExpandLevel.EventSeries;
                break;

            case "Event":
                lvl = ExpandLevel.Event;
                break;

            case "Specimen":
                lvl = ExpandLevel.Specimen;
                break;

            case "IdentificationUnit":
                lvl = ExpandLevel.IdentificationUnit;
                break;

            default:
                lvl = ExpandLevel.Specimen;
                break;
            }
        }
 private static long ToInt64(string value, ExpandLevel ExpandBy)
 {
     value = validate(value, ExpandBy);
     long returnvalue = 0;
     for (int i = 0; i < value.Length; i++)
         returnvalue += (long)Math.Pow((long)ExpandBy,
                        (value.Length - (i + 1))) * CharToVal(value[i]);
     return returnvalue;
 }
        public TreeViewOperations(ExpandLevel lvl, Connector con)
        {
            if (con == null)
                throw new TreeViewOperationsException("No connector defined!");
            else
                this.con = con;

            if (lvl != null)
                this.expandLvl = lvl;
            else
                this.expandLvl = ExpandLevel.Event;
        }
 public DisplayLevel(string input)
 {
     switch (input)
     {
         case "EventSeries":
             lvl = ExpandLevel.EventSeries;
             break;
         case "Event":
             lvl = ExpandLevel.Event;
             break;
         case "Specimen":
             lvl = ExpandLevel.Specimen;
             break;
         case "IdentificationUnit":
             lvl = ExpandLevel.IdentificationUnit;
             break;
         default:
             lvl = ExpandLevel.Specimen;
             break;
     }
 }
 private static string validate(string input, ExpandLevel ExpandBy)
 {
     string validchars = "";
     string rtnval = "";
     for (long c = 0; c < (long)ExpandBy; c++)
         validchars += ValToChar(c);
     foreach (char i in input)
         if (validchars.Contains(i.ToString()))
             rtnval += i;
     return rtnval;
 }
 private static string ToHex(long value, ExpandLevel ExpandBy)
 {
     return loopRemainder(value, (long)ExpandBy);
 }