private void b_Move_Click(object sender, RoutedEventArgs e) { if (String.IsNullOrEmpty(tb_GPS.Text) && !IsDumpCoords) { MessageBox.Show("Fill GPS coords"); return; } if (String.IsNullOrEmpty(Settings.Settings.DumpGPS) && IsDumpCoords) { MessageBox.Show("Fill Dump GPS coords"); return; } Tuple <string, string>[] _params = new Tuple <string, string> [3]; _params[0] = new Tuple <string, string>("EntityId", grid.EntityId.ToString()); _params[1] = new Tuple <string, string>("clearOwner", "false"); if (!IsDumpCoords) { _params[2] = new Tuple <string, string>("GPS", tb_GPS.Text); } else { _params[2] = new Tuple <string, string>("GPS", Settings.Settings.DumpGPS); } MyStatic.CustomApiRequest("moveGridTo", _params); }
private void UpdateCustomAPI() { string response = MyStatic.CustomApiRequest("GetLastPlayersLoginTime"); if (!string.IsNullOrEmpty(response)) { players = new JavaScriptSerializer().Deserialize <PlayersInformationFormat[]>(response); } }