Example #1
0
        private void doImport()
        {
            var ei =
                new CommandProcessorReceiveInformation
            {
                Project        = _project,
                SourceFilePath = sourceFileTextEdit.Text.Trim(),
            };

            var groups = new List <FileGroup>();

            foreach (CheckedListBoxItem item in fileGroupsListBox.CheckedItems)
            {
                var p = (Pair <string, FileGroup>)item.Value;

                groups.Add(p.Second);
            }

            ei.FileGroups = groups.ToArray();

            var languages = new List <string>();

            foreach (CheckedListBoxItem item in languagesToImportCheckListBox.CheckedItems)
            {
                var p = (Pair <string, string>)item.Value;

                languages.Add(p.Second);
            }

            ei.LanguageCodes = languages.ToArray();

            // --

            progressBackgroundWorker.RunWorkerAsync(ei);
            UpdateUI();
        }
		private void doImport()
		{
			var ei =
				new CommandProcessorReceiveInformation
				{
					Project = _project,
					SourceFilePath = sourceFileTextEdit.Text.Trim(),
				};

			var groups = new List<FileGroup>();

			foreach (CheckedListBoxItem item in fileGroupsListBox.CheckedItems)
			{
				var p = (Pair<string, FileGroup>)item.Value;

				groups.Add(p.Second);
			}

			ei.FileGroups = groups.ToArray();

			var languages = new List<string>();

			foreach (CheckedListBoxItem item in languagesToImportCheckListBox.CheckedItems)
			{
				var p = (Pair<string, string>)item.Value;

				languages.Add(p.Second);
			}

			ei.LanguageCodes = languages.ToArray();

			// --

			progressBackgroundWorker.RunWorkerAsync(ei);
			UpdateUI();
		}