Exemplo n.º 1
0
        private static void HandleWindowCommands(bool present)
        {
            IClientWindow window = DBusServiceManager.FindInstance <IClientWindow> ("/ClientWindow");

            if (window == null)
            {
                return;
            }

            foreach (KeyValuePair <string, string> arg in ApplicationContext.CommandLine.Arguments)
            {
                switch (arg.Key)
                {
                case "show":
                case "present": present = true; break;

                case "hide":
                    present = false;
                    window.Hide();
                    break;
                }
            }

            if (present && !ApplicationContext.CommandLine.Contains("no-present"))
            {
                window.Present();
            }
        }
Exemplo n.º 2
0
 public Repository(IClientWindow window)
 {
     AdminApp.IWcfServiceCallback callback = new CallBackClass(window);
     InstanceContext ic = new InstanceContext(callback);
     _service = new AdminApp.WcfServiceClient(ic);
     _service.InitUserAsync();
 }
Exemplo n.º 3
0
        private static void Open(IWebSocketConnection socket)
        {
            //add our socket to a persistent collection so we can reference later
            allSockets.Add(socket);

            //create a strongly typed sockpuppet
            IClientWindow puppet = SockPuppet.Puppet.New <IClientWindow>(r => socket.Send(r));

            //add it to a dictionary so we can reference by socket id later
            clientWindows.Add(socket.ConnectionInfo.Id, puppet);

            //create a dynamic sockpuppet
            dynamic dynamicPuppet = SockPuppet.Puppet.New(r => socket.Send(r));

            //add it to a dictionary so we can reference by socket id later
            clientDynamicWindows.Add(socket.ConnectionInfo.Id, dynamicPuppet);

            Console.WriteLine("> Socket opened to " + socket.ConnectionInfo.ClientIpAddress);
        }
Exemplo n.º 4
0
 public CallBackClass(IClientWindow window)
 {
     _window = window;
 }
Exemplo n.º 5
0
 public RemoteClientWindow (string service_name, IClientWindow window)
 {
     this.service_name = service_name;
     this.window = window;
 }