private void beTelegramChatId_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { TelegramBot.Default.ClientRegistered += OnStrategyBotRegistered; TelegramBot.Default.StartRegisterClient(Strategy.Id); using(TelegramRegistrationForm form = new TelegramRegistrationForm()) { form.Owner = this; form.Command = "/regme " + TelegramBot.Default.RegistrationCode; if(form.ShowDialog() != DialogResult.OK) return; } TelegramBot.Default.Update(); }
private void bbUpdateBot_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { TelegramBot.Default.ClientRegistered += OnStrategyBotRegistered; TelegramBot.Default.StartRegisterClient(22); using (TelegramRegistrationForm form = new TelegramRegistrationForm()) { form.Owner = this; form.Command = "/regme " + TelegramBot.Default.RegistrationCode; if (form.ShowDialog() != DialogResult.OK) { return; } } TelegramBot.Default.Update(); }