/// <summary> /// opens communication channel with ImageService /// </summary> public void ConnectToService() { bool result; SingletonClient connection = SingletonClient.getInstance; ServiceInfoEventArgs info = connection.ConnectToServer(out result); if (IsServiceConnected = result) { UpdateInfoFromServer(this, info); } }
/// <summary> /// constructor /// </summary> public WebModel() { Handlers = new List <string>(); LogsList = new List <Log>(); SingletonClient connection = SingletonClient.getInstance; connection.ConnectionIsBroken += delegate(object sender, ConnectionArgs args) { IsServiceConnected = false; }; IsServiceConnected = false; }
/// <summary> /// sends a request for deletion of a handler and waits for answer from server. /// </summary> public void CloseHandler() { SingletonClient connection = SingletonClient.getInstance; ServiceInfoEventArgs answer = connection.CloseHandler(new List <string>() { HandlerToDelete }); if (answer.RemovedHandlers.Contains(HandlerToDelete)) { Handlers.Remove(HandlerToDelete); } }