/// <summary> /// Handles the Load event of the ImportForm control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <remarks>Documented by Dev05, 2007-08-30</remarks> private void ImportForm_Load(object sender, EventArgs e) { frmFields.PrepareChapter(Dictionary); IChapter[] chapterArray = new IChapter[Dictionary.Chapters.Chapters.Count]; Dictionary.Chapters.Chapters.CopyTo(chapterArray, 0); cmbSelectChapter.Items.AddRange(chapterArray); if (cmbSelectChapter.Items.Count > 0) { cmbSelectChapter.SelectedIndex = 0; } cmbFileFormat.Items.Add(Resources.FILETYPE_COMMA); cmbFileFormat.Items.Add(Resources.FILETYPE_SEMICOLON); cmbFileFormat.Items.Add(Resources.FILETYPE_TAB); cmbFileFormat.SelectedIndex = 0; comboBoxCharset.Items.Clear(); foreach (EncodingInfo encoding in Encoding.GetEncodings()) { EncodingWrapper encodingwrapper = new EncodingWrapper(encoding); comboBoxCharset.Items.Add(encodingwrapper); if (encodingwrapper.Encoding.CodePage == Encoding.Default.CodePage) //the encodings are not equal, so the codepages get compared { comboBoxCharset.SelectedItem = encodingwrapper; } } }
/// <summary> /// Handles the Load event of the ImportForm control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <remarks>Documented by Dev05, 2007-08-30</remarks> private void ImportForm_Load(object sender, EventArgs e) { frmFields.PrepareChapter(Dictionary); IChapter[] chapterArray = new IChapter[Dictionary.Chapters.Chapters.Count]; Dictionary.Chapters.Chapters.CopyTo(chapterArray, 0); cmbSelectChapter.Items.AddRange(chapterArray); if (cmbSelectChapter.Items.Count > 0) cmbSelectChapter.SelectedIndex = 0; cmbFileFormat.Items.Add(Resources.FILETYPE_COMMA); cmbFileFormat.Items.Add(Resources.FILETYPE_SEMICOLON); cmbFileFormat.Items.Add(Resources.FILETYPE_TAB); cmbFileFormat.SelectedIndex = 0; comboBoxCharset.Items.Clear(); foreach (EncodingInfo encoding in Encoding.GetEncodings()) { EncodingWrapper encodingwrapper = new EncodingWrapper(encoding); comboBoxCharset.Items.Add(encodingwrapper); if (encodingwrapper.Encoding.CodePage == Encoding.Default.CodePage) //the encodings are not equal, so the codepages get compared comboBoxCharset.SelectedItem = encodingwrapper; } }