Пример #1
0
        private static void StartAsApplication()
        {
            SystemHost.StartService();

            var ico = Resources.ServiceIcon;

            ms_TrayIcon = new NotifyIcon
            {
                Text        = @"SCME.NetworkPrinting",
                Icon        = new Icon(ico, ico.Width, ico.Height),
                ContextMenu = new ContextMenu(new[] { new MenuItem(@"Exit", OnExit) }),
                Visible     = true
            };

            Application.ApplicationExit += Application_ApplicationExit;
            Application.Run();
        }
Пример #2
0
        protected override void OnStart(string[] Args)
        {
            base.OnStart(Args);

            SystemHost.StartService();
        }