private void parseFileGroups() { var fileGroups = CommandProcessorReceive.DetectFileGroupsFromExcelFile( _project, sourceFileTextEdit.Text.Trim()); fileGroupsListBox.Items.Clear(); if (fileGroups != null) { foreach (var group in fileGroups) { if (isMatchingFileGroup(group)) { var index = fileGroupsListBox.Items.Add( new Pair <string, FileGroup>( group.GetNameIntelligent(_project), group)); fileGroupsListBox.SetItemChecked(index, true); } } // -- // Try to restore. DevExpressExtensionMethods.RestoreSettings( fileGroupsListBox, _project.DynamicSettingsGlobalHierarchical, @"receiveFileFromTranslator.fileGroupsListBox"); } }
private void progressBackgroundWorker_DoWork( object sender, DoWorkEventArgs e) { var ei = (CommandProcessorReceiveInformation)e.Argument; var cp = new CommandProcessorReceive(); cp.Prepare(ei); cp.Process((BackgroundWorker)sender); }
private void parseLanguageCode() { var languageCodes = CommandProcessorReceive.DetectLanguagesFromExcelFile( sourceFileTextEdit.Text.Trim()); languagesToImportCheckListBox.Items.Clear(); if (languageCodes != null) { foreach (var languageCode in languageCodes) { if (!string.IsNullOrEmpty(languageCode) && LanguageCodeDetection.IsValidCultureName(languageCode)) { var index = languagesToImportCheckListBox.Items.Add( new Pair <string, string>( string.Format( @"{0} ({1})", CultureInfo.GetCultureInfo(languageCode).DisplayName, languageCode), languageCode)); languagesToImportCheckListBox.SetItemChecked(index, true); } } } // -- // Try to restore. DevExpressExtensionMethods.RestoreSettings( languagesToImportCheckListBox, _project.DynamicSettingsGlobalHierarchical, @"receiveFileFromTranslator.languagesToImportCheckListBox"); }
private void progressBackgroundWorker_DoWork( object sender, DoWorkEventArgs e) { var ei = (CommandProcessorReceiveInformation)e.Argument; var cp = new CommandProcessorReceive(); cp.Prepare(ei); cp.Process((BackgroundWorker)sender); }