*
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user