public MainWindow(Configuration config) { InitializeComponent(); _client = new AsyncClient(config); _client.Start(); _client.NotificationReceived += _client_NotificationReceived; SignIn(); }
private void BtnRegister_OnClick(object sender, RoutedEventArgs e) { if (TbNickname.Text == string.Empty) { MessageBox.Show("Nickname required."); return; } _config.Nick = TbNickname.Text; _client = new AsyncClient(_config); _client.NotificationReceived += client_NotificationReceived; _client.Register(); }
public static void Configure(Configuration config) { _client = new AsyncClient(config); }