source: trunk/PKCS1/OnlineHelp/OnlineHelpAccess.cs @ 1650

Last change on this file since 1650 was 1650, checked in by schomburg, 11 years ago

initial commit of PKCS1 Plugin

File size: 1.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Resources;
6
7namespace PKCS1.OnlineHelp
8{
9    public static class OnlineHelpAccess
10    {
11        private static WindowOnlineHelp wndOnlineHelp;
12
13        static OnlineHelpAccess()
14        {
15        }
16
17    public static void ShowOnlineHelp(OnlineHelpActions action)
18    {
19      WindowOnlineHelp.NavigateTo(action.ToString());
20    }
21
22    private static ResourceManager m_HelpResourceManager;
23    public static ResourceManager HelpResourceManager
24    {
25      get
26      {
27        if(m_HelpResourceManager==null)
28          m_HelpResourceManager =
29            new ResourceManager("PKCS1.OnlineHelp.HelpFiles.Help", typeof(OnlineHelpAccess).Assembly);
30        return m_HelpResourceManager;
31
32      }
33
34    }
35    public static void HelpWindowClosed()
36    {
37      if (wndOnlineHelp != null)
38        wndOnlineHelp.Close();
39      wndOnlineHelp = null;
40    }
41
42    public static bool HelpWindowIsActive
43    {
44      get
45      {
46        return (wndOnlineHelp!=null);
47      }
48    }
49
50    public static void Activate()
51    {
52      if (wndOnlineHelp != null)
53      {
54        wndOnlineHelp.Activate();
55      }
56    }
57    private static WindowOnlineHelp WindowOnlineHelp
58    {
59      get 
60      {
61          if (wndOnlineHelp == null)
62          {
63              wndOnlineHelp = new WindowOnlineHelp();
64          }
65          wndOnlineHelp.OnClose += HelpWindowClosed;
66          return wndOnlineHelp;
67
68      }
69    }
70  }   
71}
Note: See TracBrowser for help on using the repository browser.