/// ----------------------------------------------------------------------------------- /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged /// resources; <c>false</c> to release only unmanaged resources. /// </param> /// ----------------------------------------------------------------------------------- protected override void Dispose(bool disposing) { System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** "); // Must not be run more than once. if (IsDisposed) { return; } if (disposing) { if (components != null) { components.Dispose(); } if (m_messageFilter != null) { Application.RemoveMessageFilter(m_messageFilter); } } m_messageFilter = null; m_eth = null; components = null; base.Dispose(disposing); }
/// ----------------------------------------------------------------------------------- /// <summary> /// Initializes a new instance of the <see cref="LanguageSetup"/> class. /// </summary> /// ----------------------------------------------------------------------------------- public LanguageSetup() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); // Set the default search by to language name. cboLookup.SelectedIndex = 0; // Save the text in these 2 labels in case we need to restore it sometime // during the user's interaction with this control. lblOtherNamesList.Tag = lblOtherNamesList.Text; lblCurrentEthCodeValue.Tag = lblCurrentEthCodeValue.Text; lblOtherNamesList.Text = ""; lblCurrentEthCodeValue.Text = ""; // This is needed before we can set the initial EthCode. if (!m_testing) { m_eth = new Ethnologue.Ethnologue(); } #if __MonoCS__ // Fix the label font for Linux/Mono. Without this fix, the label may // still show boxes for Chinese characters when the rest of the dialog is // properly showing Chinese characters. using (var oldFont = lblCurrentEthCodeValue.Font) { lblCurrentEthCodeValue.Font = new Font("Sans", oldFont.Size, oldFont.Style, oldFont.Unit); } #endif }
/// ----------------------------------------------------------------------------------- /// <summary> /// Initializes a new instance of the <see cref="LanguageSetup"/> class. /// </summary> /// ----------------------------------------------------------------------------------- public LanguageSetup() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); // Set the default search by to language name. cboLookup.SelectedIndex = 0; // Save the text in these 2 labels in case we need to restore it sometime // during the user's interaction with this control. lblOtherNamesList.Tag = lblOtherNamesList.Text; lblCurrentEthCodeValue.Tag = lblCurrentEthCodeValue.Text; lblOtherNamesList.Text = ""; lblCurrentEthCodeValue.Text = ""; // This is needed before we can set the initial EthCode. if (!m_testing) { m_eth = new Ethnologue.Ethnologue(); } }
/// ----------------------------------------------------------------------------------- /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged /// resources; <c>false</c> to release only unmanaged resources. /// </param> /// ----------------------------------------------------------------------------------- protected override void Dispose(bool disposing) { System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** "); // Must not be run more than once. if (IsDisposed) return; if (disposing) { if (components != null) components.Dispose(); if (m_messageFilter != null) Application.RemoveMessageFilter(m_messageFilter); } m_messageFilter = null; m_eth = null; components = null; base.Dispose( disposing ); }