Beispiel #1
0
 /// <summary>
 /// Returns a ChaFileCoordinate instance from the selected coordinate in CharaMaker.
 /// </summary>
 public static ChaFileCoordinate GetSelectedCoordinate()
 {
     ChaCustom.CustomCoordinateFile    clothesFile = Singleton <ChaCustom.CustomCoordinateFile> .Instance;
     ChaCustom.CustomFileListCtrl      listCtrl    = Traverse.Create(clothesFile).Field("listCtrl").GetValue <ChaCustom.CustomFileListCtrl>();
     ChaCustom.CustomFileInfoComponent selected    = listCtrl.GetSelectTopItem();
     if (selected != null)
     {
         string            fullPath = selected.info.FullPath;
         ChaFileCoordinate tmp      = new ChaFileCoordinate();
         tmp.LoadFile(fullPath);
         return(tmp);
     }
     else
     {
         return(null);
     }
 }