Пример #1
0
        public SystemAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.SystemAction)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.TargetVar); //1
        }
Пример #2
0
        void LogOut_Action(string message, ActionType type)
        {
           // this.SetViewText(type.ToString()+":"+message);

            if (type == ActionType.ServerConn)
            {
                this.SetViewText(type.ToString() + ":" + message);
            }
            else if (type == ActionType.ServerNotConn)
            {
                this.SetViewText(type.ToString() + ":" + message);
            }
            else if (type == ActionType.ServerDiscon)
            {
                this.SetViewText(type.ToString() + ":" + message);
            }

        }
Пример #3
0
 public PingAction(ActionType type, ActionData actionData)
     : base(Enums.ActionTypeId.Ping)
 {
     _actionData = actionData;
     _type = type;
     Details.Add(type.ToString());
     Details.Add(_actionData.Host); //1
     Details.Add(_actionData.Loops); //2
     Details.Add(_actionData.TargetVar); //3
 }
Пример #4
0
        public LabelAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.Lable)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.LableName);
            Details.Add(_actionData.Loops);
        }
Пример #5
0
        public MessageAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.MessageBox)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.Message); //1
            Details.Add(_actionData.TimeOut); //2
        }
Пример #6
0
        public SwitchAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.SwitchAction)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.Switch); //1
            Details.Add(_actionData.CaseList); //2
            Details.Add(_actionData.DefaultScript); //2
        }
Пример #7
0
        public EnvironmentVariable(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.DateTime)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.SourceVar); //1
            Details.Add(_actionData.Value); //2
            Details.Add(_actionData.Type); //3
        }
Пример #8
0
        public AutoItUiAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.GuiAutomation)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.WindowTitle); //1
            Details.Add(_actionData.ControlID); //2
            Details.Add(_actionData.Text); //3
            Details.Add(_actionData.TargetVariable); //4
        }
Пример #9
0
        public SqliteAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.Sqlite)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.DbName); //1
            Details.Add(_actionData.Options); //2
            Details.Add(_actionData.Query); //2
            Details.Add(_actionData.TargetVar); //3
        }
Пример #10
0
        public EmailAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.EmailAction)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.Recipient);
            Details.Add(_actionData.From);
            Details.Add(_actionData.Subject);
            Details.Add(_actionData.Body);
            Details.Add(_actionData.MailServer);
        }
Пример #11
0
        /// <summary>
        /// Try to find icon in Dictionary, that attached to the action. If find return it. 
        /// Else try to find icon in Gear working directory -> /Icons/, if find add it to Dictionary and return it. 
        /// Else return null. 
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static Image GetStandardIcon(ActionType type)
        {
            if (standardIcons.ContainsKey(type))
                return standardIcons[type];

            Assembly thisExe = Assembly.GetExecutingAssembly();
            Stream file = thisExe.GetManifestResourceStream(
                string.Format("TopTeam.Gear.Icons.{0}.ico", type.ToString()));
            Image image = null;
            if (file != null)
                image = Image.FromStream(file);

            standardIcons.Add(type, image);
            return image;
        }
Пример #12
0
        public List<Action> Actions(string boardId,  ActionType? action, ActionType[] actions)
        {
            var request = new RestRequest("/1/boards/{board_id}", Method.GET);
            request.AddUrlSegment("board_id", boardId);
            
            if(actions!=null)
                request.AddParameter("actions", string.Join(",", actions.ToList().Select(x => x.ToString().LowerFirst())));

            if(action.HasValue)
                request.AddParameter("actions", action.ToString().LowerFirst());


            if(!action.HasValue && actions==null)
                request.AddParameter("actions", "all");

            var board = ServiceManager.Execute<Board>(request);
            var response = board.Actions;
            return response;
        }
Пример #13
0
        public DictionaryAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.DictionaryAction)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.Name); //1
            Details.Add(_actionData.Key); //1
            Details.Add(_actionData.Value); //2
            Details.Add(_actionData.Target); //3
            Details.Add(_actionData.FileName); //4
        }
Пример #14
0
        private void SetInitialValues(string message, ActionType actionType, 
				MemeType? memeType = null)
        {
            if (memeType.Equals(MemeType.FuckYea)) {
                this.title = actionType.ToString() + " action was successful.";
            } else {
                this.title = actionType.ToString() + " action caused an error.";
            }
            this.type = actionType;
            this.image = memeType;
        }
Пример #15
0
 private String GetActionTypeString(ActionType actionType)
 {
     return actionType.ToString().ToLower();
 }
Пример #16
0
    public void PlayAction(ActionType type)
    {
        var animName = "";
        switch (type)
        {
            case ActionType.Right:
                animName = "ShamanRight";
                break;
            case ActionType.Left:
                animName = "ShamanRight";
                break;
            case ActionType.Jump:
                animName = "ShamanJump";
                break;
            case ActionType.Stump:
                animName = "ShamanStump";
                break;
            case ActionType.Music:
                animName = "ShamanMusic";
                break;
            case ActionType.Clap:
                animName = "ShamanClap";
                break;
            case ActionType.Magic:
                animName = "ShamanMagic";
                break;
            default:
                Debug.Log("[Error]: Wrong ActionType: " + type.ToString());
                break;
        }

        if (!_isPlaying)
        {
            Anim.Play(animName);
            _isPlaying = true;
        }
        else
        {
            stackMoves.Add(animName);
        }



    }
        /// <param name="actionUrl">URL of the download or outlink</param> 
        /// <param name="actionType">Type of the action: 'download' or 'link'</param> 
        /// <returns>URL to piwik.php with all parameters set to track an action</returns>
        public string getUrlTrackAction(string actionUrl, ActionType actionType)
        {
            string url = getRequest( idSite );

            url += "&" + actionType.ToString() + "=" + urlEncode(actionUrl) + "&redirect=0";

            return url;
        }
Пример #18
0
        public static EA.Method CreateXisAction(EA.Repository repository, EA.Element parent, string name, ActionType type, string navigation = null)
        {
            EA.Method action = null;

            switch (type)
            {
                case ActionType.OK:
                case ActionType.Cancel:
                case ActionType.Create:
                case ActionType.Read:
                case ActionType.Update:
                case ActionType.Delete:
                case ActionType.DeleteAll:
                case ActionType.WebService:
                case ActionType.Navigate:
                case ActionType.Custom:
                    action = parent.Methods.AddNew(name, "");
                    break;
            }

            action.Stereotype = "XIS-Mobile::XisAction";
            action.StereotypeEx = "XIS-Mobile::XisAction";
            action.Update();
            action.TaggedValues.Refresh();

            if (action.TaggedValues.Count == 0)
            {
                EA.MethodTag typeTv = action.TaggedValues.AddNew("type", "XIS-Mobile::ActionType");
                typeTv.Value = type.ToString();
                typeTv.Update();
                EA.MethodTag navigationTv = action.TaggedValues.AddNew("navigation", "String");
                navigationTv.Value = navigation;
                navigationTv.Update();
            }
            parent.Methods.Refresh();

            return action;
        }
Пример #19
0
        public RemoteServerAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.ServerComAction)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.Host); //1
            Details.Add(_actionData.Port); //2
            Details.Add(_actionData.Value); //3
            Details.Add(_actionData.TargetVar);//4
        }
Пример #20
0
 private bool TryToIssueCommand(ActionType action, GameObject clickObject, Vector3 clickPoint, bool shift)
 {
     Debug.Log("Trying to Issue " + action.ToString());
     bool successful = false;
     switch (action){
     case ActionType.Attack:
         WorldObject worldobject = clickObject.transform.parent.GetComponent<WorldObject> ();//is it a world object?
         if (worldobject != null) {
             if (worldobject.player != this.player) {//add some nuance to this when we flesh out player relations
                 currentSelection.AddMultiCommandToQueue (new MultiAttackCommand (worldobject), !shift);
                 successful = true;
             }
         }
         break;
     case ActionType.Move:
         if (clickObject.name == "OrderPlane" && clickPoint != Constants.InvalidPosition) { // if you've hit the order plane, you move
             float x = clickPoint.x;
             float y = clickPoint.y;
             float z = clickPoint.z;
             currentSelection.AddMultiCommandToQueue (new MultiMoveCommand (new Vector3 (x, y, z)), !shift); //queue up the command
             successful = true;
         }
         break;
     case ActionType.Harvest:
         Resource resource = clickObject.transform.parent.GetComponent< Resource > (); //does it have a resource script?
         if (resource != null) {
             if (!resource.isEmpty ()) {
                 currentSelection.AddMultiCommandToQueue (new MultiHarvestCommand (resource), !shift); //queue up the command
                 successful = true;
             }
         }
         break;
     default:
         Debug.Log ("Unrecognizable command passed to TryToIssueCommand()");
         break;
     }
     if (successful) {
         Debug.Log("Command Successful");
         string rawMessage = CommandBanter.GetRandomBanter (action);
         battleMessaging.DisplayMessage (rawMessage, currentSelection.leader.fullName, currentSelection.leader.color);
     } else {
         Debug.Log("Command Failed");
     }
     return successful;
 }
        public Horison80PowerSupplyAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.Horison80PowerSupplyAction)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.Host); //1
            Details.Add(_actionData.Port); //2
            Details.Add(_actionData.TargetVar); //3
            Details.Add(_actionData.Parm1);//4
        }
Пример #22
0
 public static string ActionTypeToString(ActionType type)
 {
     return type.ToString().ToLower();
 }
Пример #23
0
        public TableAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.Table)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.TableName); //1
            Details.Add(_actionData.Value); //2
            Details.Add(_actionData.Row); //3
            Details.Add(_actionData.Column); //4
            Details.Add(_actionData.FileName); //5
            Details.Add(_actionData.TargetVar); //6
        }
 private static NetAction.ActionType translate( ActionType actionType)
 {
     switch(actionType)
     {
         case ActionType.ACCEPTED: return NetAction.ActionType.ACCEPTED;
         case ActionType.NOTIFICATION: return NetAction.ActionType.NOTIFICATION;
         case ActionType.FAULT: return NetAction.ActionType.FAULT;
         case ActionType.PONG: return NetAction.ActionType.PONG;
     }
     throw new Exception("Unexpected ActionType while unmarshalling message " + actionType.ToString() );
 }
Пример #25
0
 protected string GetActionTypeString(ActionType actionType)
 {
     return actionType.ToString().ToLower();
 }
Пример #26
0
        public DateTimeAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.DateTime)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.SourceVar); //1
            Details.Add(_actionData.TimeFormat); //2
            Details.Add(_actionData.TargetVar); //3
            Details.Add(_actionData.Value); //4
        }
Пример #27
0
        public MotorControllerAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.MotorController)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.ComPort); //1
            Details.Add(_actionData.Value); //2
        }
Пример #28
0
 public static string FriendlyActionName(ActionType type)
 {
     switch (type)
       {
     case ActionType.Generic:
       return Resources.action_type_generic;
     case ActionType.CloseControllerApplication:
       return Resources.action_type_close_controller_application;
     case ActionType.StartApplication:
       return Resources.action_type_start_application;
     case ActionType.SendKey:
       return Resources.action_type_sendkey;
     default:
       return type.ToString();
       }
 }
Пример #29
0
        public WaynPumpAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.WaynSim)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.TargetVariable); //1
            Details.Add(_actionData.PumpId); //2
            Details.Add(_actionData.NzlId); //3
            Details.Add(_actionData.Data1); //4
            Details.Add(_actionData.Data2); //5
            Details.Add(_actionData.Data3); //6
        }
Пример #30
0
        public ScriptAction(ActionType type, ActionData actionData)
            : base(Enums.ActionTypeId.ScriptExecute)
        {
            _actionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_actionData.Name); //1
            Details.Add(_actionData.Params); //1
        }