public void OnUpdateFile(DeploymentFile file) { UpdateFile?.Invoke(new UpdateEventArgs { File = file, }); }
private void deleteFile_Click(object sender, RoutedEventArgs e) { var corpus = (Corpus)listCorpora.SelectedItem; var file = (ICorpora)listFiles.SelectedItem; corpusManager.RemoveFile(corpus, file); UpdateFile?.Invoke(); }
private void addFile_Click(object sender, RoutedEventArgs e) { var corpus = (Corpus)listCorpora.SelectedItem; var opf = new OpenFileDialog(); if (opf.ShowDialog() == true) { corpusManager.AddFile(corpus, opf.FileName); UpdateFile?.Invoke(); } }
private void editFile_Click(object sender, RoutedEventArgs e) { var corpus = (ICorpora)listCorpora.SelectedItem; var file = (ICorpora)listFiles.SelectedItem; var form = new ChangeInfoForm("Название файла", "Изменить"); if (form.ShowDialog() == true) { corpusManager.EditFile(corpus, file, form.TextInfo); UpdateFile?.Invoke(); } }
private void listCorpora_SelectionChanged(object sender, SelectionChangedEventArgs e) { UpdateFile?.Invoke(); }
protected void OnUpdateFile( UpdateEventArgs args) { UpdateFile?.Invoke(args); }