Esempio n. 1
0
        public static Server Start(ApplicationCore applicationCore)
        {
            var serverChannel = new IpcServerChannel("SassTray");
            ChannelServices.RegisterChannel(serverChannel, true);
            var server = new Server(applicationCore);
            RemotingServices.Marshal(server, "Server", typeof(Server));

            return server;
        }
Esempio n. 2
0
        public ApplicationCore(Mutex mutex, String[] args)
        {
            _mutex = mutex;
            _server = Server.Start(this);
            _control = new Control();
            var handle = _control.Handle;

            // Notify Icon
            _notifyIcon.Text = "Sass";
            _notifyIcon.ContextMenu = _contextMenu;
            _notifyIcon.Visible = true;
            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SassTray.SassTray.ico"))
            {
                _notifyIcon.Icon = new Icon(stream);
            }
            UpdateMenu();

            // Events
            Application.ApplicationExit += OnApplicationExit;

            StartWatch(args);
        }