This commit is contained in:
2025-05-13 00:55:30 +03:00
parent 663fd8647e
commit 89416c2244
43 changed files with 9422 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
namespace RconGUI
{
public partial class MainPage : ContentPage
{
int count = 0;
public ServerContext Server { get; private set; }
public MainPage(ServerContext serverContext)
{
Server = serverContext;
this.BindingContext = Server;
InitializeComponent();
}
private void OnConnectClicked(object sender, EventArgs e)
{
Server.Connect();
//SemanticScreenReader.Announce(CounterBtn.Text);
}
private async void OnActionClicked(object sender, EventArgs e) {
var btn = (Button)sender;
RconScript ctx = (RconScript)btn.BindingContext;
await Server.RunCommands(ctx.Commands);
}
private async void OnMapClicked(object sender, EventArgs e) {
var btn = (Button)sender;
RconScript ctx = (RconScript)btn.BindingContext;
await Server.RunCommands(ctx.Commands);
}
private async void OnCmdClicked(object sender, EventArgs e) {
var btn = (Button)sender;
var ctx = (ConsoleObject)btn.BindingContext;
await Server.RunCommand("echo 1");
}
}
}