public void UpdatePlayerAction(int playerId, ActionType?action, int amount) { var color = ConsoleColor.Green; switch (action) { case ActionType.Check: case ActionType.Blind: case ActionType.Call: color = ConsoleColor.Cyan; break; case ActionType.Raise: color = ConsoleColor.Yellow; break; case ActionType.Fold: color = ConsoleColor.Black; break; case ActionType.Show: break; case ActionType.Win: color = ConsoleColor.Blue; break; } var player = _players[playerId]; player.BetAction.Draw(action?.ToString(), color); var bet = ((IList) new[] { ActionType.Blind, ActionType.Call, ActionType.Raise, ActionType.Win }).Contains(action) ? amount.ToString() : string.Empty; player.BetAmount.Draw(bet); }
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); } }
public SystemAction(ActionType type, ActionData actionData) : base(Enums.ActionTypeId.SystemAction) { _actionData = actionData; _type = type; Details.Add(type.ToString()); Details.Add(_actionData.TargetVar); //1 }
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 }
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); }
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 }
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 }
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 }
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 }
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 }
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); }
/// <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; }
/// <summary> /// 获取阿里云响应 /// </summary> /// <param name="type">Action类型</param> /// <param name="parameters">请求参数</param> /// <returns>阿里云响应</returns> public static AliyunResponse GetResponse(ActionType type, Dictionary <string, string> parameters) { parameters.Add("Action", type.ToString()); string url = GeneralURL(parameters); string html = Utils.GetUrlHtmlContentBySocket(url, AliyunRequest.Http_Method); AliyunHtmlResponse resp = GetHtmlResponse(html, AliyunRequest.Format); if (resp.StatusCode == HttpStatusCode.OK) { AliyunResponse iresp = _analyzeResponse(type, AliyunRequest.Format, resp.Content); return(iresp); } else { return(resp.ErrorMessage); } }
private string GetJsAction(ActionType type) { switch (type) { case ActionType.OpenAction: return("openLink"); case ActionType.CloseAction: return("closeWindow"); case ActionType.ShowHideAction: return("widget"); default: return(type.ToString().ToLower()); } }
/// <summary> /// 记录用户操作日志 /// </summary> /// <param name="projectId"></param> /// <param name="projectName"></param> /// <param name="clientPath"></param> /// <param name="action"></param> public static void ActionLog(int projectId, string projectName, string clientPath, ActionType action) { BLL.UserLogBll logBll = new UserLogBll(); Model.UserLogModel logModel = new UserLogModel(); logModel.AddTime = DateTime.Now; logModel.UserID = UserInfo.ID; logModel.UserName = UserInfo.UserName; logModel.UserRealName = UserInfo.RealName; logModel.Ip = GetIP(); logModel.ProjectID = projectId; logModel.ProjectName = projectName; logModel.ClientPath = clientPath; logModel.ActionType = action.ToString(); logModel.ActionName = GetActionName(action); logBll.Add(logModel); }
private void _Refresh() { if (_isHeader) { _txt.gameObject.SetActive(true); _txt.text = _type.ToString(); return; } _txt.gameObject.SetActive(false); if (_isActive) { _img.color = Color.white; } else { _img.color = Color.gray; } }
public object ExecuteFunction(string controlName, ActionType actionType, string frame, params object[] actionParams) { try { var control = _controlFinder.Value.Find(controlName, frame); var method = control.GetType().InstanceNonVoidMethod(actionType.ToString(), Type.GetTypeArray(actionParams)); return(method(control, actionParams)); } catch (NullReferenceException) { throw new ControlActionException($"Control '{controlName}' was not found or method '{actionType}' does not exist."); } catch (ArgumentException) { throw new ControlActionException($"Method '{actionType}' for control '{controlName}' is void return type."); } }
public void DoTrackAction_Test(string actionUrl, ActionType actionType) { //Arrange //Act var actual = _sut.DoTrackAction(actionUrl, actionType); //Assert var actualRequest = this._mockedPiwikServer.LogEntries.Last(); Assert.That(actual.HttpStatusCode, Is.EqualTo(HttpStatusCode.OK)); Assert.That(actualRequest.RequestMessage.Method, Is.EqualTo("GET")); Assert.PiwikRequestParameterMatch(actualRequest, new NameValueCollection { { "_idvc", "0" }, { "_id", _sut.GetVisitorId() }, { actionType.ToString(), actionUrl }, }); }
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; }
public void DoTrackAction_Test(string actionUrl, ActionType actionType) { //Arrange var retrieveRequest = CreateAllGetOkRequestBehavior(); //Act var actual = _sut.DoTrackAction(actionUrl, actionType); //Assert var actualRequest = retrieveRequest(); Assert.That(actual.HttpStatusCode, Is.EqualTo(HttpStatusCode.OK)); Assert.That(actualRequest.Method, Is.EqualTo("GET")); Assert.PiwikRequestParameterMatch(actualRequest, new NameValueCollection { { "_idvc", "0" }, { "_id", _sut.GetVisitorId() }, { actionType.ToString(), actionUrl }, }); }
public async void AddControl(ActionType action) { _popup.Popup_(); await ToSignal(_popup, "NewControl"); if (_popup.NewEvent == null) { return; } var inputEvent = _popup.NewEvent; var bind = inputEvent.ToInputBind(); Settings.ActionControls[action].Add(bind); InputMap.ActionAddEvent(action.ToString(), inputEvent); NewBind(action, bind); }
public ServedResult Render() { var ret = new ServedResult("li"); ret.contentList.Add(Master.renderMonLink(mon, action.ToString(), LinkRenderOptions.All ^ LinkRenderOptions.Portrait)); ret.contentList.Add(" " + string.Format(message, amount, maximum) + "<br/>"); manyMons.Sort(); if (action == ActionType.MonIn) { foreach (var m in manyMons) { ret.contentList.Add(ServeImageClass($"monsters/{m.monsterTypeId}.png", "mon-portrait")); } ret.contentList.Add(ServeImageClass($"loads/move_right.png", "action-arrow")); ret.contentList.Add(ServeImageClass($"loads/building_store_small.png", "storage")); } else if (action == ActionType.MonOut) { ret.contentList.Add(ServeImageClass($"loads/building_store_small.png", "storage")); ret.contentList.Add(ServeImageClass($"loads/move_right.png", "action-arrow")); foreach (var m in manyMons) { ret.contentList.Add(ServeImageClass($"monsters/{m.monsterTypeId}.png", "mon-portrait")); } } else if (action == ActionType.RuneIn) { foreach (var r in manyRunes) { ret.contentList.Add(RuneRenderer.renderRune(r, true)); } ret.contentList.Add(ServeImageClass($"loads/move_right.png", "action-arrow")); ret.contentList.Add(ServeImageClass($"monsters/{mon.monsterTypeId}.png", "mon-portrait")); } else if (action == ActionType.RuneOut) { return(new ServedResult("span")); } return(ret); }
public override void AskForAction(ActionType actionType, object callbackObject, InfoDescription error) { unityComputer.TurnTimeoutHandler.StartTurnTimer(this, actionType, callbackObject); LogManager.Log(unityComputer.transform.name + " : " + actionType.ToString("G")); staticCallBackObject = callbackObject; if (error == InfoDescription.NoError) { // NO ERROR TurnArrowController.SetActive(UIPlayer.GetRelativePlayerSeat(base.GetPlayersSeat())); awaitingAction = actionType; unityComputer.WaitForAction(); } else { // SHOW ERROR TurnArrowController.SetActive(UIPlayer.GetRelativePlayerSeat(GetPlayersSeat())); LogManager.Log(error.ToString()); } }
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()); } }
void Awake() { KeybindCount = System.Enum.GetNames(typeof(KeyAction)).Length; ActionTypeCount = System.Enum.GetNames(typeof(ActionType)).Length; // Create a header for each type of action (start i at 1 to skip default) for (int i = 1; i < ActionTypeCount; i++) { GameObject newKeybindHeading = Instantiate(KeybindHeadingTemplate) as GameObject; ActionType actionType = (ActionType)i; // Add the heading to the dictionary so it can be looked up later KeybindHeadingDict.Add(actionType, newKeybindHeading); // Set the text to be the name of the actionType newKeybindHeading.GetComponentInChildren <Text>().text = actionType.ToString() + " Controls"; // Give the object the same parent as the template (the scroll view content) newKeybindHeading.transform.SetParent(KeybindHeadingTemplate.transform.parent, false); newKeybindHeading.SetActive(true); } }
/// <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); }
private RectTransform MakeButton(ActionType actionType) { GameObject button = GameObject.Instantiate( buttonPrefab, gameObject.transform.position, Quaternion.identity, gameObject.transform ); RectTransform rectTransform = button.GetComponent <RectTransform>(); rectTransform.anchorMax = new Vector2(0f, 1f); rectTransform.anchorMin = new Vector2(0f, 1f); rectTransform.pivot = new Vector2(0f, 1f); TextMeshProUGUI text = button.GetComponentInChildren <TextMeshProUGUI>(); text.SetText(actionType.ToString()); return(rectTransform); }
/// <summary> /// Finds conflicts betwee two actions, and prints them to the log /// </summary> /// <param name="Other">Other action to compare to.</param> /// <returns>True if any conflicts were found, false otherwise.</returns> public bool CheckForConflicts(Action Other) { bool bResult = true; if (ActionType != Other.ActionType) { LogConflict("action type is different", ActionType.ToString(), Other.ActionType.ToString()); bResult = false; } if (!Enumerable.SequenceEqual(PrerequisiteItems, Other.PrerequisiteItems)) { LogConflict("prerequisites are different", String.Join(", ", PrerequisiteItems.Select(x => x.Location)), String.Join(", ", Other.PrerequisiteItems.Select(x => x.Location))); bResult = false; } if (!Enumerable.SequenceEqual(DeleteItems, Other.DeleteItems)) { LogConflict("deleted items are different", String.Join(", ", DeleteItems.Select(x => x.Location)), String.Join(", ", Other.DeleteItems.Select(x => x.Location))); bResult = false; } if (DependencyListFile != Other.DependencyListFile) { LogConflict("dependency list is different", (DependencyListFile == null)? "(none)" : DependencyListFile.AbsolutePath, (Other.DependencyListFile == null)? "(none)" : Other.DependencyListFile.AbsolutePath); bResult = false; } if (WorkingDirectory != Other.WorkingDirectory) { LogConflict("working directory is different", WorkingDirectory.FullName, Other.WorkingDirectory.FullName); bResult = false; } if (CommandPath != Other.CommandPath) { LogConflict("command path is different", CommandPath.FullName, Other.CommandPath.FullName); bResult = false; } if (CommandArguments != Other.CommandArguments) { LogConflict("command arguments are different", CommandArguments, Other.CommandArguments); bResult = false; } return(bResult); }
/** * @ 第2次方法重载 * @ url 远程服务器地址 * @ method 提交类型 * @ acceptEncoding 标头编码 * @ contentType 内容类型 * @ userAgent 浏览器代理 * @ automaticDecompression 数据压缩 * @ allowAutoRedirect 是否运行重定向 * @ keepAlive 是否保持连接 * @ cookieContainer cookie 容器 * */ public HttpWebRequest Create(string url, ActionType method, string accept, string acceptEncoding, string acceptLanguage, string contentType, string userAgent, DecompressionMethods automaticDecompression, bool allowAutoRedirect = true, bool keepAlive = true, CookieContainer cookieContainer = null) { HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Accept = accept; request.Headers["Accept-Encoding"] = acceptEncoding; request.Headers["Accept-Language"] = acceptLanguage; request.AutomaticDecompression = automaticDecompression; request.Method = method.ToString(); request.AllowAutoRedirect = allowautoredirect; request.KeepAlive = keepalive; request.ContentType = contentType; if (cookieContainer == null) { cookieContainer = new CookieContainer(); } request.CookieContainer = cookieContainer; request.UserAgent = userAgent; return(request); }
public void Act(ActionType actionType) { switch (actionType) { // Attack case ActionType.MainAttack: StartCoroutine(ActionRoutine(actionType.ToString())); break; case ActionType.Pick: StartCoroutine(ActionRoutine(actionType.ToString())); break; // Defensive Animation case ActionType.SubAttack: StartCoroutine(ActionRoutine(actionType.ToString())); break; case ActionType.Buff: StartCoroutine(BuffActionRoutine(actionType.ToString())); break; case ActionType.Hit: StartCoroutine(TargetActionRoutine(actionType.ToString())); break; case ActionType.CriticalHit: StartCoroutine(TargetActionRoutine(actionType.ToString())); break; case ActionType.Dodge: StartCoroutine(TargetActionRoutine(actionType.ToString())); break; // Do not move Position case ActionType.Buffed: StartCoroutine(BuffedActionRoutine()); break; default: break; } }
public WebSocketRequest(string publicId, ActionType action, string text = "", uint actionId = 0) { var inputData = new InputData { PublicId = publicId }; if (!string.IsNullOrEmpty(text) && action != ActionType.Continue && action != ActionType.Undo && action != ActionType.Redo && action != ActionType.Retry) { inputData.Text = text; } string query; // Alter is weird if (actionId != 0 && action == ActionType.Alter) { inputData.ActionId = actionId.ToString(); query = "mutation ($input: AlterInput) {\n editAction(input: $input) {\n time\n message\n __typename\n }\n}\n"; } else { inputData.Type = action.ToString().ToLowerInvariant(); inputData.ChoicesMode = false; query = "mutation ($input: ActionInput) {\n addAction(input: $input) {\n message\n time\n __typename\n }\n}\n"; } Payload = new WebSocketPayload { Variables = new PayloadVariables { Input = inputData }, Query = query }; }
public override string ToString() { if (animator == null || animator.runtimeAnimatorController == null) { return("[ERROR] MISSING ANIMATOR CONTROLLER REFERENCE"); } var res = ""; switch (action) { case ActionType.Enable: case ActionType.Disable: res += action.ToString() + " " + animator.name; break; case ActionType.SetParameter: switch (parameterType) { case AnimatorEventData.ParameterType.Boolean: res = "SetBool [" + parameterName + "] to " + "[" + booleanValue + "] on " + animator.name; break; case AnimatorEventData.ParameterType.Float: res = "SetFloat [" + parameterName + "] to " + "[" + floatValue + "] on " + animator.name; break; case AnimatorEventData.ParameterType.Integer: res = "SetInteger[" + parameterName + "] to " + "[" + integerValue + "] on " + animator.name; break; case AnimatorEventData.ParameterType.Trigger: res = "SetTrigger [" + parameterName + "] on " + animator.name; break; } break; } return(res); }
public static ScheduledRules ConvertToScheduledRuleEntityForAvailabilitySet <T>(T entity, string sessionId, ActionType action, string fiOperation, DateTime executionTime, bool domainFlage) where T : VirtualMachineCrawlerResponse { if (entity == null || !Mappings.FunctionNameMap.ContainsKey(VirtualMachineGroup.AvailabilitySets.ToString())) { return(null); } string combinationKey; if (domainFlage) { combinationKey = entity.AvailabilitySetId + Delimeters.Exclamatory + entity.FaultDomain?.ToString(); } else { combinationKey = entity.AvailabilitySetId + Delimeters.At + entity.UpdateDomain?.ToString(); } var localGUID = sessionId; // System.Guid.NewGuid().ToString(); var scheduleRule = new ScheduledRules(localGUID, entity.RowKey) //return new ScheduledRules(localGUID, entity.RowKey) { ResourceType = VirtualMachineGroup.AvailabilitySets.ToString(), ScheduledExecutionTime = executionTime, FiOperation = fiOperation, ResourceName = entity.ResourceName, CurrentAction = action.ToString(), TriggerData = GetTriggerData(entity, action, localGUID, entity.RowKey, VirtualMachineGroup.AvailabilitySets.ToString()), SchedulerSessionId = sessionId, CombinationKey = combinationKey, //Rolledback = false }; if (fiOperation.Equals(AzureFiOperation.PowerCycle.ToString())) { scheduleRule.Rolledback = false; } return(scheduleRule); }
private void btnAction_Click(object sender, EventArgs e) { try { switch (at) { case ActionType.Insert: if (!GetInfoFromPanelControls()) { return; } PgSql.InsertIntoValues("client", String.Format("DEFAULT, {0}, '{1}', '{2}', '{3}', '{4}', {5}, '{6}.{7}.{8}', ('{9}','{10}','{11}', {12}, {13}), '{14}', '{15}', '{16}', {17}, {18}, {19}, {20}, '{21}', '{22}', '{23}', '{24}', '{25}', {26}, '{27}', '{28}'", numClub.Value.ToString(), tbSur.Text, tbName.Text, tbPatr.Text, cbGender.Text, nation_id, numDay.Value.ToString(), numMonth.Value.ToString(), numYear.Value.ToString(), tbCountry.Text, tbCity.Text, tbStreet.Text, numHouse.Value.ToString(), numHouse2.Value.ToString(), tbEmail.Text, tbPhone.Text, tbPass.Text, numHeight.Value.ToString(), numWeight.Value.ToString(), eyecolor_id, haircolor_id, interests, cbTemperament.Text, pos_features, neg_features, cbMartialStatus.Text, numChild.Value.ToString(), cbProsperity.Text, cbPurposeofdating.Text)); break; case ActionType.Update: if (!GetInfoFromPanelControls()) { return; } PgSql.UpdateSet("client", "club_department_id, surname, name, patronymic, gender, nationality, date_of_birth, address, email, phone_number, passport_id, height, weight, eye_color, hair_color, interests, temperament, positive_features, negative_features, marital_status, amount_of_children, prosperity, purpose_of_dating", String.Format("({0}, '{1}', '{2}', '{3}', '{4}', {5}, '{6}.{7}.{8}', ('{9}','{10}','{11}', {12}, {13}), '{14}', '{15}', '{16}', {17}, {18}, {19}, {20}, '{21}', '{22}', '{23}', '{24}', '{25}', {26}, '{27}', '{28}') WHERE client.id = {29}", numClub.Value.ToString(), tbSur.Text, tbName.Text, tbPatr.Text, cbGender.Text, nation_id, numDay.Value.ToString(), numMonth.Value.ToString(), numYear.Value.ToString(), tbCountry.Text, tbCity.Text, tbStreet.Text, numHouse.Value.ToString(), numHouse2.Value.ToString(), tbEmail.Text, tbPhone.Text, tbPass.Text, numHeight.Value.ToString(), numWeight.Value.ToString(), eyecolor_id, haircolor_id, interests, cbTemperament.Text, pos_features, neg_features, cbMartialStatus.Text, numChild.Value.ToString(), cbProsperity.Text, cbPurposeofdating.Text, id)); break; } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } MessageBox.Show(String.Format("Success.", at.ToString())); this.Close(); }
int i = 1;//测试用 #endregion #region UI逻辑实现 /// <summary> /// 点击了技能按钮按钮 /// </summary> internal void OnAttackButtonClick(GameObject click, SkillType type, ActionType actionType, float rate) { if (type == SkillType.Basic && GlobalParametersManager.CurrentActionTYPE == ActionType.Basic)//当前为基础攻击 可以连击 { Debug.Log("连击" + i); i++; if (i > 3) { i = 1; } } else { if (GlobalParametersManager.CurrentActionTYPE != ActionType.Idle) { return; //当前状态为技能等待时可以释放技能 } if (GlobalParametersManager.CurrentActionFinshed == false) { return; } } Debug.Log(actionType.ToString() + "技能被点击已经被点击了"); Image mask = click.transform.GetChild(0).GetComponent <Image>(); Text txtCold = click.transform.GetChild(1).GetComponent <Text>(); mask.gameObject.SetActive(true); txtCold.gameObject.SetActive(true); Controller_PlayerAction.Instance.PlayAction(actionType);//播放攻击动画 if (type == SkillType.Basic) { StartCoroutine(SkillCold(txtCold, mask, rate, 10f)); } else { StartCoroutine(SkillCold(txtCold, mask, rate)); } }
private void btnAction_Click(object sender, EventArgs e) { try { switch (at) { case ActionType.Insert: PgSql.InsertIntoValues("Contract", String.Format("DEFAULT, {0}, {1}, {2}, {3}, '{4}', '{5}.{6}.{7}', {8}", numClientID.Value, (numFinalPartnerID.Value == -1) ? "NULL" : numFinalPartnerID.Value.ToString(), numEmployeeID.Value, numContractTerm.Value, cbState.Text, numDay.Value, numMonth.Value, numYear.Value, numSum.Value)); break; case ActionType.Update: PgSql.UpdateSet("contract", "client_id, final_partner_id, orginized_employee_id, contract_term, state, date_of_registration, price", String.Format("({0}, {1}, {2}, {3}, '{4}', '{5}.{6}.{7}', {8}) WHERE id = {9}", numClientID.Value, (numFinalPartnerID.Value == -1) ? "NULL" : numFinalPartnerID.Value.ToString(), numEmployeeID.Value, numContractTerm.Value, cbState.Text, numDay.Value, numMonth.Value, numYear.Value, numSum.Value, id)); break; } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } MessageBox.Show(String.Format("Success.", at.ToString())); this.Close(); }
public static ScheduledRules ConvertToScheduledRuleEntityForAvailabilityZone <T>(T entity, string sessionId, ActionType action, string fiOperation, DateTime executionTime) where T : VirtualMachineCrawlerResponse { if (!Mappings.FunctionNameMap.ContainsKey(VirtualMachineGroup.AvailabilityZones.ToString())) { return(null); } var localGUID = sessionId;// System.Guid.NewGuid().ToString(); return(new ScheduledRules(localGUID, entity.RowKey) { ResourceType = VirtualMachineGroup.AvailabilityZones.ToString(), ScheduledExecutionTime = executionTime, FiOperation = fiOperation, ResourceName = entity.ResourceName, CurrentAction = action.ToString(), TriggerData = GetTriggerData(entity, action, localGUID, entity.RowKey, VirtualMachineGroup.AvailabilityZones.ToString()), SchedulerSessionId = sessionId, CombinationKey = entity.RegionName + Delimeters.Exclamatory.ToString() + entity.AvailabilityZone, Rolledback = false }); }
private void btnAction_Click(object sender, EventArgs e) { try { switch (at) { case ActionType.Insert: PgSql.InsertIntoValues("dating_club_department", String.Format("DEFAULT, '{0}', ('{1}', '{2}', '{3}', {4}, {5}), {6}", tbName.Text, tbCountry.Text, tbCity.Text, tbStreet.Text, numHouse.Value.ToString(), numHouse2.Value.ToString(), numPayment.Value.ToString())); break; case ActionType.Update: PgSql.UpdateSet("dating_club_department", "name, address, rent_cost", String.Format("('{0}', ('{1}', '{2}', '{3}', {4}, {5}), {6}) WHERE dating_club_department.id = {7}", tbName.Text, tbCountry.Text, tbCity.Text, tbStreet.Text, numHouse.Value.ToString(), numHouse2.Value.ToString(), numPayment.Value.ToString(), id)); break; } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } MessageBox.Show(String.Format("Success.", at.ToString())); this.Close(); }
private void btnAction_Click(object sender, EventArgs e) { try { switch (at) { case ActionType.Insert: PgSql.InsertIntoValues("Pare", String.Format("{0}, {1}", numClientID.Value, numClient2Id.Value)); break; case ActionType.Update: PgSql.UpdateSet("Pare", "client1_id, client2_id", String.Format("({0}, {1}) WHERE client1_id = {2} AND client2_id = {3}", numClientID.Value, numClient2Id.Value, id1, id2)); break; } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } MessageBox.Show(String.Format("Success.", at.ToString())); this.Close(); }
internal virtual void Bind(V1Interop.ITask iTask) { if (Id != null) { iTask.SetDataItem("ActionId", Id); } IBindAsExecAction bindable = this as IBindAsExecAction; if (bindable != null) { iTask.SetDataItem("ActionType", InternalActionType.ToString()); } object o = null; unboundValues.TryGetValue("Path", out o); iTask.SetApplicationName(bindable != null ? ExecAction.PowerShellPath : o?.ToString() ?? string.Empty); o = null; unboundValues.TryGetValue("Arguments", out o); iTask.SetParameters(bindable != null ? ExecAction.BuildPowerShellCmd(ActionType.ToString(), GetPowerShellCommand()) : o?.ToString() ?? string.Empty); o = null; unboundValues.TryGetValue("WorkingDirectory", out o); iTask.SetWorkingDirectory(o?.ToString() ?? string.Empty); }
private void WriteAction(XmlWriter writer) { writer.WriteStartElement("action"); writer.WriteAttributeString("type", ActionType.ToString()); if (ActionType != ActionType.None) { if (ActionType == ActionType.Redirect) { writer.WriteAttributeString("redirectType", ActionRedirectType.ToString()); } if (!string.IsNullOrEmpty(ActionUrl)) { writer.WriteAttributeString("url", ActionUrl); } if (ActionAppendQueryStringSet) { writer.WriteAttributeString("appendQueryString", ActionAppendQueryString ? "true" : "false"); } if (StatusCode != 0L) { writer.WriteAttributeString("statusCode", StatusCode.ToString(CultureInfo.InvariantCulture)); } if (SubStatusCode != 0L) { writer.WriteAttributeString("subStatusCode", SubStatusCode.ToString(CultureInfo.InvariantCulture)); } if (StatusReason != null) { writer.WriteAttributeString("statusReason", StatusReason); } if (StatusDescription != null) { writer.WriteAttributeString("statusDescription", StatusDescription); } } writer.WriteEndElement(); }
/// <summary> /// 正式环境发送数据 /// </summary> public static void Send(string securityURL, string targetUrl, string userCode, string userPwd, string toCode, string dataStr, ActionType actionType) { try { exchangeTransport = new ExchangeTransport(userCode, userPwd, "ECE91161D6670E60E040A8C0970C6ACD"); exchangeTransport.AuthServiceUrl = securityURL; exchangeTransport.ServiceUrl = targetUrl; exchangeTransport.Authenticate(); if (!exchangeTransport.IsAuthValid) { throw new Exception("认证失败[" + userCode + "]"); } string strEventID = exchangeTransport.GetEventId(); //调用函数即可,事件ID会自动生成 string strBaseEncodedData = exchangeTransport.Base64Encode(dataStr); strBaseEncodedData = exchangeTransport.Base64Encode(strBaseEncodedData); string strResult = exchangeTransport.Send(toCode, strEventID, actionType.ToString(), strBaseEncodedData); XmlDocument xml = new XmlDocument(); xml.LoadXml(strResult); XmlNodeList nodes = xml.GetElementsByTagName("ns3:SendResult"); if (nodes.Count > 0) { string Result = nodes[0].InnerText; if (Result == "false") { throw new Exception(strResult); } } else { throw new Exception(strResult); } } catch (Exception ex) { throw new Exception("接收者编号:[" + toCode + "] 发送出错[" + ex.Message + "]"); } }
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; }
protected string GetActionTypeString(ActionType actionType) { return actionType.ToString().ToLower(); }
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 }
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 }
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 }
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 }
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 }
public static string ActionTypeToString(ActionType type) { return type.ToString().ToLower(); }
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() ); }
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; }
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 }
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(); } }
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 }
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); } }
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 }
private String GetActionTypeString(ActionType actionType) { return actionType.ToString().ToLower(); }
/// <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; }
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; }