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(); } }
public Repository(IClientWindow window) { AdminApp.IWcfServiceCallback callback = new CallBackClass(window); InstanceContext ic = new InstanceContext(callback); _service = new AdminApp.WcfServiceClient(ic); _service.InitUserAsync(); }
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); }
public CallBackClass(IClientWindow window) { _window = window; }
public RemoteClientWindow (string service_name, IClientWindow window) { this.service_name = service_name; this.window = window; }