// Button click (is_btn click ID's) void ButtonClicked(InSim insim, IS_BTC BTC) { try { BTC_ClientClickedButton(BTC); } catch (Exception e) { var conn = _players[BTC.UCID]; conn.NoColPlayername = StringHelper.StripColors(conn.PName); LogTextToFile("error", "[" + conn.UCID + "] " + conn.NoColPlayername + "(" + _connections[BTC.UCID].UName + ") BTC - Exception: " + e, false); } }
private void BTC_ClientClickedButton(IS_BTC BTC) { try { { switch (BTC.ClickID) { case 1: break; } } } catch (Exception e) { { MessageBox.Show("" + e, "AN ERROR OCCURED"); } } }
private void ButtonPressed(InSim insim, IS_BTC btc) { parameters.sendID(btc.ClickID); }
// Button click void ButtonClick(InSim insim, IS_BTC BTC) { try { BTC_ClientClickedButton(BTC); } catch (Exception e) { LogTextToFile("error", "[" + BTC.UCID + "] " + StringHelper.StripColors(_connections[BTC.UCID].PName) + "(" + _connections[BTC.UCID].UName + ") BTC - Exception: " + e, false); } }
private void BTC_ClientClickedButton(IS_BTC BTC) { var conn = _connections[BTC.UCID]; try { // DELETE a buton: // deleteBtn(Ucid, Reqi, true, ClickID); // deleteBtn(BTC.UCID, BTC.ReqI, true, 6); { switch (BTC.ClickID) { case 44: if (conn.DisplaysOpen == true && conn.inInfo == true) { conn.serverTime = false; conn.DisplaysOpen = false; conn.inInfo = false; deleteBtn(BTC.UCID, BTC.ReqI, true, 30); deleteBtn(BTC.UCID, BTC.ReqI, true, 31); deleteBtn(BTC.UCID, BTC.ReqI, true, 32); deleteBtn(BTC.UCID, BTC.ReqI, true, 33); deleteBtn(BTC.UCID, BTC.ReqI, true, 34); deleteBtn(BTC.UCID, BTC.ReqI, true, 35); deleteBtn(BTC.UCID, BTC.ReqI, true, 36); deleteBtn(BTC.UCID, BTC.ReqI, true, 37); deleteBtn(BTC.UCID, BTC.ReqI, true, 38); deleteBtn(BTC.UCID, BTC.ReqI, true, 39); deleteBtn(BTC.UCID, BTC.ReqI, true, 40); deleteBtn(BTC.UCID, BTC.ReqI, true, 41); deleteBtn(BTC.UCID, BTC.ReqI, true, 42); deleteBtn(BTC.UCID, BTC.ReqI, true, 43); deleteBtn(BTC.UCID, BTC.ReqI, true, 44); deleteBtn(BTC.UCID, BTC.ReqI, true, 45); deleteBtn(BTC.UCID, BTC.ReqI, true, 46); } if (conn.DisplaysOpen == true && conn.inStats == true) { conn.DisplaysOpen = false; conn.inStats = false; deleteBtn(BTC.UCID, BTC.ReqI, true, 30); deleteBtn(BTC.UCID, BTC.ReqI, true, 31); deleteBtn(BTC.UCID, BTC.ReqI, true, 32); deleteBtn(BTC.UCID, BTC.ReqI, true, 33); deleteBtn(BTC.UCID, BTC.ReqI, true, 34); deleteBtn(BTC.UCID, BTC.ReqI, true, 35); deleteBtn(BTC.UCID, BTC.ReqI, true, 36); deleteBtn(BTC.UCID, BTC.ReqI, true, 37); deleteBtn(BTC.UCID, BTC.ReqI, true, 38); deleteBtn(BTC.UCID, BTC.ReqI, true, 39); deleteBtn(BTC.UCID, BTC.ReqI, true, 40); deleteBtn(BTC.UCID, BTC.ReqI, true, 41); deleteBtn(BTC.UCID, BTC.ReqI, true, 42); deleteBtn(BTC.UCID, BTC.ReqI, true, 43); deleteBtn(BTC.UCID, BTC.ReqI, true, 44); deleteBtn(BTC.UCID, BTC.ReqI, true, 45); deleteBtn(BTC.UCID, BTC.ReqI, true, 46); deleteBtn(BTC.UCID, BTC.ReqI, true, 47); deleteBtn(BTC.UCID, BTC.ReqI, true, 48); deleteBtn(BTC.UCID, BTC.ReqI, true, 49); deleteBtn(BTC.UCID, BTC.ReqI, true, 50); deleteBtn(BTC.UCID, BTC.ReqI, true, 51); deleteBtn(BTC.UCID, BTC.ReqI, true, 52); deleteBtn(BTC.UCID, BTC.ReqI, true, 53); deleteBtn(BTC.UCID, BTC.ReqI, true, 54); deleteBtn(BTC.UCID, BTC.ReqI, true, 55); deleteBtn(BTC.UCID, BTC.ReqI, true, 56); deleteBtn(BTC.UCID, BTC.ReqI, true, 57); deleteBtn(BTC.UCID, BTC.ReqI, true, 58); deleteBtn(BTC.UCID, BTC.ReqI, true, 59); deleteBtn(BTC.UCID, BTC.ReqI, true, 60); deleteBtn(BTC.UCID, BTC.ReqI, true, 61); deleteBtn(BTC.UCID, BTC.ReqI, true, 62); deleteBtn(BTC.UCID, BTC.ReqI, true, 63); deleteBtn(BTC.UCID, BTC.ReqI, true, 64); deleteBtn(BTC.UCID, BTC.ReqI, true, 65); deleteBtn(BTC.UCID, BTC.ReqI, true, 66); deleteBtn(BTC.UCID, BTC.ReqI, true, 67); } break; } } } catch (Exception e) { LogTextToFile("error", "[" + BTC.UCID + "] " + StringHelper.StripColors(_connections[BTC.UCID].PName) + "(" + _connections[BTC.UCID].UName + ") - BTC - Exception: " + e, false); } }
private void BTC_ClientClickedButton(IS_BTC BTC) { var conn = _connections[BTC.UCID]; try { // DELETE a button: // deleteBtn(Ucid, Reqi, true, ClickID); // deleteBtn(BTC.UCID, BTC.ReqI, true, 6); { switch (BTC.ClickID) { case 32: HomeScreen(BTC.UCID); break; case 44: #region ' content ' if (conn.DisplaysOpen == true) { conn.serverTime = false; conn.DisplaysOpen = false; deleteBtn(BTC.UCID, BTC.ReqI, true, 30); deleteBtn(BTC.UCID, BTC.ReqI, true, 31); deleteBtn(BTC.UCID, BTC.ReqI, true, 32); deleteBtn(BTC.UCID, BTC.ReqI, true, 33); deleteBtn(BTC.UCID, BTC.ReqI, true, 34); deleteBtn(BTC.UCID, BTC.ReqI, true, 35); deleteBtn(BTC.UCID, BTC.ReqI, true, 36); deleteBtn(BTC.UCID, BTC.ReqI, true, 37); deleteBtn(BTC.UCID, BTC.ReqI, true, 38); deleteBtn(BTC.UCID, BTC.ReqI, true, 39); deleteBtn(BTC.UCID, BTC.ReqI, true, 40); deleteBtn(BTC.UCID, BTC.ReqI, true, 41); deleteBtn(BTC.UCID, BTC.ReqI, true, 42); deleteBtn(BTC.UCID, BTC.ReqI, true, 43); deleteBtn(BTC.UCID, BTC.ReqI, true, 44); deleteBtn(BTC.UCID, BTC.ReqI, true, 45); deleteBtn(BTC.UCID, BTC.ReqI, true, 46); } #endregion break; // Server Stats case 33: #region ' content ' // DARK insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 30, ClickID = 30, BStyle = ButtonStyles.ISB_DARK, H = 44, W = 65, T = 38, L = 66, Text = "" }); // H = 52 // Title // string text = "^3European Cruise"; // insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 31, ClickID = 31, BStyle = ButtonStyles.ISB_LIGHT, H = 7, W = 61, T = 40, L = 68, Text = text }); #region ' Sections ' // Home string text2 = "^8Home"; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 32, ClickID = 32, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 51, L = 69, Text = text2 }); // Server Stats string text3 = "^2Server Stats"; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 33, ClickID = 33, BStyle = ButtonStyles.ISB_LIGHT, H = 4, W = 13, T = 55, L = 69, Text = text3 }); // Your Stats string text4 = "^8Your Stats"; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 34, ClickID = 34, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 59, L = 69, Text = text4 }); // Commands string text5 = "^8Commands"; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 35, ClickID = 35, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 63, L = 69, Text = text5 }); // About string text6 = "^8About"; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 36, ClickID = 36, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 67, L = 69, Text = text6 }); #endregion #region ' Lines ' // Lines string line1 = "^7Current Track : ^3" + TrackHelper.GetFullTrackName(TrackName) + " ^7(" + TrackName + ")"; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 37, ClickID = 37, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 51, L = 83, Text = line1 }); string line2 = "^7Connections : ^3" + (_connections.Count - 1); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 38, ClickID = 38, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 55, L = 83, Text = line2 }); string line3 = "^7Players Spectating : ^3" + (_connections.Count - _players.Count - 1); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 39, ClickID = 39, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 59, L = 83, Text = line3 }); string line4 = "^7Players Driving : ^3" + (_players.Count); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 40, ClickID = 40, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 63, L = 83, Text = line4 }); string line5 = "^7Registered Users : ^3" + dbCount; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 41, ClickID = 41, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 67, L = 83, Text = line5 }); string line6 = "^7Permanently Banned Users : ^3" + dbBans; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 42, ClickID = 42, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 71, L = 83, Text = line6 }); TimeSpan span = TimeSpan.FromSeconds(TotalUptime); string hrs = span.ToString(@"hh\:mm\:ss"); string line7 = "^7InSim Uptime : ^3" + hrs; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 43, ClickID = 43, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 75, L = 83, Text = line7 }); string line8 = ""; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 46, ClickID = 46, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 79, L = 83, Text = line8 }); string line9 = ""; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 45, ClickID = 45, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 83, L = 83, Text = line9 }); #endregion #endregion break; // Your Stats case 34: #region ' content ' // DARK insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 30, ClickID = 30, BStyle = ButtonStyles.ISB_DARK, H = 48, W = 65, T = 38, L = 66, Text = "" }); // H = 52 // Title // string text = "^3European Cruise"; // insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 31, ClickID = 31, BStyle = ButtonStyles.ISB_LIGHT, H = 7, W = 61, T = 40, L = 68, Text = text }); #region ' Sections ' // Home insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 32, ClickID = 32, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 51, L = 69, Text = "^8Home" }); // Server Stats insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 33, ClickID = 33, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 55, L = 69, Text = "^8Server Stats" }); // Your Stats insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 34, ClickID = 34, BStyle = ButtonStyles.ISB_LIGHT, H = 4, W = 13, T = 59, L = 69, Text = "^2Your Stats" }); // Commands insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 35, ClickID = 35, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 63, L = 69, Text = "^8Commands" }); // About insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 36, ClickID = 36, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 67, L = 69, Text = "^8About" }); #endregion #region ' Lines ' // Lines insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 37, ClickID = 37, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 51, L = 83, Text = "^7User : "******" ^7(" + conn.UName + ")" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 38, ClickID = 38, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 55, L = 83, Text = "^7Cash : ^3€" + string.Format("{0:n0}", conn.cash) }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 39, ClickID = 39, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 59, L = 83, Text = "^7Bankbalance : ^3€" + string.Format("{0:n0}", conn.bankbalance) }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 40, ClickID = 40, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 63, L = 83, Text = "^7Driven Distance : ^3" + string.Format("{0:0.0}", conn.TotalDistance / 1000) + " km/" + string.Format("{0:0.0}", conn.TotalDistance / 1609) + " mi" }); TimeSpan span1 = TimeSpan.FromSeconds(conn.TotalConnectionTime); string hrs1 = span1.ToString(@"hh\:mm\:ss"); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 41, ClickID = 41, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 67, L = 83, Text = "^7Time Spent : ^3" + hrs1 }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 42, ClickID = 42, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 71, L = 83, Text = "^7Jobs Completed : ^3" + string.Format("{0:n0}", conn.totaljobsdone) }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 43, ClickID = 43, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 75, L = 83, Text = "^7Current Bonus : ^3" + string.Format("{0:0.0}", conn.BonusDistance / 1000) + " km/" + string.Format("{0:0.0}", conn.BonusDistance / 1609) + " mi" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 46, ClickID = 46, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 79, L = 83, Text = "^7Registered : ^3" + conn.regdate }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 45, ClickID = 45, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 83, L = 83, Text = "" }); #endregion #endregion break; // Commands case 35: #region ' content ' // DARK insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 30, ClickID = 30, BStyle = ButtonStyles.ISB_DARK, H = 37, W = 65, T = 38, L = 66, Text = "" }); // H = 52 // Title // string text = "^3European Cruise"; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 31, ClickID = 31, BStyle = ButtonStyles.ISB_LIGHT, H = 7, W = 61, T = 40, L = 68, Text = "^3InSim Commands" }); #region ' Sections ' // Home insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 32, ClickID = 32, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 51, L = 69, Text = "^8Home" }); // Server Stats insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 33, ClickID = 33, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 55, L = 69, Text = "^8Server Stats" }); // Your Stats insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 34, ClickID = 34, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 59, L = 69, Text = "^8Your Stats" }); // Commands insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 35, ClickID = 35, BStyle = ButtonStyles.ISB_LIGHT, H = 4, W = 13, T = 63, L = 69, Text = "^2Commands" }); // About insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 36, ClickID = 36, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 67, L = 69, Text = "^8About" }); #endregion #region ' Lines ' // Lines insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 37, ClickID = 37, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 51, L = 83, Text = "^7!help -^2 Will show you this menu." }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 38, ClickID = 38, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 55, L = 83, Text = "^7!info -^2 Will show you a bit of info about the server." }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 39, ClickID = 39, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 59, L = 83, Text = "^7!pen (!p) -^2 Will show your stats to everyone." }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 40, ClickID = 40, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 63, L = 83, Text = "^7!gmt <-12 to +12> -^2 Will select your current timezone." }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 41, ClickID = 41, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 67, L = 83, Text = "" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 42, ClickID = 42, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 71, L = 83, Text = "" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 43, ClickID = 43, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 75, L = 83, Text = "" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 46, ClickID = 46, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 79, L = 83, Text = "" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 45, ClickID = 45, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 83, L = 83, Text = "" }); #endregion #endregion break; // About case 36: #region ' content ' // DARK insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 30, ClickID = 30, BStyle = ButtonStyles.ISB_DARK, H = 37, W = 65, T = 38, L = 66, Text = "" }); // H = 52 // Title // string text = "^3European Cruise"; insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 31, ClickID = 31, BStyle = ButtonStyles.ISB_LIGHT, H = 7, W = 61, T = 40, L = 68, Text = "^3About Us" }); #region ' Sections ' // Home insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 32, ClickID = 32, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 51, L = 69, Text = "^8Home" }); // Server Stats insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 33, ClickID = 33, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 55, L = 69, Text = "^8Server Stats" }); // Your Stats insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 34, ClickID = 34, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 59, L = 69, Text = "^8Your Stats" }); // Commands insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 35, ClickID = 35, BStyle = ButtonStyles.ISB_DARK | ButtonStyles.ISB_CLICK, H = 4, W = 13, T = 63, L = 69, Text = "^8Commands" }); // About insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 36, ClickID = 36, BStyle = ButtonStyles.ISB_LIGHT, H = 4, W = 13, T = 67, L = 69, Text = "^2About" }); #endregion #region ' Lines ' // Lines insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 37, ClickID = 37, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 51, L = 83, Text = "^7InSim Author : Kriss ^1N^7O^4R ^7(kristofferandersen)" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 38, ClickID = 38, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 55, L = 83, Text = "^7InSim Version : ^5EUC^7™ InSim V" + InSimVersion }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 39, ClickID = 39, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 59, L = 83, Text = "^7Layout Creator : ^1EMPTY" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 40, ClickID = 40, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 63, L = 83, Text = "^7Layout Version : ^1EMPTY" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 41, ClickID = 41, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 67, L = 83, Text = "^7Our Teamspeak : ^3ts.eugaming.org" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 42, ClickID = 42, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 71, L = 83, Text = "" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 43, ClickID = 43, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 75, L = 83, Text = "" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 46, ClickID = 46, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 79, L = 83, Text = "" }); insim.Send(new IS_BTN { UCID = BTC.UCID, ReqI = 45, ClickID = 45, BStyle = ButtonStyles.ISB_LEFT, H = 4, W = 46, T = 83, L = 83, Text = "" }); #endregion #endregion break; case 100: foreach (var c in _connections.Values) { // Sender if (BTC.UCID == c.UCID) { var Sender = BTC.UCID; _connections[Sender].cash -= _connections[Sender].SendAmount; insim.Send(255, "^8You have sent ^2€" + _connections[BTC.UCID].SendAmount + " ^8to " + _connections[_connections[BTC.UCID].SenderUCID].PName); } // Receiver if (c.UCID == 9) { var Receiver = c.ReceiverUCID1; _connections[Receiver].cash += _connections[Receiver].SendAmount; insim.Send(255, "^8You have received ^2€" + _connections[BTC.UCID].SendAmount + " ^8from " + _connections[BTC.UCID].PName); } _connections[BTC.UCID].SendAmount = 0; } break; case 101: break; } } } catch (Exception e) { LogTextToFile("error", "[" + BTC.UCID + "] " + StringHelper.StripColors(_connections[BTC.UCID].PName) + "(" + _connections[BTC.UCID].UName + ") - BTC - Exception: " + e, false); } }
private void BTC_ClientClickedButton(IS_BTC BTC) { var conn = _connections[BTC.UCID]; try { switch (BTC.ClickID) { case 135: if (conn.inAP == true) { insim.Send(255, "^1*** ^3WIN POINTS HAS BEEN UPDATED ^1***"); insim.Send(255, "^1› ^81st. place = ^2" + onepts); insim.Send(255, "^1› ^82nd. place = ^2" + twopts); insim.Send(255, "^1› ^83rd. place = ^2" + threepts); insim.Send(255, "^1› ^84th. place = ^2" + fourpts); } break; case 39: if (conn.inAP == true) { #region ' Point system on/off ' if (PointSystem == true) { insim.Send(new IS_BTN { UCID = conn.UCID, ReqI = 39, ClickID = 39, BStyle = ButtonStyles.ISB_LIGHT | ButtonStyles.ISB_CLICK, H = 4, W = 8, T = 92, // up to down L = 102, // left to right Text = "^1Disabled" }); PointSystem = false; } else { insim.Send(new IS_BTN { UCID = conn.UCID, ReqI = 39, ClickID = 39, BStyle = ButtonStyles.ISB_LIGHT | ButtonStyles.ISB_CLICK, H = 4, W = 8, T = 92, // up to down L = 102, // left to right Text = "^2Enabled" }); PointSystem = true; } #endregion } break; /*case 134: * * if (conn.inStats == true) * { * conn.inStats = false; * #region - delete buttons from 25-134 - * deleteBtn(BTC.UCID, BTC.ReqI, true, 25); * deleteBtn(BTC.UCID, BTC.ReqI, true, 26); * deleteBtn(BTC.UCID, BTC.ReqI, true, 27); * deleteBtn(BTC.UCID, BTC.ReqI, true, 28); * deleteBtn(BTC.UCID, BTC.ReqI, true, 29); * deleteBtn(BTC.UCID, BTC.ReqI, true, 30); * deleteBtn(BTC.UCID, BTC.ReqI, true, 31); * deleteBtn(BTC.UCID, BTC.ReqI, true, 32); * deleteBtn(BTC.UCID, BTC.ReqI, true, 33); * deleteBtn(BTC.UCID, BTC.ReqI, true, 34); * deleteBtn(BTC.UCID, BTC.ReqI, true, 35); * deleteBtn(BTC.UCID, BTC.ReqI, true, 36); * deleteBtn(BTC.UCID, BTC.ReqI, true, 37); * deleteBtn(BTC.UCID, BTC.ReqI, true, 38); * deleteBtn(BTC.UCID, BTC.ReqI, true, 39); * deleteBtn(BTC.UCID, BTC.ReqI, true, 40); * deleteBtn(BTC.UCID, BTC.ReqI, true, 41); * deleteBtn(BTC.UCID, BTC.ReqI, true, 42); * deleteBtn(BTC.UCID, BTC.ReqI, true, 43); * deleteBtn(BTC.UCID, BTC.ReqI, true, 44); * deleteBtn(BTC.UCID, BTC.ReqI, true, 45); * deleteBtn(BTC.UCID, BTC.ReqI, true, 46); * deleteBtn(BTC.UCID, BTC.ReqI, true, 47); * deleteBtn(BTC.UCID, BTC.ReqI, true, 48); * deleteBtn(BTC.UCID, BTC.ReqI, true, 49); * deleteBtn(BTC.UCID, BTC.ReqI, true, 50); * deleteBtn(BTC.UCID, BTC.ReqI, true, 51); * deleteBtn(BTC.UCID, BTC.ReqI, true, 52); * deleteBtn(BTC.UCID, BTC.ReqI, true, 53); * deleteBtn(BTC.UCID, BTC.ReqI, true, 54); * deleteBtn(BTC.UCID, BTC.ReqI, true, 55); * deleteBtn(BTC.UCID, BTC.ReqI, true, 56); * deleteBtn(BTC.UCID, BTC.ReqI, true, 57); * deleteBtn(BTC.UCID, BTC.ReqI, true, 58); * deleteBtn(BTC.UCID, BTC.ReqI, true, 59); * deleteBtn(BTC.UCID, BTC.ReqI, true, 50); * deleteBtn(BTC.UCID, BTC.ReqI, true, 51); * deleteBtn(BTC.UCID, BTC.ReqI, true, 52); * deleteBtn(BTC.UCID, BTC.ReqI, true, 53); * deleteBtn(BTC.UCID, BTC.ReqI, true, 54); * deleteBtn(BTC.UCID, BTC.ReqI, true, 55); * deleteBtn(BTC.UCID, BTC.ReqI, true, 56); * deleteBtn(BTC.UCID, BTC.ReqI, true, 57); * deleteBtn(BTC.UCID, BTC.ReqI, true, 58); * deleteBtn(BTC.UCID, BTC.ReqI, true, 59); * deleteBtn(BTC.UCID, BTC.ReqI, true, 60); * deleteBtn(BTC.UCID, BTC.ReqI, true, 61); * deleteBtn(BTC.UCID, BTC.ReqI, true, 62); * deleteBtn(BTC.UCID, BTC.ReqI, true, 63); * deleteBtn(BTC.UCID, BTC.ReqI, true, 64); * deleteBtn(BTC.UCID, BTC.ReqI, true, 65); * deleteBtn(BTC.UCID, BTC.ReqI, true, 66); * deleteBtn(BTC.UCID, BTC.ReqI, true, 67); * deleteBtn(BTC.UCID, BTC.ReqI, true, 68); * deleteBtn(BTC.UCID, BTC.ReqI, true, 69); * deleteBtn(BTC.UCID, BTC.ReqI, true, 70); * deleteBtn(BTC.UCID, BTC.ReqI, true, 71); * deleteBtn(BTC.UCID, BTC.ReqI, true, 72); * deleteBtn(BTC.UCID, BTC.ReqI, true, 73); * deleteBtn(BTC.UCID, BTC.ReqI, true, 74); * deleteBtn(BTC.UCID, BTC.ReqI, true, 75); * deleteBtn(BTC.UCID, BTC.ReqI, true, 76); * deleteBtn(BTC.UCID, BTC.ReqI, true, 77); * deleteBtn(BTC.UCID, BTC.ReqI, true, 78); * deleteBtn(BTC.UCID, BTC.ReqI, true, 79); * deleteBtn(BTC.UCID, BTC.ReqI, true, 80); * deleteBtn(BTC.UCID, BTC.ReqI, true, 81); * deleteBtn(BTC.UCID, BTC.ReqI, true, 82); * deleteBtn(BTC.UCID, BTC.ReqI, true, 83); * deleteBtn(BTC.UCID, BTC.ReqI, true, 84); * deleteBtn(BTC.UCID, BTC.ReqI, true, 85); * deleteBtn(BTC.UCID, BTC.ReqI, true, 86); * deleteBtn(BTC.UCID, BTC.ReqI, true, 87); * deleteBtn(BTC.UCID, BTC.ReqI, true, 88); * deleteBtn(BTC.UCID, BTC.ReqI, true, 89); * deleteBtn(BTC.UCID, BTC.ReqI, true, 90); * deleteBtn(BTC.UCID, BTC.ReqI, true, 91); * deleteBtn(BTC.UCID, BTC.ReqI, true, 92); * deleteBtn(BTC.UCID, BTC.ReqI, true, 93); * deleteBtn(BTC.UCID, BTC.ReqI, true, 94); * deleteBtn(BTC.UCID, BTC.ReqI, true, 95); * deleteBtn(BTC.UCID, BTC.ReqI, true, 96); * deleteBtn(BTC.UCID, BTC.ReqI, true, 97); * deleteBtn(BTC.UCID, BTC.ReqI, true, 98); * deleteBtn(BTC.UCID, BTC.ReqI, true, 99); * deleteBtn(BTC.UCID, BTC.ReqI, true, 100); * deleteBtn(BTC.UCID, BTC.ReqI, true, 101); * deleteBtn(BTC.UCID, BTC.ReqI, true, 102); * deleteBtn(BTC.UCID, BTC.ReqI, true, 103); * deleteBtn(BTC.UCID, BTC.ReqI, true, 104); * deleteBtn(BTC.UCID, BTC.ReqI, true, 105); * deleteBtn(BTC.UCID, BTC.ReqI, true, 106); * deleteBtn(BTC.UCID, BTC.ReqI, true, 107); * deleteBtn(BTC.UCID, BTC.ReqI, true, 108); * deleteBtn(BTC.UCID, BTC.ReqI, true, 109); * deleteBtn(BTC.UCID, BTC.ReqI, true, 110); * deleteBtn(BTC.UCID, BTC.ReqI, true, 111); * deleteBtn(BTC.UCID, BTC.ReqI, true, 112); * deleteBtn(BTC.UCID, BTC.ReqI, true, 113); * deleteBtn(BTC.UCID, BTC.ReqI, true, 114); * deleteBtn(BTC.UCID, BTC.ReqI, true, 115); * deleteBtn(BTC.UCID, BTC.ReqI, true, 116); * deleteBtn(BTC.UCID, BTC.ReqI, true, 117); * deleteBtn(BTC.UCID, BTC.ReqI, true, 118); * deleteBtn(BTC.UCID, BTC.ReqI, true, 119); * deleteBtn(BTC.UCID, BTC.ReqI, true, 120); * deleteBtn(BTC.UCID, BTC.ReqI, true, 121); * deleteBtn(BTC.UCID, BTC.ReqI, true, 122); * deleteBtn(BTC.UCID, BTC.ReqI, true, 123); * deleteBtn(BTC.UCID, BTC.ReqI, true, 124); * deleteBtn(BTC.UCID, BTC.ReqI, true, 125); * deleteBtn(BTC.UCID, BTC.ReqI, true, 126); * deleteBtn(BTC.UCID, BTC.ReqI, true, 127); * deleteBtn(BTC.UCID, BTC.ReqI, true, 128); * deleteBtn(BTC.UCID, BTC.ReqI, true, 129); * deleteBtn(BTC.UCID, BTC.ReqI, true, 130); * deleteBtn(BTC.UCID, BTC.ReqI, true, 131); * deleteBtn(BTC.UCID, BTC.ReqI, true, 132); * deleteBtn(BTC.UCID, BTC.ReqI, true, 133); * deleteBtn(BTC.UCID, BTC.ReqI, true, 134); #endregion * } * * break;*/ case 36: if (conn.inAP == true) { deleteBtn(BTC.UCID, BTC.ReqI, true, 25); deleteBtn(BTC.UCID, BTC.ReqI, true, 26); deleteBtn(BTC.UCID, BTC.ReqI, true, 27); deleteBtn(BTC.UCID, BTC.ReqI, true, 28); deleteBtn(BTC.UCID, BTC.ReqI, true, 29); deleteBtn(BTC.UCID, BTC.ReqI, true, 30); deleteBtn(BTC.UCID, BTC.ReqI, true, 31); deleteBtn(BTC.UCID, BTC.ReqI, true, 32); deleteBtn(BTC.UCID, BTC.ReqI, true, 33); deleteBtn(BTC.UCID, BTC.ReqI, true, 34); deleteBtn(BTC.UCID, BTC.ReqI, true, 35); deleteBtn(BTC.UCID, BTC.ReqI, true, 36); deleteBtn(BTC.UCID, BTC.ReqI, true, 37); deleteBtn(BTC.UCID, BTC.ReqI, true, 38); deleteBtn(BTC.UCID, BTC.ReqI, true, 39); deleteBtn(BTC.UCID, BTC.ReqI, true, 40); deleteBtn(BTC.UCID, BTC.ReqI, true, 41); deleteBtn(BTC.UCID, BTC.ReqI, true, 42); deleteBtn(BTC.UCID, BTC.ReqI, true, 135); onepts = Convert.ToString(4); twopts = Convert.ToString(3); threepts = Convert.ToString(2); fourpts = Convert.ToString(1); SqlInfo.updateptsFIRST(Convert.ToInt32(4)); SqlInfo.updateptsSECOND(Convert.ToInt32(3)); SqlInfo.updateptsTHIRD(Convert.ToInt32(2)); SqlInfo.updateptsFORTH(Convert.ToInt32(1)); insim.Send(BTC.UCID, "^2All values has been set to default"); conn.inAP = false; } break; case 37: if (conn.inAP == true) { deleteBtn(BTC.UCID, BTC.ReqI, true, 25); deleteBtn(BTC.UCID, BTC.ReqI, true, 26); deleteBtn(BTC.UCID, BTC.ReqI, true, 27); deleteBtn(BTC.UCID, BTC.ReqI, true, 28); deleteBtn(BTC.UCID, BTC.ReqI, true, 29); deleteBtn(BTC.UCID, BTC.ReqI, true, 30); deleteBtn(BTC.UCID, BTC.ReqI, true, 31); deleteBtn(BTC.UCID, BTC.ReqI, true, 32); deleteBtn(BTC.UCID, BTC.ReqI, true, 33); deleteBtn(BTC.UCID, BTC.ReqI, true, 34); deleteBtn(BTC.UCID, BTC.ReqI, true, 35); deleteBtn(BTC.UCID, BTC.ReqI, true, 36); deleteBtn(BTC.UCID, BTC.ReqI, true, 37); deleteBtn(BTC.UCID, BTC.ReqI, true, 38); deleteBtn(BTC.UCID, BTC.ReqI, true, 39); deleteBtn(BTC.UCID, BTC.ReqI, true, 40); deleteBtn(BTC.UCID, BTC.ReqI, true, 41); deleteBtn(BTC.UCID, BTC.ReqI, true, 42); deleteBtn(BTC.UCID, BTC.ReqI, true, 43); deleteBtn(BTC.UCID, BTC.ReqI, true, 135); conn.inAP = false; } break; } } catch (Exception e) { LogTextToFile("error", "[" + BTC.UCID + "] " + StringHelper.StripColors(_connections[BTC.UCID].PName) + "(" + _connections[BTC.UCID].UName + ") - BTC - Exception: " + e, false); } }