void bgw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { progressBar1.Value = progressBar1.Maximum; SqlAccess sql = new SqlAccess(); sql.GetGroups(true); this.Close(); MessageBox.Show("Udało się zaimportować "+importedWords+" słówek." +(failedWords>0?" Błedy wystąpiły przy "+failedWords+ " słowach.":"")); }
public addGroup() { InitializeComponent(); SqlAccess sql = new SqlAccess(); comboBox1.ItemsSource = sql.GetLanguages(); comboBox1.SelectedIndex = 0; List<Group> temp = sql.GetGroups(false); temp.Insert(0,new Group("", 0)); comboBox2.ItemsSource = temp; comboBox2.SelectionChanged += new SelectionChangedEventHandler(comboBox2_SelectionChanged); }
public MainWindow() { SQLiteFunction.RegisterFunction(typeof(SQLiteCaseInsensitiveCollation)); InitializeComponent(); SqlAccess sql = new SqlAccess(); sql.GetGroups(true); listBox1.ItemsSource = groups; listBox2.ItemsSource = groups; listBox3.ItemsSource = groups; if (groups.Count > 0) { listBox2.SelectedIndex = 0; listBox3.SelectedIndex = 0; listBox1.SelectedIndex = 0; } listBox3.MouseDoubleClick+=new MouseButtonEventHandler(listBox3_MouseDoubleClick); }