/// <summary> /// The name represents a (TypeInfo, ConvType) pair and is unique to a type library. Used in SymbolTable /// </summary> private string GetInternalEncodedManagedName(TypeInfo typeInfo, ConvType convType) { using (TypeLibAttr typeLibAttr = typeInfo.GetContainingTypeLib().GetLibAttr()) { return(typeInfo.GetDocumentation() + "[" + convType.ToString() + "," + typeLibAttr.guid + "]"); } }
public void InitSelectConverter(EncConverters aECs, ConvType eConversionTypeFilter, string strChooseConverterDialogTitle, string strFontName) { DirectableEncConverter.EncConverters = aECs; m_eConversionTypeFilter = eConversionTypeFilter; InitializeComponent(); // update the title bar with any potential text strings given by the client if (!String.IsNullOrEmpty(strChooseConverterDialogTitle)) Text = strChooseConverterDialogTitle; if (!String.IsNullOrEmpty(strFontName)) textBoxDataPreview.Font = CreateFontSafe(strFontName); // and indicate whether it is being filtered or not. if (m_eConversionTypeFilter != ConvType.Unknown) Text += String.Format(" <with filter: {0}>", m_eConversionTypeFilter.ToString()); // Force the ToolTip text to be displayed whether or not the form is active. toolTips.ShowAlways = true; // enable the "Launch Options Installer" button (if the NRSI setup program is installed... // it's not visible otherwise) RegistryKey keyInstallLocation = Registry.LocalMachine.OpenSubKey(strInstallerLocationRegKey, false); if( keyInstallLocation != null ) { string strInstallPath = (string)keyInstallLocation.GetValue(strInstallerPathKey); if( strInstallPath != null ) { strInstallPath += strSetupSCExe; this.buttonLaunchOptionsInstaller.Visible = File.Exists(strInstallPath); } } InitializeConverterList(); this.listBoxExistingConverters.ContextMenu = this.contextMenu; RegistryKey keyLastTooltipState = Registry.LocalMachine.OpenSubKey(EncConverters.SEC_ROOT_KEY, false); if (keyLastTooltipState != null) checkBoxShowTooltips.Checked = (bool)((string)keyLastTooltipState.GetValue(EncConverters.strShowToolTipsStateKey, "True") == "True"); helpProvider.SetHelpString(textBoxCodePageInput, Properties.Resources.CodePageHelpString); helpProvider.SetHelpString(textBoxCodePageOutput, Properties.Resources.CodePageHelpString); helpProvider.SetHelpString(textBoxDataPreview, Properties.Resources.PreviewBoxHelpString); }