Пример #1
0
        public virtual void Initialize
        (
            IEncConverters aECs,
            string strFriendlyName,
            string strConverterIdentifier,
            ConvType eConversionType,
            string strTestData
        )
        {
            FriendlyName        = strFriendlyName;
            ConverterIdentifier = strConverterIdentifier;
            ConversionType      = eConversionType;

            m_aECs = aECs;
            m_aEC  = InitializeEncConverter;

            tabControl.Controls.Remove(tabPageAbout);
            tabControl.Controls.Remove(tabPageSetup);
            tabControl.Controls.Remove(tabPageAdvanced);

            // for 'test', it's possible that there may be some font mapping in the repository
            string strLhsName, strRhsName;

            if (m_aECs.GetFontMappingFromMapping(strFriendlyName, out strLhsName, out strRhsName))
            {
                ecTextBoxInput.Font  = CreateFontSafe(strLhsName, ecTextBoxInput.Font);
                ecTextBoxOutput.Font = CreateFontSafe(strRhsName, ecTextBoxOutput.Font);
            }

            ecTextBoxInput.Text = strTestData;
            buttonOK.Visible    = buttonApply.Visible = false;
            buttonCancel.Text   = "Close";

            helpProvider.SetHelpString(buttonCancel, Properties.Resources.CloseButtonHelpString);
        }
Пример #2
0
		public virtual void Initialize
			(
			IEncConverters aECs,
			string strFriendlyName,
			string strConverterIdentifier,
			ConvType eConversionType,
			string strTestData
			)
		{
			FriendlyName = strFriendlyName;
			ConverterIdentifier = strConverterIdentifier;
			ConversionType = eConversionType;

			m_aECs = aECs;
			m_aEC = InitializeEncConverter;

			tabControl.Controls.Remove(tabPageAbout);
			tabControl.Controls.Remove(tabPageSetup);
			tabControl.Controls.Remove(tabPageAdvanced);

			// for 'test', it's possible that there may be some font mapping in the repository
			string strLhsName, strRhsName;
			if (m_aECs.GetFontMappingFromMapping(strFriendlyName, out strLhsName, out strRhsName))
			{
				ecTextBoxInput.Font = CreateFontSafe(strLhsName, ecTextBoxInput.Font);
				ecTextBoxOutput.Font = CreateFontSafe(strRhsName, ecTextBoxOutput.Font);
			}

			ecTextBoxInput.Text = strTestData;
			buttonOK.Visible = buttonApply.Visible = false;
			buttonCancel.Text = "Close";

			helpProvider.SetHelpString(buttonCancel, Properties.Resources.CloseButtonHelpString);

		}