public ServerViewModel() { ConsoleService = new ConsoleService(); ServerService = SimpleIoc.Default.GetInstance<ServerService>(); Server = new ServerModel(); ServerService.Initialize( ConsoleService, Server, SimpleIoc.Default.GetInstance<CamerasViewModel>().CamerasModel); ServerService.OnClientAddedHandler += delegate(object sender, EventArgs e) { OnClientAddedEventArgs args = (OnClientAddedEventArgs) e; new ClientViewModel(args.Client); Messenger.Default.Send(new AddClientMessage(args.Client)); }; ServerService.OnClientRemovedHandler += delegate(object sender, EventArgs e) { OnClientRemovedEventArgs args = (OnClientRemovedEventArgs)e; Messenger.Default.Send(new RemoveClientMessage(args.Client)); }; }
public void Initialize(IConsoleService consoleService, ServerModel server, CamerasModel cameras) { base.Initialize(consoleService, server); _cameras = cameras; }
public ServerService(IConsoleService consoleService, ServerModel server, CamerasModel cameras) { Initialize(consoleService, server, cameras); }
public void Initialize(IConsoleService consoleService, ServerModel server) { ConsoleService = consoleService; Server = server; }