private void CommonInsertUpdate() { Page.Validate(); if (!Page.IsValid) { ClientAction.ShowMsgBack("정확히 입력하세요."); //Response.Write( Util.GetErrorValidators(this.Validators) ); } _ssb.sLoginPW = HTML.ReplaceToDB(sLoginPW.Text); _ssb.position = Convert.ToInt16(Cookie.Self["position"]);// Convert.ToInt16(position.SelectedItem.Value); _ssb.staffNbr = HTML.ReplaceToDB(staffNbr.Text); _ssb.sName = HTML.ReplaceToDB(sName.Text); _ssb.DeptName = DeptName.SelectedValue; _ssb.sClass = sClass.SelectedItem.Text; _ssb.subJobs = HTML.ReplaceToDB(subJobs.Text); _ssb.phone = HTML.ReplaceToDB(phone1.Text) + "-" + HTML.ReplaceToDB(phone2.Text) + "-" + HTML.ReplaceToDB(phone3.Text); _ssb.cellularP = HTML.ReplaceToDB(cellularP1.Text) + "-" + HTML.ReplaceToDB(cellularP2.Text) + "-" + HTML.ReplaceToDB(cellularP3.Text); _ssb.ExtNbr = HTML.ReplaceToDB(ExtNbr.Text); _ssb.sEmail = HTML.ReplaceToDB(sEmail.Text); _ssb.SSN = HTML.ReplaceToDB(SSN1.Text) + "-" + HTML.ReplaceToDB(SSN2.Text); _ssb.zipcode = HTML.ReplaceToDB(zipcode.Text); if (_ssb.zipcode != "") { _ssb.address = HTML.ReplaceToDB(address1.Text) + "|" + HTML.ReplaceToDB(address2.Text); } _ssb.homepage = HTML.ReplaceToDB(homepage.Text); _ssb.mark = HTML.ReplaceToDB(mark.Text); if (sLevel.Visible && sLevel.Text != "") { _ssb.sLevel = Convert.ToInt16(sLevel.Text); } else { _ssb.sLevel = Convert.ToInt16(sClass.SelectedValue); } _ssb.IPaddress = HttpContext.Current.Request.UserHostAddress.ToString(); _ssb.joinDT = Request[this.joinDT.UniqueID]; //joinDT.Text; ReadOnly속성때문 _ssb.SLBirth = rblSLBirth.SelectedValue; if (_ssb.SLBirth != "") { _ssb.BirthDay = Request[this.tbBirthDay.UniqueID]; // tbBirthDay.Text;ReadOnly속성때문 } else { _ssb.BirthDay = ""; } _ssb.Married = rblMarried.SelectedValue; if (_ssb.Married != "") { _ssb.WeddingDay = Request[this.tbWeddingDay.UniqueID]; // tbWeddingDay.Text;ReadOnly속성때문 } else { _ssb.WeddingDay = ""; } //Response.Write("BirthDay----> " + _ssb.BirthDay); }
private void HandleServerAction(ClientAction action) { switch (action.Type) { case "server/init": InitServer(action.PayloadTo <ServerInitPayload>()); break; } }
public Engine1() { var myObject = new MyObject { SomeProperty = null }; ClientAction.OpenForm(myObject); }
Core.ServiceResponse ICentralConnectService.RegisterClient(CentralConnectServiceRequest centralConnectServiceRequest) { if (centralConnectServiceRequest.RegisterClientMessage == null) { return(new Core.ServiceResponse() { Code = 400, Message = "RegisterClientMessage should not null" }); } if (string.IsNullOrEmpty(centralConnectServiceRequest.RegisterClientMessage.Environment) || string.IsNullOrEmpty(centralConnectServiceRequest.RegisterClientMessage.ClientName) || string.IsNullOrEmpty(centralConnectServiceRequest.RegisterClientMessage.Domain) || string.IsNullOrEmpty(centralConnectServiceRequest.RegisterClientMessage.CreateBy)) { return(new Core.ServiceResponse() { Code = 400, Message = "Environment ClientName Domain CreateBy should not null" }); } if (string.IsNullOrEmpty(centralConnectServiceRequest.Id) || string.IsNullOrEmpty(centralConnectServiceRequest.Token) || string.IsNullOrEmpty(centralConnectServiceRequest.Type)) { return(new Core.ServiceResponse() { Code = 400, Message = "Id Type and Token should not null" }); } string message = string.Empty; if (HP.TS.Devops.Security.SecurityCode.Success != HP.TS.Devops.Security.SecurityAction.CheckAccess(this.ConnectString, centralConnectServiceRequest, out message)) { return(new Core.ServiceResponse() { Code = 403, Message = centralConnectServiceRequest.Id + " of type " + centralConnectServiceRequest.Type + " have no access of " + message }); } ClientAction clientAction = new ClientAction(this.ConnectString); CentralConnectCode centralConnectCode = clientAction.RegisterClient(centralConnectServiceRequest.RegisterClientMessage.Environment, centralConnectServiceRequest.RegisterClientMessage.ClientName, centralConnectServiceRequest.RegisterClientMessage.Domain, centralConnectServiceRequest.RegisterClientMessage.CreateBy); if (CentralConnectCode.Success != centralConnectCode) { return(new Core.ServiceResponse() { Code = 500, Message = "RegisterClient Fail of " + Enum.GetName(typeof(CentralConnectCode), centralConnectCode) }); } return(new Core.ServiceResponse() { Code = 0, Message = "Success" }); }
public Client(Socket handler, ClientAction clientConnected, ClientAction clientDisconnected) { ClientConnected = clientConnected; ClientDisconnected = clientDisconnected; HandledSocket = handler; ClientConnected?.Invoke(this); ReceiveData(); }
private void btnStopClient_Click(object sender, EventArgs e) { var id = _internalStorage.First(c => c.Value.ClientId == _currentClientId).Key; var o = new ClientAction() { Action = ActionType.Stop, Message = "STOPPING CLIENT IN 5 SECONDS" }; Server.Send(id, ConversionHelper.ObjectToString(o)); }
private void btnSendMessage_Click(object sender, EventArgs e) { var id = _internalStorage.First(c => c.Value.ClientId == _currentClientId).Key; var o = new ClientAction() { Action = ActionType.None, Message = this.txtClientMessage.Text }; Server.Send(id, ConversionHelper.ObjectToString(o)); }
public void MovePlayer(Protocol.BaseProtocol proto) { Protocol.MovePlayer movePlayer = proto.AsType <Protocol.MovePlayer>(); if (movePlayer.player_id == playerId) { clientAgent.MoveAgent(movePlayer.Position); currentAction = clientAgent; } }
private void ibInsert_Click(object sender, System.Web.UI.ImageClickEventArgs e) { //Response.Write(Text.BoolToOneZero(cbProMbr.Checked)); ibInsert.Enabled = false; //아디디 중복되나 최종확인 if (MbrBaseLib.Self.LoginID_Exist(loginID.Text)) { ClientAction.ShowMsgBack("입력하신 아이디는 존재합니다. 중복확인을 하세요."); } //데이타 충전 //공통부분/////////// CommonInsertUpdate(); ///////////////////// _mbr.member_id = -1; //적용안됨//dbUtil.GetNextNumber("t_Members", "member_id", 100); _mbr.loginID = HTML.ReplaceToDB(loginID.Text); _mbr.rcmderID = HTML.ReplaceToDB(rcmderID.Text); _mbr.cbProMbr = Text.BoolToOneZero(cbProMbr.Checked); //DB업데이트 bool up_result = true; //파일업로드 결과 int sp_result = _mbr.member_id = _mbr.Insert(); //부가정보. if (pnAdditionalInfo.Visible) { if (bnAvataImage.PostedFile.ContentLength > 0 && bnAvataImage.PostedFile.ContentLength < 256000) { _mbr.avataImage = "AvaPic_" + _mbr.member_id.ToString() + FileLib.Self.GetExtention(bnAvataImage.Value); cbDeleteAI.ToolTip = "ok"; } else { _mbr.avataImage = ""; } //부가정보저장. sp_result = _mbr.Insert_OptionJob(); //파일업로드 up_result = this.UploadFiles(); } if (sp_result != 0) { //회원수를 업데이트한다. this.UpdateAllMembersNumber(); if (up_result == false) { ClientAction.ShowMsgAndGoUrl("이미지파일이 아닙니다!! 다시 수정업로드하세요. \\n[가능한 확장자 : " + ImageLib.Self.imagesExtsForWeb + "]", "MbrView.aspx?" + URLQuery.Self.GetQueryString()); } ClientAction.ShowMsgAndGoUrl("정상적으로 입력되었습니다.", " MbrList.aspx?" + URLQuery.Self.GetQueryString()); } else { ClientAction.ShowMsgAndGoUrl("입력작업이 실패했습니다." + "Code:" + sp_result, "MbrView.aspx?" + URLQuery.Self.GetQueryString()); } }
public void HandleAction(ClientAction action) { if (action.IsServerRecipient()) { HandleServerAction(action); } else { _incomingCommands.Enqueue(action); } }
public void TestCreateAndSendMetrics() { ClientAction clientAction = new ClientAction(ConnectString); MetricsEnhancement metricsEnhancement = new MetricsEnhancement(); metricsEnhancement.ClientName = "HCTestClient"; metricsEnhancement.Domain = "local"; metricsEnhancement.Environment = "FUT1"; metricsEnhancement.Type = "General"; System.Console.WriteLine(clientAction.CreateAndSendMetrics(metricsEnhancement).ToString()); }
public void removeInvalidClientAction() { //Arrange DataBaseContext db = new DataBaseContext(); IClientActionRepository clientActionRepo = new ClientActionRepository(db); Guid clientID = new Guid("6DF91B37-DC4A-E911-8259-0A64F53465D0"); string action = "Search"; ClientAction ca = new ClientAction(clientID, action); //Act => Assert Assert.ThrowsException <InvalidOperationException>(() => clientActionRepo.RemoveClientAction(ca)); }
public void LookAt(Protocol.BaseProtocol protocol) { Protocol.LookAtPosition lookAtPos = protocol.AsType <Protocol.LookAtPosition>(); if (lookAtPos.player_id != playerId) { return; } lookAtPosition.LookAtPosition(lookAtPos.Position); currentAction = lookAtPosition; }
// 做加錢的動作 public void GM_AddGameMoney(int Counter = 1000) { int OldMoney = ServerAPI.GetDataFromDict <int> (m_Player, DICT_PlayerAttr.Money, 0); ServerAPI.SetDataFromDict(m_Player, DICT_PlayerAttr.Money, OldMoney + Counter); int Money = ServerAPI.GetDataFromDict <int> (m_Player, DICT_PlayerAttr.Money, 0); // 通知 Client Dictionary <string, object> dictResult = new Dictionary <string, object> (); ClientAction.AddClientAction(dictResult, ClientActionID.Game_Money, Money); ServerAPI.PostResultToClient(null, dictResult); }
private string SetWhereClause() { string whereClause = MbrBaseLib.Self.GetSelMenuQuery(ddlSelMenu.SelectedValue); if (tbSearchString.Text != "") { string search = ""; tbSearchString.Text = HTML.ReplaceToDB(tbSearchString.Text); switch (ddlSearch.SelectedItem.Value) { case "loginID": search = " LIKE '" + tbSearchString.Text + "%'"; whereClause += " AND (" + ddlSearch.SelectedItem.Value + search + ")"; break; case "member_id": if (!MathLib.IsNumber(tbSearchString.Text)) { ClientAction.ShowMsgBack("회원번호는 숫자로 입력하세요."); } search = "='" + tbSearchString.Text + "'"; whereClause += " AND (" + ddlSearch.SelectedItem.Value + search + ")"; break; case "MbrName": case "company": case "jobType": case "hobbies": search = " LIKE '%" + tbSearchString.Text + "%'"; whereClause += " AND (" + ddlSearch.SelectedItem.Value + search + ")"; break; //case "DeptName": // search = "=" + tbSearchString.Text; // break; // case "DeptID": // string deptID = MbrBaseLib.GetDeptID(tbSearchString.Text); // if(deptID != null) // search = " = " + deptID; // else // search = " Is Null"; // this.whereClause += " AND (" + ddlSearch.SelectedItem.Value + search + ")"; // JinsLibrary.WebUtil.CurrentResponse.Write("후후후= " +this.whereClause + "<br>"); // JinsLibrary.CommonLib.WebUtil.CurrentResponse.End(); // break; default: Response.Write("chaos:" + ddlSearch.SelectedItem.Value); break; } } ViewState["whereClause"] = whereClause; return(whereClause); }
public void addInvalidClientAction() { //Arrange DataBaseContext db = new DataBaseContext(); IClientActionRepository clientActionRepo = new ClientActionRepository(db); Guid clientID = new Guid(); string action = "Search"; ClientAction ca = new ClientAction(clientID, action); //Act => Assert Assert.ThrowsException <DbUpdateException>(() => clientActionRepo.AddClientAction(ca)); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //이창을 포커싱한다. ClientAction.WindowFocus(null); //이미지경로 받아서 이미지 if (Request.QueryString["gcID"] != null) { gcID = Request.QueryString["gcID"]; if (this.LargeImageViewBind()) { System.Drawing.Size drawingSize = ImageLib.Self.GetDrawingImageSize(this.imgLIV.ImageUrl); //사이즈수정 if (drawingSize.IsEmpty) { ClientAction.WindowResizeTo(Convert.ToUInt16(imgLIV.Width.Value + 120), Convert.ToUInt16(imgLIV.Height.Value + 165)); } else { ClientAction.WindowResizeTo(Convert.ToUInt16(drawingSize.Width + 200), Convert.ToUInt16(drawingSize.Height + 170)); //ImageLib.Self.ImageResize(ref imgLIV, 1000, 1000); } } else { ClientAction.ShowMsgAndClose("해당 데이터가 없습니다."); } } else { ClientAction.ShowMsgAndClose("정상적인 접근이 아닙니다"); } //타이틀명 설정 if (Request.QueryString["tn"] != null) { ClientAction.SetBrowserTitleBar("이미지확대 - [" + Request.QueryString["tn"] + "]"); } else { ClientAction.AddBrowserTitleBar("이미지확대"); } //기타 설정 if (Request.QueryString["etc"] != null) { } } }
public override ActionCollection GetActions() { ActionCollection actions = base.GetActions(); var action = new ClientAction("viewitem", UIMessages.ViewItem, "window.open('{0}');return false;", this, this.PropertiesUrl) { IsDefault = true }; actions.Add(action); return(actions); }
public override void HandleAction(ClientAction action) { switch (action.Type) { case SetThrottleAction: Throttle = action.PayloadTo <int>(); break; case SetRudderAction: Rudder = action.PayloadTo <int>(); break; } }
Dictionary <string, object> _NPC_CreateNPC(Dictionary <string, object> dictInfo) { //--------------------------------------------------------- // 先寫一筆 Log int LogID = ReportDBLog("_NPC_CreateNPC", JsonConvert.SerializeObject(dictInfo)); Dictionary <string, object> dictResult = null; // 先解析資料 dictResult = new Dictionary <string, object>(); //--------------------------------------------------------- // 取得所需資料 if (dictInfo.ContainsKey("PlayerID") == false) { return(ReportTheResultDict(dictResult, ErrorID.NPC_Create_Args_Error, LogID)); } int PlayerID = System.Convert.ToInt32(dictInfo["PlayerID"]); if (dictInfo.ContainsKey("NPCID") == false) { return(ReportTheResultDict(dictResult, ErrorID.NPC_Create_Args_Error, LogID)); } int NPCID = System.Convert.ToInt32(dictInfo["NPCID"]); //--------------------------------------------------------- // 非所需要參數 int LV = 1; if (dictInfo.ContainsKey("LV") == true) { LV = System.Convert.ToInt32(dictInfo["LV"]); } //--------------------------------------------------------- // 檢查資料正確性 if (NPCTable.instance().HasKey(NPCID) == false) { return(ReportTheResultDict(dictResult, ErrorID.NPC_ID_Error, LogID)); } //--------------------------------------------------------- // 產生結果 string strCommand = string.Format("insert into a_npc (NPCID, PlayerID, LV) values ({0}, {1}, {2})" + UseDB.GETID, NPCID, PlayerID, LV); List <List <object> > listDBResult = UseDB.GameDB.DoQueryCommand(strCommand); int NPCDBID = System.Convert.ToInt32(listDBResult[0][0]); Dictionary <string, object> dictNPC = _GetNPCAttrFromDB(NPCDBID); //--------------------------------------------------------- // 更新 Client ClientAction.AddClientAction(dictResult, ClientActionID.NPC_Update, dictNPC); // 回報結果 return(ReportTheResultDict(dictResult, ErrorID.Success, LogID)); }
/// <summary> /// Adds query into the context asynchronously. /// </summary> /// <param name="query"><see cref="ClientAction"/> instance for query.</param> /// <returns>Returns the <see cref="Task"/>.</returns> public Task AddQueryAsync(ClientAction query) { if (this.ContextInstance == null) { throw new InvalidOperationException(); } if (query == null) { throw new ArgumentNullException(nameof(query)); } return(Task.Factory.StartNew(() => { this.AddQuery(query); })); }
/// <summary> /// Adds query into the context. /// </summary> /// <param name="query"><see cref="ClientAction"/> instance for query.</param> public void AddQuery(ClientAction query) { if (this.ContextInstance == null) { throw new InvalidOperationException(); } if (query == null) { throw new ArgumentNullException(nameof(query)); } this.ContextInstance.AddQuery(query); }
private void ibUpdate_Click(object sender, System.Web.UI.ImageClickEventArgs e) { ibUpdate.Enabled = false; //데이타 충전 //공통부분/////////// CommonInsertUpdate(); ///////////////////// _mbr.member_id = Convert.ToInt32(member_id.Text); _mbr.loginID = ""; //해당사항없음 //DB업데이트 bool up_result = true; //파일업로드 결과 int sp_result = _mbr.Update(); //부가정보. if (pnAdditionalInfo.Visible) { if (cbDeleteAI.Checked) { _mbr.avataImage = ""; } else if (bnAvataImage.PostedFile.ContentLength > 0 && bnAvataImage.PostedFile.ContentLength < 256000) { _mbr.avataImage = "AvaPic_" + _mbr.member_id.ToString() + FileLib.Self.GetExtention(bnAvataImage.Value); cbDeleteAI.ToolTip = "ok"; } else { _mbr.avataImage = cbDeleteAI.ToolTip; } //부가정보저장. sp_result = _mbr.Insert_OptionJob(); //파일업로드 up_result = this.UploadFiles(); } if (sp_result != 0) { //회원수를 업데이트한다. this.UpdateAllMembersNumber(); if (!up_result) { ClientAction.ShowMsgAndGoUrl("이미지파일이 아닙니다!! 다시 수정업로드하세요. \\n[가능한 확장자 : " + ImageLib.Self.imagesExtsForWeb + "]", "MbrView.aspx?" + URLQuery.Self.GetQueryString()); } ClientAction.ShowMsgAndGoUrl("정상적으로 수정되었습니다.", MbrBaseLib.Self.GetWhichList(Request.QueryString["ml"]) + "?" + URLQuery.Self.GetQueryString()); } else { ClientAction.ShowMsgAndGoUrl("수정작업이 실패했습니다." + "Code:" + sp_result, "MbrView.aspx?" + URLQuery.Self.GetQueryString()); } }
private void Page_Load(object sender, System.EventArgs e) { //로그인되었는지 확인(이럴필요 없징!!) //KistelSite.Admins.CompanyMgr.Staffs.LoginProcess.LoginOK(); if (!Page.IsPostBack) { //팝업스크린사이즈변경 ClientAction.WindowResizeTo(500, 600); //페이지타이틀설정 JinsLibrary.ClientAction.AddBrowserTitleBar("우편번호찾기"); //포커스이동 ClientAction.FocusOn(Page, "frmAddr.addrSeek"); } }
public void getClientActionValid() { //Arrange DataBaseContext db = new DataBaseContext(); IClientActionRepository clientActionRepo = new ClientActionRepository(db); Guid clientID = new Guid("6CF91B37-DC4A-E911-8259-0A64F53465D0"); string action = "NotARealAction"; //Act ClientAction ca = clientActionRepo.GetClientAction(clientID, action); //Assert Assert.IsNull(ca); }
public void ClientRepository_GetClientAction_ValidClientAction() { //Arrange DataBaseContext db = new DataBaseContext(); IClientActionRepository clientActionRepo = new ClientActionRepository(db); Guid clientID = new Guid("40361F37-036B-E911-AA03-021598E9EC9E"); string action = "Login"; //Act ClientAction ca = clientActionRepo.GetClientAction(clientID, action); //Assert Assert.IsNotNull(ca); }
private void Page_Load(object sender, System.EventArgs e) { // 여기에 사용자 코드를 배치하여 페이지를 초기화합니다. if (Request.QueryString["db"] == null) { ClientAction.ShowMsgBack("테이블명이 없습니다. 다시 접속하십시오."); } else { db = Request.QueryString["db"]; if (Request.QueryString["pageno"] == null) { pageNo = 1; } else { pageNo = int.Parse(Request.QueryString["pageno"]); } // 테이블 명이 있을 경우에 인증정보가 있는지 확인 //if (!Context.User.Identity.IsAuthenticated) //{ // ErrorLogin("?db=" + db + "&pageno=" + pageNo + "&id=" + Request.QueryString["id"]); //} //else //{ id = int.Parse(Request.QueryString["id"]); if (!Page.IsPostBack) { QnaBiz objBoard = new QnaBiz(db, id); if (objBoard.Html) { content = objBoard.Content; } else { content = Server.HtmlEncode(objBoard.Content); content = content.Replace("\n", "\n<br>"); } ViewState["refID"] = objBoard.RefID; ViewState["reStep"] = objBoard.ReStep; ViewState["reLevel"] = objBoard.ReLevel; } //} } }
protected void ibAdditionalInfo_Click(object sender, ImageClickEventArgs e) { if (pnAdditionalInfo.Visible) { pnAdditionalInfo.Visible = false; } else { pnAdditionalInfo.Visible = true; if (rblMarried.SelectedValue == "미") { ClientAction.WriteJavascript(this, "pnWA", "pnWA.style.display='none';"); } } }
CentralConnectServiceResponse ICentralConnectService.RetrieveRegisterClientMessageByEnvironmentAndClientNameAndDomain(CentralConnectServiceRequest centralConnectServiceRequest) { if (centralConnectServiceRequest.RegisterClientMessage == null) { return(new CentralConnectServiceResponse() { Code = 400, Message = "RegisterClientMessage should not null" }); } if (string.IsNullOrEmpty(centralConnectServiceRequest.RegisterClientMessage.Environment) || string.IsNullOrEmpty(centralConnectServiceRequest.RegisterClientMessage.ClientName) || string.IsNullOrEmpty(centralConnectServiceRequest.RegisterClientMessage.Domain)) { return(new CentralConnectServiceResponse() { Code = 400, Message = "Environment ClientName Domain should not null" }); } if (string.IsNullOrEmpty(centralConnectServiceRequest.Id) || string.IsNullOrEmpty(centralConnectServiceRequest.Token) || string.IsNullOrEmpty(centralConnectServiceRequest.Type)) { return(new CentralConnectServiceResponse() { Code = 400, Message = "Id Type and Token should not null" }); } string message = string.Empty; if (HP.TS.Devops.Security.SecurityCode.Success != HP.TS.Devops.Security.SecurityAction.CheckAccess(this.ConnectString, centralConnectServiceRequest, out message)) { return(new CentralConnectServiceResponse() { Code = 403, Message = centralConnectServiceRequest.Id + " of type " + centralConnectServiceRequest.Type + " have no access of " + message }); } ClientAction clientAction = new ClientAction(this.ConnectString); List <RegisterClientMessage> registerClientMessages = clientAction.RetrieveRegisterClientMessageByEnvironmentAndClientNameAndDomain(centralConnectServiceRequest.RegisterClientMessage.Environment, centralConnectServiceRequest.RegisterClientMessage.ClientName, centralConnectServiceRequest.RegisterClientMessage.Domain); return(new CentralConnectServiceResponse() { Code = 0, Message = "Success", RegisterClientMessages = registerClientMessages }); }
private void CommonInsertUpdate() { Page.Validate(); if (!Page.IsValid) { ClientAction.ShowMsgBack("정확히 입력하세요."); } _mbr = new MbrBase(); _mbr.loginPW = HTML.ReplaceToDB(loginPW.Text); _mbr.MbrName = HTML.ReplaceToDB(MbrName.Text); _mbr.phone = HTML.ReplaceToDB(phone1.Text) + "-" + HTML.ReplaceToDB(phone2.Text) + "-" + HTML.ReplaceToDB(phone3.Text); _mbr.cellularP = cellularP1.SelectedItem.Text + "-" + HTML.ReplaceToDB(cellularP2.Text) + "-" + HTML.ReplaceToDB(cellularP3.Text); _mbr.MbrEmail = HTML.ReplaceToDB(MbrEmail.Text); _mbr.SSN = HTML.ReplaceToDB(SSN1.Text) + "-" + HTML.ReplaceToDB(SSN2.Text); _mbr.zipcode = HTML.ReplaceToDB(zipcode.Text); _mbr.address = HTML.ReplaceToDB(mAddress1.Text) + "|" + HTML.ReplaceToDB(mAddress2.Text); _mbr.newsLetter = Text.BoolToOneZero(newsLetter.Checked); _mbr.findingID = findingID.SelectedValue; _mbr.findingA = HTML.ReplaceToDB(findingA.Text); _mbr.rcmderID = HTML.ReplaceToDB(rcmderID.Text); if (pnAdditionalInfo.Visible) { _mbr.homepage = HTML.ReplaceToDB(homepage.Text); _mbr.monthlyPay = monthlyPay.SelectedValue; _mbr.carInfo = carInfo.SelectedValue; _mbr.SLBirth = rblSLBirth.SelectedValue; _mbr.BirthDay = tbBirthDay.Text; _mbr.Married = rblMarried.SelectedValue; //음력결혼이라.... _mbr.WeddingDay = tbWeddingDay.Text; //Response.Write("tbWeddingDay.Text= " + tbWeddingDay.Text +"<br>"); _mbr.children = HTML.ReplaceToDB(children.Text); _mbr.messenger = MsgName.Text + "|" + MsgID.Text; _mbr.hobbies = Util.CBLSelectedValues(ref hobbies, ";"); _mbr.mark = HTML.ReplaceToDB(mark.Text); _mbr.company = HTML.ReplaceToDB(company.Text); _mbr.jobType = jobType.SelectedValue; _mbr.officeP = HTML.ReplaceToDB(officeP1.Text) + "-" + HTML.ReplaceToDB(officeP2.Text) + "-" + HTML.ReplaceToDB(officeP3.Text); _mbr.oZipcode = oZipcode.Text; _mbr.oAddress = oAddress1.Text + "|" + HTML.ReplaceToDB(oAddress2.Text); //mbr.mLevel = 2; //우수회원 } else { //mbr.mLevel = 1; //정회원 } _mbr.IPaddress = Request.UserHostAddress; }
public PacketHandlers() { setPacketSizes(); PacketHandler temp; temp = new ActionButton(); handlers.Add(PacketId.CLOSE, temp); //Close handlers.Add(PacketId.ACTIONBUTTON, temp); //Actionbutton #1 handlers.Add(PacketId.ACTIONBUTTON2, temp); //Actionbutton #2 handlers.Add(PacketId.ACTIONBUTTON3, temp); //Actionbutton #3 temp = new ClientAction(); handlers.Add(PacketId.IDLE, temp); //Idle handlers.Add(PacketId.MOVE_CAMERA, temp); //Move camera handlers.Add(PacketId.PING, temp); //Ping handlers.Add(PacketId.FOCUS, temp); //Window focus handlers.Add(PacketId.CLICK_MOUSE, temp); //Mouse handlers.Add(PacketId.WINDOW_TYPE, temp); //Window type handlers.Add(PacketId.SOUND_SETTINGS, temp); //Toggle sound (sounds) temp = new Command(); handlers.Add(PacketId.COMMAND, temp); //Commands temp = new Communication(); handlers.Add(PacketId.ADD_FRIEND, temp); //Add friend handlers.Add(PacketId.DELETE_FRIEND, temp); //Delete friend handlers.Add(PacketId.ADD_IGNORE, temp); //Add ignore handlers.Add(PacketId.DELETE_IGNORE, temp); //Delete ignore handlers.Add(PacketId.SEND_PM, temp); //Send PM handlers.Add(PacketId.CLAN_RANKS, temp); //Set clan ranks handlers.Add(PacketId.CLAN_CHAT, temp); //Join clan chat handlers.Add(PacketId.PUBLIC, temp); //Public chat handlers.Add(PacketId.CLAN_KICK, temp); //Clan chat kick handlers.Add(PacketId.PRIVACY_SETTINGS, temp); //public/private/trade chat settings temp = new Walk(); handlers.Add(PacketId.WALK_1, temp); //Walk handlers.Add(PacketId.WALK_2, temp); //Walk handlers.Add(PacketId.WALK_3, temp); //Walk temp = new PlayerInteract(); handlers.Add(PacketId.ATTACK_PLAYER, temp); //Attack handlers.Add(PacketId.FOLLOW, temp); //Follow handlers.Add(PacketId.TRADE, temp); //Trade handlers.Add(PacketId.MAGIC_ON_PLAYER, temp); //Magic on player temp = new NPCInteract(); handlers.Add(PacketId.NPC_FIRST_CLICK, temp); //Attack handlers.Add(PacketId.NPC_SECOND_CLICK, temp); //Second click handlers.Add(PacketId.NPC_THIRD_CLICK, temp); //Third click handlers.Add(PacketId.NPC_FOURTH_CLICK, temp); //Fourth click handlers.Add(PacketId.NPC_FIFTH_CLICK, temp); //Fifth click handlers.Add(PacketId.NPC_EXAMINE, temp); //Examine Npc handlers.Add(PacketId.MAGIC_ON_NPC, temp); //Magic on NPC handlers.Add(PacketId.ITEM_ON_NPC, temp); //Item on NPC temp = new ObjectInteract(); handlers.Add(PacketId.OBJECT_FIRST_CLICK, temp); //First click handlers.Add(PacketId.OBJECT_SECOND_CLICK, temp); //Second click handlers.Add(PacketId.OBJECT_THIRD_CLICK, temp); //Third click handlers.Add(PacketId.OBJECT_FOURTH_CLICK, temp); //Fourth click handlers.Add(PacketId.OBJECT_EXAMINE, temp); //object examine temp = new ItemInteract(); handlers.Add(PacketId.EQUIP, temp); //Equip item handlers.Add(PacketId.ITEM_ON_ITEM, temp); //Item used on item handlers.Add(PacketId.INV_CLICK, temp); //Inventory click item handlers.Add(PacketId.ITEM_ON_OBJECT, temp); //Item used on object handlers.Add(PacketId.ITEM_ON_GROUND_ITEM, temp); //Item used on ground item. handlers.Add(PacketId.INV_OPERATE, temp); //Operate option handlers.Add(PacketId.INV_DROP, temp); //Drop item handlers.Add(PacketId.PICKUP, temp); //Pick up item handlers.Add(PacketId.INV_SWAP_SLOT, temp); //Swap item slot 1 handlers.Add(PacketId.INV_SWAP_SLOT2, temp); //Swap item slot 2 handlers.Add(PacketId.INV_RIGHT_CLICK_OPTION1, temp); //Right click option 1 handlers.Add(PacketId.INV_RIGHT_CLICK_OPTION2, temp); //Right click option 2 handlers.Add(PacketId.INV_EXAMINE_ITEM, temp); //Inventory item examine temp = new InterfaceOptions(); handlers.Add(PacketId.ENTER_AMOUNT, temp); //Enter amount handlers.Add(PacketId.ENTER_TEXT, temp); // Enter text handlers.Add(PacketId.INTERFACE_CLICK_1, temp); //Option 1 handlers.Add(PacketId.INTERFACE_CLICK_2, temp); //Option 2 handlers.Add(PacketId.INTERFACE_CLICK_3, temp); //Option 3 handlers.Add(PacketId.INTERFACE_CLICK_4, temp); //Option 4 handlers.Add(PacketId.INTERFACE_CLICK_5, temp); //Option 5 handlers.Add(PacketId.INTERFACE_CLICK_6, temp); //Option 6 handlers.Add(PacketId.INTERFACE_CLICK_7, temp); //Option 7 handlers.Add(PacketId.INTERFACE_CLICK_8, temp); //Option 8 handlers.Add(PacketId.INTERFACE_CLICK_9, temp); //Option 9 handlers.Add(PacketId.INTERFACE_CLICK_10, temp); //Option 9 handlers.Add(PacketId.GE_SEARCH, temp); //Grand exchange search temp = new Unused(); handlers.Add(PacketId.REIGON_LOADING, temp); //Region loading, varied size handlers.Add(PacketId.PACKET_COUNT, temp); //Sent after any click which increases 'count' in getPackets handlers.Add(PacketId.CLIENT_VARIABLE_30, temp); //Sent if a client variable is 30..unknown handlers.Add(PacketId.DODGY_PACKET, temp); //Caused by a dodgy packet Console.WriteLine("Binded packetHandlers"); }
private void UpdateMBClient(MBConnect c, ClientAction t) { if (lv_client.InvokeRequired) { UpdateMBClientCallback cb = new UpdateMBClientCallback(UpdateMBClient); this.Invoke(cb, new object[] { c, t }); } else { ListViewItem item = null; if (t == ClientAction.ADD) { item = new ListViewItem(new string[10]); //#,ip,recv, send, elapse, recv_bytes, send_bytes _clientRows[c.IP] = item; lv_client.Items.Add(item); } else { item = _clientRows[c.IP]; } if (t == ClientAction.ADD || t == ClientAction.UPDATE) { item.SubItems[ClientColumns.IP].Text = c.IP; item.SubItems[ClientColumns.REQ].Text = Convert.ToString(c.Req); item.SubItems[ClientColumns.ACK].Text = Convert.ToString(c.Ack); item.SubItems[ClientColumns.ELAPSE].Text = Convert.ToString(c.Elapsed); item.SubItems[ClientColumns.RECV].Text = Convert.ToString(c.Recv); item.SubItems[ClientColumns.SENT].Text = Convert.ToString(c.Sent); item.ImageKey = "green"; } else { lv_client.Items.Remove(item); } } }