예제 #1
0
 public ObjectDb.Object GetObject(string Path)
 {
     if (Path == this.Name || !Path.StartsWith(this.Name))
     {
         return((ObjectDb.Object)null);
     }
     Path = Path.Remove(0, this.Name.Length);
     string[] strArray = Path.Split(new string[1] {
         "\\"
     }, StringSplitOptions.RemoveEmptyEntries);
     if (strArray.Length == 1)
     {
         for (int index = 0; index < this.Objects.Count; ++index)
         {
             if (this.Objects[index].ToString() == strArray[0])
             {
                 return(this.Objects[index]);
             }
         }
     }
     for (int index = 0; index < this.Categories.Count; ++index)
     {
         ObjectDb.Object @object = this.Categories[index].GetObject(string.Join("\\", strArray));
         if (@object != null)
         {
             return(@object);
         }
     }
     return((ObjectDb.Object)null);
 }
예제 #2
0
 public ObjectDb.Object GetObject(ushort ObjectId)
 {
     for (int index = 0; index < this.Categories.Count; ++index)
     {
         ObjectDb.Object @object = this.Categories[index].GetObject(ObjectId);
         if (@object != null)
         {
             return(@object);
         }
     }
     return((ObjectDb.Object)null);
 }
예제 #3
0
 public ObjectDb.Object GetObject(string Path)
 {
     if (Path == "Root" || !Path.StartsWith("Root"))
     {
         return((ObjectDb.Object)null);
     }
     Path = Path.Remove(0, 4);
     string[] strArray = Path.Split(new string[1] {
         "\\"
     }, StringSplitOptions.RemoveEmptyEntries);
     for (int index = 0; index < this.Categories.Count; ++index)
     {
         ObjectDb.Object @object = this.Categories[index].GetObject(string.Join("\\", strArray));
         if (@object != null)
         {
             return(@object);
         }
     }
     return((ObjectDb.Object)null);
 }
예제 #4
0
 public override string ToString()
 {
     ObjectDb.Object @object = MKDS_Const.ObjectDatabase.GetObject(this.ObjectID);
     return(@object != null? @object.ToString() : BitConverter.ToString(BitConverter.GetBytes(this.ObjectID)).Replace("-", ""));
 }