private void DragFile() { var drag = DragAndDrop.objectReferences; if (drag.Length == 1) { DragAndDrop.AcceptDrag(); var ass = Assembly.Load("Assembly-CSharp"); System.Type type = ass.GetType(drag[0].name); if (type != null) { if (type.IsSubclassOf(typeof(FArpgMachine.FArgpBaseData))) { DragAndDrop.visualMode = DragAndDropVisualMode.Generic; if (Event.current.type == EventType.DragExited) { mCurSelectType = type; Clear(); mFArpgMachine = new FArpgMachine(); Repaint(); } } } else if (DragAndDrop.paths[0].IndexOf("." + ResConfig.ARPGEX) != -1) { DragAndDrop.visualMode = DragAndDropVisualMode.Generic; if (Event.current.type == EventType.DragExited) { LoadFile(DragAndDrop.paths[0]); Repaint(); } } } }
private void InitData() { Regions(); mFArpgMachine = new FArpgMachine(); }