Exemplo n.º 1
0
        public void Initialize()
        {
            try
            {
                prepareCollections();
                trayDelegate         = SysTrayCallback;
                iconDataDelegate     = IconDataCallback;
                trayHostSizeDelegate = TrayHostSizeCallback;

                ExplorerTrayService.Instance.SetSystrayCallback(trayDelegate);
                ExplorerTrayService.Instance.Run();

                TrayService.Instance.SetSystrayCallback(trayDelegate);
                TrayService.Instance.SetIconDataCallback(iconDataDelegate);
                TrayService.Instance.SetTrayHostSizeCallback(trayHostSizeDelegate);
                Handle = TrayService.Instance.Initialize();
                TrayService.Instance.Run();

                // load the shell system tray objects (network, power, etc)
                shellServiceObject = new ShellServiceObject();
                shellServiceObject.Start();
            }
            catch
            {
                IsFailed = true;
            }
        }
Exemplo n.º 2
0
 public void SetTrayHostSizeCallback(TrayHostSizeDelegate theDelegate)
 {
     trayHostSizeDelegate = theDelegate;
 }