Example #1
0
        /// <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);
            }
        }
Example #2
0
        /// <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;
        }
Example #3
0
        /// <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);
            }
        }