本文整理汇总了C#中IHelpTopicProvider类的典型用法代码示例。如果您正苦于以下问题:C# IHelpTopicProvider类的具体用法?C# IHelpTopicProvider怎么用?C# IHelpTopicProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IHelpTopicProvider类属于命名空间,在下文中一共展示了IHelpTopicProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VerticalDraftView
/// ------------------------------------------------------------------------------------
/// <summary>
/// Make one.
/// </summary>
/// <param name="cache">The cache.</param>
/// <param name="app">The app.</param>
/// <param name="helpTopicProvider">The help topic provider.</param>
/// <param name="makeRootAutomatically">if set to <c>true</c> [make root automatically].</param>
/// <param name="filterInstance">The filter instance.</param>
/// ------------------------------------------------------------------------------------
public VerticalDraftView(FdoCache cache, IApp app, IHelpTopicProvider helpTopicProvider,
bool makeRootAutomatically, int filterInstance)
: base(cache, filterInstance, app, "vertical draft view", true, false,
makeRootAutomatically, TeViewType.VerticalView, -1, helpTopicProvider)
{
AutoScroll = true;
}
示例2: EmptyScripture
/// ------------------------------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="EmptyScripture"/> class.
/// </summary>
/// ------------------------------------------------------------------------------------
public EmptyScripture(ITMAdapter adapter, FdoCache fdoCache, IHelpTopicProvider helpTopicProvider)
{
InitializeComponent();
m_helpTopicProvider = helpTopicProvider;
if (adapter == null || adapter.MessageMediator == null)
btnBook.Enabled = false;
else
{
m_tmAdapter = adapter;
// Save the adapter's message mediator so it can be restored when the
// dialog closes.
m_savMsgMediator = adapter.MessageMediator;
// Create a new mediator for this dialog and set
// the adapter's mediator to it.
Mediator mediator = new Mediator();
mediator.AddColleague(this);
m_tmAdapter.MessageMediator = mediator;
}
string projectName = fdoCache.ProjectId.Name;
lblTopLabel.Text = string.Format(lblTopLabel.Text,projectName);
}
示例3: AdvancedMTDialog
internal AdvancedMTDialog(FdoCache cache, bool fPrepose, CChartSentenceElements ccSentElem, IHelpTopicProvider helpTopicProvidor)
{
InitializeComponent();
SuspendLayout();
m_helpTopicProvider = helpTopicProvidor;
if (m_helpTopicProvider != null)
{
helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic));
helpProvider.SetShowHelp(this, true);
}
m_AMTDLogic = new AdvancedMTDialogLogic(cache, fPrepose, ccSentElem);
m_bottomStuff.SuspendLayout();
m_bottomStuff.Controls.AddRange(new Control[] { m_AMTDLogic.DlgRibbon });
m_bottomStuff.ResumeLayout();
// Setup localized dialog
SetCaption(fPrepose ? DiscourseStrings.ksAdvDlgPreposeCaption : DiscourseStrings.ksAdvDlgPostposeCaption);
SetMainText(fPrepose ? DiscourseStrings.ksAdvDlgMainPreText : DiscourseStrings.ksAdvDlgMainPostText);
SetPartialText(fPrepose ? DiscourseStrings.ksAdvDlgPartialPre : DiscourseStrings.ksAdvDlgPartialPost);
ResumeLayout();
InitLogicAndDialog();
}
示例4: ShowHelpTopic
/// ------------------------------------------------------------------------------------
/// <summary>
/// Show a help topic.
/// </summary>
/// <param name="helpTopicProvider"></param>
/// <param name="helpFileKey">string key to get the help file name</param>
/// <param name="helpTopicKey">string key to get the help topic</param>
/// ------------------------------------------------------------------------------------
public static void ShowHelpTopic(IHelpTopicProvider helpTopicProvider, string helpFileKey,
string helpTopicKey)
{
string helpFile;
// sanity check
if (helpTopicProvider == null || helpFileKey == null || helpTopicKey == null ||
string.Empty.Equals(helpFileKey) || string.Empty.Equals(helpTopicKey))
return;
// try to get a path to the help file.
try
{
helpFile = FwDirectoryFinder.CodeDirectory +
helpTopicProvider.GetHelpString(helpFileKey);
}
catch
{
MessageBox.Show(FwUtilsStrings.ksCannotFindHelp);
return;
}
// try to get a topic to show
string helpTopic = helpTopicProvider.GetHelpString(helpTopicKey);
if (string.IsNullOrEmpty(helpTopic))
{
MessageBox.Show(String.Format(FwUtilsStrings.ksNoHelpTopicX, helpTopicKey));
return;
}
// Show the help. We have to use a label because without it the help is always on top of the window
Help.ShowHelp(new Label(), helpFile, helpTopic);
}
示例5: ShowNewDialog
/// <summary>
/// Shows the new writing system properties dialog.
/// </summary>
/// <param name="owner">The owner.</param>
/// <param name="cache">The cache.</param>
/// <param name="wsManager">The ws manager.</param>
/// <param name="wsContainer">The ws container.</param>
/// <param name="helpTopicProvider">The help topic provider.</param>
/// <param name="app">The app.</param>
/// <param name="stylesheet">The stylesheet.</param>
/// <param name="displayRelatedWss">if set to <c>true</c> related writing systems will be displayed.</param>
/// <param name="defaultName">The default language name for the new writing system.</param>
/// <param name="newWritingSystems">The new writing systems.</param>
/// <returns></returns>
public static bool ShowNewDialog(Form owner, FdoCache cache, IWritingSystemManager wsManager,
IWritingSystemContainer wsContainer, IHelpTopicProvider helpTopicProvider, IApp app,
IVwStylesheet stylesheet, bool displayRelatedWss, string defaultName,
out IEnumerable<IWritingSystem> newWritingSystems)
{
newWritingSystems = null;
LanguageSubtag languageSubtag;
using (new WaitCursor(owner))
using (var dlg = new LanguageSelectionDlg(wsManager, helpTopicProvider))
{
dlg.Text = FwCoreDlgs.kstidLanguageSelectionNewWsCaption;
dlg.DefaultLanguageName = defaultName;
if (dlg.ShowDialog(owner) != DialogResult.OK)
return false;
languageSubtag = dlg.LanguageSubtag;
}
using (new WaitCursor(owner))
using (var wsPropsDlg = new WritingSystemPropertiesDialog(cache, wsManager, wsContainer, helpTopicProvider, app, stylesheet))
{
wsPropsDlg.SetupDialog(languageSubtag, displayRelatedWss);
if (wsPropsDlg.ShowDialog(owner) == DialogResult.OK)
{
newWritingSystems = wsPropsDlg.NewWritingSystems;
return true;
}
}
return false;
}
示例6: ObtainProjectFromAnySource
/// <summary>
/// Get a new FW project from some Mercurial repository.
/// The repo may be a lift or full FW repo, but it can be from any source source, as long as the code can create an FW project from it.
/// </summary>
/// <returns>Null if the operation was cancelled or otherwise did not work. The full pathname of an fwdata file, if it did work.</returns>
public static string ObtainProjectFromAnySource(Form parent, IHelpTopicProvider helpTopicProvider, out ObtainedProjectType obtainedProjectType)
{
bool dummy;
string fwdataFileFullPathname;
var success = FLExBridgeHelper.LaunchFieldworksBridge(FwDirectoryFinder.ProjectsDirectory, null, FLExBridgeHelper.Obtain, null,
FDOBackendProvider.ModelVersion, "0.13", null, null, out dummy, out fwdataFileFullPathname);
if (!success)
{
ReportDuplicateBridge();
obtainedProjectType = ObtainedProjectType.None;
return null;
}
if (string.IsNullOrWhiteSpace(fwdataFileFullPathname))
{
obtainedProjectType = ObtainedProjectType.None;
return null; // user canceled.
}
obtainedProjectType = ObtainedProjectType.FieldWorks;
if (fwdataFileFullPathname.EndsWith("lift"))
{
fwdataFileFullPathname = CreateProjectFromLift(parent, helpTopicProvider, fwdataFileFullPathname);
obtainedProjectType = ObtainedProjectType.Lift;
}
EnsureLinkedFoldersExist(fwdataFileFullPathname);
return fwdataFileFullPathname;
}
示例7: Initialize
public void Initialize(FdoCache cache, IHelpTopicProvider helpTopicProvider,
IApp app, IVwStylesheet stylesheet, NotebookImportWiz.CharMapping charMapping)
{
m_cache = cache;
m_helpTopicProvider = helpTopicProvider;
m_app = app;
m_stylesheet = stylesheet;
if (charMapping == null)
{
m_tbBeginMkr.Text = String.Empty;
m_tbEndMkr.Text = String.Empty;
m_rbEndOfWord.Checked = false;
m_rbEndOfField.Checked = true;
FillWritingSystemCombo(null);
FillStylesCombo(null);
m_chkIgnore.Checked = false;
}
else
{
m_tbBeginMkr.Text = charMapping.BeginMarker;
m_tbEndMkr.Text = charMapping.EndMarker;
m_rbEndOfWord.Checked = charMapping.EndWithWord;
m_rbEndOfField.Checked = !charMapping.EndWithWord;
FillWritingSystemCombo(charMapping.DestinationWritingSystemId);
FillStylesCombo(charMapping.DestinationStyle);
m_chkIgnore.Checked = charMapping.IgnoreMarkerOnImport;
}
}
示例8: BookPropertiesDialog
/// ------------------------------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="BookPropertiesDialog"/> class.
/// </summary>
/// <param name="book">the current book</param>
/// <param name="stylesheet">The stylesheet.</param>
/// <param name="helpTopicProvider">The help topic provider.</param>
/// ------------------------------------------------------------------------------------
public BookPropertiesDialog(IScrBook book, IVwStylesheet stylesheet, IHelpTopicProvider helpTopicProvider)
{
m_currentBook = book;
m_helpTopicProvider = helpTopicProvider;
// TE-5663: make sure the book's name and abbreviation are updated if some were added
IScrRefSystem scrRefSystem = book.Cache.ServiceLocator.GetInstance<IScrRefSystemRepository>().AllInstances().FirstOrDefault();
book.Name.MergeAlternatives(scrRefSystem.BooksOS[book.CanonicalNum - 1].BookName);
book.Abbrev.MergeAlternatives(scrRefSystem.BooksOS[book.CanonicalNum - 1].BookAbbrev);
//
// Required for Windows Form Designer support
//
InitializeComponent();
// Put the book name in the dialog caption
Text = string.Format(Text, book.Name.UserDefaultWritingSystem.Text);
m_listBookInfo.Cache = book.Cache;
m_listBookInfo.FieldsToDisplay.Add(new FwMultilingualPropView.ColumnInfo(
ScrBookTags.kflidName, TeResourceHelper.GetResourceString("kstidBookNameColHeader"), 60));
m_listBookInfo.FieldsToDisplay.Add(new FwMultilingualPropView.ColumnInfo(
ScrBookTags.kflidAbbrev, TeResourceHelper.GetResourceString("kstidBookAbbrevColHeader"), 40));
m_listBookInfo.RootObject = book.Hvo;
foreach (IWritingSystem ws in book.Cache.ServiceLocator.WritingSystems.AllWritingSystems)
m_listBookInfo.WritingSystemsToDisplay.Add(ws.Handle);
// Initialize the ID textbox.
m_txtScrBookIdText.Text = m_currentBook.IdText;
}
示例9: MergeWritingSystemDlg
public MergeWritingSystemDlg(FdoCache cache, IWritingSystem ws, IEnumerable<IWritingSystem> wss, IHelpTopicProvider helpTopicProvider)
{
m_cache = cache;
m_ws = ws;
//
// Required for Windows Form Designer support
//
InitializeComponent();
Icon infoIcon = SystemIcons.Information;
m_infoPictureBox.Image = infoIcon.ToBitmap();
m_infoPictureBox.Size = infoIcon.Size;
foreach (IWritingSystem curWs in wss.Except(new[] { ws }))
m_wsListBox.Items.Add(curWs);
m_wsListBox.SelectedIndex = 0;
m_helpTopicProvider = helpTopicProvider;
if (m_helpTopicProvider != null) // m_helpTopicProvider could be null for testing
{
m_helpProvider = new HelpProvider();
m_helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
m_helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(HelpTopic));
m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
}
}
示例10: ExportRtfDialog
/// ------------------------------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="ExportRtfDialog"/> class.
/// </summary>
/// <param name="cache">The cache.</param>
/// <param name="helpTopicProvider">The help topic provider.</param>
/// ------------------------------------------------------------------------------------
public ExportRtfDialog(FdoCache cache, IHelpTopicProvider helpTopicProvider)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
// If the current settings are for arabic digits then don't show the option
// to export them as arabic.
m_scr = cache.LangProject.TranslatedScriptureOA;
m_helpTopicProvider = helpTopicProvider;
// Set default export folder.
m_rtfFolder = new RegistryStringSetting(
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
"ExportFolderForRTF", FwSubKey.TE);
string fileName = m_rtfFolder.Value;
m_fileDialog = new TeImportExportFileDialog(cache.ProjectId.Name, FileType.RTF);
// Append a filename if it was set to just a directory
if (Directory.Exists(fileName))
fileName = Path.Combine(fileName, m_fileDialog.DefaultFileName);
m_txtOutputFile.Text = fileName;
}
示例11: MultipleFilterDlg
/// ------------------------------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="T:MultipleFilterDlg"/> class.
/// </summary>
/// ------------------------------------------------------------------------------------
public MultipleFilterDlg(FdoCache cache, IHelpTopicProvider helpTopicProviderp,
ICmFilter filter) : this()
{
m_helpTopicProvider = helpTopicProviderp;
m_cache = cache;
m_cellFactory = m_cache.ServiceLocator.GetInstance<ICmCellFactory>();
m_scr = m_cache.LangProject.TranslatedScriptureOA;
m_filter = filter;
// Initialize the enabled status of the group boxes.
chkStatus_CheckedChanged(null, null);
chkType_CheckedChanged(null, null);
chkScrRange_CheckedChanged(null, null);
// Initialize the beginning and ending default Scripture references.
int firstBook = 1;
int lastBook = BCVRef.LastBook;
if (m_scr.ScriptureBooksOS.Count > 0)
{
firstBook = m_scr.ScriptureBooksOS[0].CanonicalNum;
lastBook = m_scr.ScriptureBooksOS[m_scr.ScriptureBooksOS.Count - 1].CanonicalNum;
}
scrBookFrom.Initialize(new ScrReference(firstBook, 1, 1, m_scr.Versification));
scrBookTo.Initialize(new ScrReference(lastBook, 1, 0, m_scr.Versification).LastReferenceForBook);
// Update the controls from the filter in the database.
InitializeFromFilter();
chkCategory.Checked = tvCatagories.Load(m_cache, m_filter, null);
chkCategory_CheckedChanged(null, null);
}
示例12: SimpleIntegerMatchDlg
/// ------------------------------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="SimpleIntegerMatchDlg"/> class.
/// </summary>
/// <param name="helpTopicProvider">The help topic provider.</param>
/// ------------------------------------------------------------------------------------
public SimpleIntegerMatchDlg(IHelpTopicProvider helpTopicProvider) : this()
{
m_helpTopicProvider = helpTopicProvider;
helpProvider1.HelpNamespace = m_helpTopicProvider.HelpFile;
helpProvider1.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic));
helpProvider1.SetHelpNavigator(this, HelpNavigator.Topic);
}
示例13: SetupDlg
public void SetupDlg(IHelpTopicProvider helpTopicProvider, IApp app, FdoCache cache, Sfm2FlexTextMappingBase mappingToModify, IEnumerable<InterlinDestination> destinationsToDisplay)
{
m_helpTopicProvider = helpTopicProvider;
m_app = app;
m_cache = cache;
m_mapping = mappingToModify;
m_destinationsToDisplay = destinationsToDisplay;
SuspendLayout();
// Update the label to show what marker we are modifying
m_destinationLabel.Text = String.Format(m_orginalLabel, mappingToModify.Marker);
// Replace the Add button with a specialized add writing system button
var loc = m_addWritingSystemButton.Location;
var tabIndex = m_addWritingSystemButton.TabIndex;
var text = m_addWritingSystemButton.Text;
Controls.Remove(m_addWritingSystemButton);
m_addWritingSystemButton = new AddWritingSystemButton();
m_addWritingSystemButton.Location = loc;
m_addWritingSystemButton.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
Controls.Add(m_addWritingSystemButton);
m_addWritingSystemButton.TabIndex = tabIndex;
m_addWritingSystemButton.Text = text;
var addWritingSystemButton = ((AddWritingSystemButton)m_addWritingSystemButton);
addWritingSystemButton.Initialize(m_cache, helpTopicProvider, app, null, cache.ServiceLocator.WritingSystems.AllWritingSystems);
addWritingSystemButton.WritingSystemAdded += SfmInterlinearMappingDlg_WritingSystemAdded;
m_destinationsListBox.SelectedIndexChanged += new EventHandler(m_destinationsListBox_SelectedIndexChanged);
LoadConverters(mappingToModify.Converter);
LoadDestinations();
ResumeLayout();
}
示例14: ImportDialog
///-------------------------------------------------------------------------------
/// <summary>
/// Constructor for import dialog, requiring a language project.
/// Use this constructor at run time.
/// </summary>
///-------------------------------------------------------------------------------
public ImportDialog(FwStyleSheet styleSheet, FdoCache cache, IScrImportSet settings,
IHelpTopicProvider helpTopicProvider, IApp app) : this()
{
m_StyleSheet = styleSheet;
m_helpTopicProvider = helpTopicProvider;
m_app = app;
m_scr = cache.LangProject.TranslatedScriptureOA;
m_importSettings = settings;
//InitBookNameList();
// Set the initial values for the controls from the static variables.
radImportEntire.Checked = ImportEntire;
radImportRange.Checked = !ImportEntire;
chkTranslation.Checked = ImportTranslation;
chkBackTranslation.Checked = ImportBackTranslation;
chkBookIntros.Checked = ImportBookIntros;
chkOther.Checked = ImportAnnotations;
// Restore any saved settings.
if (s_StartRef != null)
StartRef = s_StartRef;
else
SetStartRefToFirstImportableBook();
if (s_EndRef != null)
EndRef = s_EndRef;
else
SetEndRefToLastImportableBook();
// Finish constructing the ScrBookControl objects.
InitializeStartAndEndRefControls();
}
示例15: SequenceOptionsDlg
/// ------------------------------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="T:SequenceOptionsDlg"/> class.
/// </summary>
/// <param name="restartSequence">if set to <c>true</c> [restart sequence].</param>
/// <param name="helpTopicProvider">The help topic provider.</param>
/// ------------------------------------------------------------------------------------
public SequenceOptionsDlg(bool restartSequence, IHelpTopicProvider helpTopicProvider)
{
InitializeComponent();
m_helpTopicProvider = helpTopicProvider;
opnRestart.Checked = restartSequence;
opnContinuous.Checked = !restartSequence;
}