public Telegram(TelegramDefinition def, ref ISourceConnection source) { InitializeComponent(); dataSource = source; telegramDef = def; itemControls = new Dictionary <string, IValueControl>(); itemDefs = new Dictionary <string, LibTelcom.TelegramItem>(); groupBox1.Text = def.TelegramName + " (" + def.Description + ")"; foreach (LibTelcom.TelegramItem item in def.TelegramItems) { addItem(item); } }
private void showTelegram(TelegramDefinition def) { DlgSelectProvider dlgProviders = new DlgSelectProvider(providers); if (dlgProviders.ShowDialog() == DialogResult.OK) { // sankar if (dlgProviders.SelectedProvider == null) { MessageBox.Show("Please select the item from the list"); return; } if (dlgProviders.SelectedProvider.configureSource()) { Telegram tlg = dlgProviders.SelectedProvider.createTelegram(def); flowLayoutPanel1.Controls.Add(tlg); } } }