예제 #1
0
 static internal void InitSysMenu(System.Windows.Forms.IWin32Window wnd)
 {
     IntPtr sysMenuHandle = About.GetSystemMenu(wnd.Handle, false);
     About.AppendMenu(sysMenuHandle, About.MF_SEPARATOR, new IntPtr(0), string.Empty);
     Assembly crt = Assembly.GetExecutingAssembly();
     object[] attr = crt.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), true);
     AssemblyDescriptionAttribute desc = attr[0] as AssemblyDescriptionAttribute;
     About.AppendMenu(sysMenuHandle, About.MF_STRING, new IntPtr(About.IDM_ABOUT), "About " + desc.Description);
     if (_wndHook == null)
         _wndHook = new MsgHookWindow(wnd);
 }
예제 #2
0
        static internal void InitSysMenu(System.Windows.Forms.IWin32Window wnd)
        {
            IntPtr sysMenuHandle = About.GetSystemMenu(wnd.Handle, false);

            About.AppendMenu(sysMenuHandle, About.MF_SEPARATOR, new IntPtr(0), string.Empty);
            Assembly crt = Assembly.GetExecutingAssembly();

            object[] attr = crt.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), true);
            AssemblyDescriptionAttribute desc = attr[0] as AssemblyDescriptionAttribute;

            About.AppendMenu(sysMenuHandle, About.MF_STRING, new IntPtr(About.IDM_ABOUT), "About " + desc.Description);
            if (_wndHook == null)
            {
                _wndHook = new MsgHookWindow(wnd);
            }
        }
예제 #3
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (components != null)
         {
             components.Dispose();
         }
     }
     if (!disposing)
     {
         if (_wndHook != null)
         {
             _wndHook.Dispose();
         }
         _wndHook = null;
     }
     base.Dispose(disposing);
 }
예제 #4
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (components != null)
         {
             components.Dispose();
         }
     }
     if (!disposing)
     {
         if (_wndHook != null)
             _wndHook.Dispose();
         _wndHook = null;
     }
     base.Dispose(disposing);
 }