public void init() { List <string> cbeVersionList = new List <string>() { "01", "02", "03", "04", "05", "06", "07", "09", "10" }; ComboBoxElements cbeVersion = new ComboBoxElements() { bindComboSearch = cbeVersionList }; comboBox_version.DataContext = cbeVersion; List <string> cbeSList = new List <string>() { "Artist", "Title", "Album", "Genre", "Album Artist", "Year" }; ComboBoxElements cbeS = new ComboBoxElements() { bindComboSearch = cbeSList }; comboBox_name_search.DataContext = cbeS; loadAll(); comboBox_name_category.SelectedValue = cbeCategoryList[0]; setList(); }
public void loadAll() { popup.displayBlock("Please wait ..."); files = new List <LoadFiles>(); cbeCategoryList = new List <string>(); foreach (DataSettings ds in settings.editSettings.setElementsListView.data) { cbeCategoryList.Add(ds.name); //категории для комбобокса //читаем все папки LoadFiles fl = new LoadFiles(); fl.load(ds.path); fl.updateNameFile(); fl.copy(); files.Add(fl); } //устанавливаем значения для комбобокса ComboBoxElements cbeCategory = new ComboBoxElements() { bindComboSearch = cbeCategoryList }; comboBox_name_category.DataContext = cbeCategory; comboBox_name_categoryExport.DataContext = cbeCategory; popup.displayNan(); }
public void button_openPath() { popup.displayBlock("Loading file ..."); OpenPath op = new OpenPath(); string path = op.open(); if (path != "") { label_pathOpen.Content = path; files = new LoadFiles(); files.load(label_pathOpen.Content.ToString()); editFiles = new EditFiles(); editFiles.main = files.main; editFiles.startEdit(); files.copy(); list_name_main.ItemsSource = files.mainCopy; list_name_main.Items.Refresh(); //подготовим комбобоксы взяв инфу из настроек List <string> cbeVersionList = new List <string>() { "01", "02", "03", "04", "05", "06", "07", "09", "10" }; ComboBoxElements cbeVersion = new ComboBoxElements() { bindComboSearch = cbeVersionList }; comboBox_name_version.DataContext = cbeVersion; List <string> cbeCategoryList = new List <string>(); cbeCategoryList.Add(""); foreach (DataSettings ds in settings.editSettings.setElementsListView.data) { cbeCategoryList.Add(ds.name); } ComboBoxElements cbeCategory = new ComboBoxElements() { bindComboSearch = cbeCategoryList }; comboBox_name_category.DataContext = cbeCategory; //комбо для поиска List <string> cbeSList = new List <string>() { "Artist", "Title", "Album", "Genre", "Album Artist", "Year" }; ComboBoxElements cbeS = new ComboBoxElements() { bindComboSearch = cbeSList }; comboBox_name_search.DataContext = cbeS; } popup.displayNan(); }
public void button_editSelection() { try { Console.WriteLine("------------------"); List <int> listSelected = new List <int>(); for (int i = 0; i <= list_name_main.SelectedItems.Count - 1; i++) { listSelected.Add(list_name_main.Items.IndexOf(list_name_main.SelectedItems[i])); } EditSelectionWindow esw = new EditSelectionWindow(listSelected, files.main, files.mainCopy); List <string> cbeVersionList = new List <string>() { "01", "02", "03", "04", "05", "06", "07", "09", "10" }; ComboBoxElements cbeVersion = new ComboBoxElements() { bindComboSearch = cbeVersionList }; esw.version.DataContext = cbeVersion; List <string> cbeCategoryList = new List <string>(); foreach (DataSettings ds in settings.editSettings.setElementsListView.data) { cbeCategoryList.Add(ds.name); } ComboBoxElements cbeCategory = new ComboBoxElements() { bindComboSearch = cbeCategoryList }; esw.category.DataContext = cbeCategory; esw.ShowDialog(); list_name_main.Items.Refresh(); } catch { } }