Esempio n. 1
0
 public static DragAndDropAction getSelectedFileAction(String sSelectedFile)
 {
     var dActionData = new Dictionary<String, object>();
     dActionData.Add("Path", sSelectedFile);
     var dddaSourceCode = new DragAndDropAction(Action.SelectedFileAction, dActionData);
     return dddaSourceCode;
 }
Esempio n. 2
0
 public static DragAndDropAction getObjectDataAction(Object oObjectToSend)
 {
     var dActionData = new Dictionary<String, object>();
     dActionData.Add("Object", oObjectToSend);
     var dddaSourceCode = new DragAndDropAction(Action.ObjectData, dActionData);
     return dddaSourceCode;
 }
Esempio n. 3
0
 private void Awake()
 {
     _dragRedToYellow = new DragAndDropAction(
         takableInfo: new FullNamesInfo(new List <string> {
         "Red", "Purple",
     }, new List <string> {
         "Yellow", "Purple",
     }),
         dragCollidableInfo: new CollidersInfo(_grayColliders, _blackColliders),
         droppableInfo: new NamePartInfo("Yellow", "UncorrectDroppableColor"),
         OnTaken: collider => {
         Log.Msg("You took correct collider");
     },
         OnTakeFailed: collider => {
         Log.Msg("Uncorrect collider to take");
     },
         OnDragCollided: collider => {
         Log.Msg("While drag you collided with correct collider");
     },
         OnDragCollideFailed: collider => {
         Log.Msg("While drag you collided with uncorrect collider");
     },
         OnDropped: collider => {
         Log.Msg("Dropped to correct collider");
     },
         OnDropFailed: collider => {
         Log.Msg("Dropped to uncorrect collider");
     });
     AInputMain.SetAction(_dragRedToYellow);
 }
Esempio n. 4
0
 public static DragAndDropAction getSourceCodeAction(String sPathToSourceCodeFile)
 {
     var dActionData = new Dictionary<String, object>();
     dActionData.Add("Path", sPathToSourceCodeFile);
     dActionData.Add("Contents", Files.getFileContents(sPathToSourceCodeFile));
     var dddaSourceCode = new DragAndDropAction(Action.SourceCodeAction, dActionData);
     return dddaSourceCode;
 }
Esempio n. 5
0
        public static DragAndDropAction getObjectDataAction(Object oObjectToSend)
        {
            var dActionData = new Dictionary <String, object>();

            dActionData.Add("Object", oObjectToSend);
            var dddaSourceCode = new DragAndDropAction(Action.ObjectData, dActionData);

            return(dddaSourceCode);
        }
Esempio n. 6
0
        public static DragAndDropAction getSelectedFileAction(String sSelectedFile)
        {
            var dActionData = new Dictionary <String, object>();

            dActionData.Add("Path", sSelectedFile);
            var dddaSourceCode = new DragAndDropAction(Action.SelectedFileAction, dActionData);

            return(dddaSourceCode);
        }
Esempio n. 7
0
        public static DragAndDropAction getSourceCodeAction(String sPathToSourceCodeFile)
        {
            var dActionData = new Dictionary <String, object>();

            dActionData.Add("Path", sPathToSourceCodeFile);
            dActionData.Add("Contents", Files.getFileContents(sPathToSourceCodeFile));
            var dddaSourceCode = new DragAndDropAction(Action.SourceCodeAction, dActionData);

            return(dddaSourceCode);
        }
 public void Cancel()
 {
     Answer = DragAndDropAction.Cancel;
     TryClose();
 }
 public void After()
 {
     Answer = DragAndDropAction.After;
     TryClose();
 }
 public void Inside()
 {
     Answer = DragAndDropAction.Inside;
     TryClose();
 }
 public void Before()
 {
     Answer = DragAndDropAction.Before;
     TryClose();
 }
 public void Init(string account1, string account2)
 {
     Account1 = account1;
     Account2 = account2;
     Answer   = DragAndDropAction.Cancel;
 }