Exemplo n.º 1
0
        public bool PopScreenViewInfo(ref int originX, ref int originY, ref int screenSizeWidth,
                                      ref int screenSizeHeight, ref double screenZoom)
        {
            // Pop a view off the view stack if it is available
            lock (screenViewStackLock)
            {
                ScreenViewInfo screenViewInfo = null;

                try
                {
                    screenViewInfo = screenViewStack.Pop();
                }
                catch (Exception exc)
                {
                }

                if (screenViewInfo == null)
                {
                    return(false);
                }

                originX          = screenViewInfo.OriginX;
                originY          = screenViewInfo.OriginY;
                screenSizeWidth  = screenViewInfo.ScreenSizeWidth;
                screenSizeHeight = screenViewInfo.ScreenSizeHeight;
                screenZoom       = screenViewInfo.ScreenZoom;

                return(true);
            }
        }
Exemplo n.º 2
0
        public bool UpdateScreenView(string user_id, int originX, int originY, int screenSizeWidth,
                                     int screenSizeHeight, double screenZoom)
        {
            ScreenViewInfo screenViewInfo = new ScreenViewInfo(originX, originY, screenSizeWidth,
                                                               screenSizeHeight, screenZoom);

            if ((MembershipList == null) || (!MembershipList.Contains(user_id)))
            {
                return(false);
            }

            lock (screenViewLock)
            {
                if (!screenViewMap.ContainsKey(user_id))
                {
                    screenViewMap.Add(user_id, screenViewInfo);
                    return(true);
                }
                else
                {
                    screenViewMap[user_id] = screenViewInfo;
                    return(false);
                }
            }
        }
Exemplo n.º 3
0
        public bool GetScreenViewInfo(string user_id, ref int originX, ref int originY, ref int screenSizeWidth,
                                      ref int screenSizeHeight, ref double screenZoom)
        {
            lock (screenViewLock)
            {
                if (!screenViewMap.ContainsKey(user_id))
                {
                    return(false);
                }
                else
                {
                    ScreenViewInfo screenViewInfo = screenViewMap[user_id];

                    originX          = screenViewInfo.OriginX;
                    originY          = screenViewInfo.OriginY;
                    screenSizeWidth  = screenViewInfo.ScreenSizeWidth;
                    screenSizeHeight = screenViewInfo.ScreenSizeHeight;
                    screenZoom       = screenViewInfo.ScreenZoom;

                    return(true);
                }
            }
        }
Exemplo n.º 4
0
        public bool UpdateScreenView(string user_id, int originX, int originY, int screenSizeWidth,
                                      int screenSizeHeight, double screenZoom)
        {
            ScreenViewInfo screenViewInfo = new ScreenViewInfo(originX, originY, screenSizeWidth,
                                      screenSizeHeight, screenZoom);

            if ((MembershipList == null) || (!MembershipList.Contains(user_id)))
            {
                return false;
            }

            lock (screenViewLock)
            {
                if (!screenViewMap.ContainsKey(user_id))
                {
                    screenViewMap.Add(user_id, screenViewInfo);
                    return true;
                }
                else
                {
                    screenViewMap[user_id] = screenViewInfo;
                    return false;
                }
            }
        }