예제 #1
0
 protected VATRPWindow(VATRPWindowType wndType)
 {
     IsActivated = false;
     WindowType = wndType;
     DestroyOnClosing = false;
     moveDetectionTimer = new System.Timers.Timer {AutoReset = false, Interval = 1000};
     moveDetectionTimer.Elapsed += OnMoveTimerElapsed;
 }
예제 #2
0
 protected VATRPWindow(VATRPWindowType wndType)
 {
     IsActivated        = false;
     WindowType         = wndType;
     DestroyOnClosing   = false;
     moveDetectionTimer = new System.Timers.Timer {
         AutoReset = false, Interval = 1000
     };
     moveDetectionTimer.Elapsed += OnMoveTimerElapsed;
 }
예제 #3
0
        private static Configuration.ConfSection ConfSectionFromWindow(VATRPWindowType wndType)
        {
            switch (wndType)
            {
            case VATRPWindowType.CALL_VIEW:
                return(Configuration.ConfSection.CALL_WINDOW);

            case VATRPWindowType.CONTACT_VIEW:
                return(Configuration.ConfSection.CONTACT_WINDOW);

            case VATRPWindowType.DIALPAD_VIEW:
                return(Configuration.ConfSection.DIALPAD_WINDOW);

            case VATRPWindowType.MAIN_VIEW:
                return(Configuration.ConfSection.MAIN_WINDOW);

            case VATRPWindowType.MESSAGE_VIEW:
                return(Configuration.ConfSection.MESSAGE_WINDOW);

            case VATRPWindowType.RECENTS_VIEW:
                return(Configuration.ConfSection.HISTORY_WINDOW);

            case VATRPWindowType.SELF_VIEW:
                return(Configuration.ConfSection.SELF_WINDOW);

            case VATRPWindowType.SETTINGS_VIEW:
                return(Configuration.ConfSection.SETTINGS_WINDOW);

            case VATRPWindowType.REMOTE_VIDEO_VIEW:
                return(Configuration.ConfSection.REMOTE_VIDEO_VIEW);

            case VATRPWindowType.KEYPAD_VIEW:
                return(Configuration.ConfSection.KEYPAD_WINDOW);

            case VATRPWindowType.CALL_INFO_VIEW:
                return(Configuration.ConfSection.CALLINFO_WINDOW);

            case VATRPWindowType.AUTHENTICATION_VIEW:
                return(Configuration.ConfSection.AUTHENTICATION_WINDOW);

            default:
                throw new ArgumentOutOfRangeException("wndType");
            }
        }
예제 #4
0
        private static Size GetWindowDefaultDimensions(VATRPWindowType wndType)
        {
            switch (wndType)
            {
            case VATRPWindowType.CALL_VIEW:
                return(new Size()
                {
                    Width = 300, Height = 300
                });

            case VATRPWindowType.CONTACT_VIEW:
                return(new Size()
                {
                    Width = 300, Height = 350
                });

            case VATRPWindowType.DIALPAD_VIEW:
                return(new Size()
                {
                    Width = 400, Height = 450
                });

            case VATRPWindowType.MAIN_VIEW:
                return(new Size()
                {
                    Width = 300, Height = 400
                });

            case VATRPWindowType.MESSAGE_VIEW:
                return(new Size()
                {
                    Width = 700, Height = 400
                });

            case VATRPWindowType.RECENTS_VIEW:
                return(new Size()
                {
                    Width = 300, Height = 500
                });

            case VATRPWindowType.SELF_VIEW:
                return(new Size()
                {
                    Width = 300, Height = 300
                });

            case VATRPWindowType.SETTINGS_VIEW:
                return(new Size()
                {
                    Width = 400, Height = 500
                });

            case VATRPWindowType.REMOTE_VIDEO_VIEW:
                return(new Size()
                {
                    Width = 300, Height = 300
                });

            case VATRPWindowType.KEYPAD_VIEW:
                return(new Size()
                {
                    Width = 100, Height = 400
                });

            case VATRPWindowType.CALL_INFO_VIEW:
                return(new Size()
                {
                    Width = 350, Height = 500
                });

            case VATRPWindowType.AUTHENTICATION_VIEW:
                return(new Size()
                {
                    Width = 200, Height = 100
                });

            default:
                return(new Size()
                {
                    Width = 300, Height = 400
                });
            }
        }
예제 #5
0
        private static Point GetWindowDefaultCoordinates(VATRPWindowType wndType)
        {
            switch (wndType)
            {
            case VATRPWindowType.CALL_VIEW:
                return(new Point()
                {
                    X = 100, Y = 100
                });

            case VATRPWindowType.CONTACT_VIEW:
                return(new Point()
                {
                    X = 300, Y = 100
                });

            case VATRPWindowType.DIALPAD_VIEW:
                return(new Point()
                {
                    X = 100, Y = 100
                });

            case VATRPWindowType.MAIN_VIEW:
            {
                int top = (int)(SystemParameters.PrimaryScreenHeight - 720) / 2;
                if (top < 0)
                {
                    top = 0;
                }
                return(new Point()
                    {
                        X = 300, Y = top
                    });
            }

            case VATRPWindowType.MESSAGE_VIEW:
                return(new Point()
                {
                    X = 300, Y = 100
                });

            case VATRPWindowType.RECENTS_VIEW:
                return(new Point()
                {
                    X = 500, Y = 100
                });

            case VATRPWindowType.SELF_VIEW:
                return(new Point()
                {
                    X = 100, Y = 400
                });

            case VATRPWindowType.SETTINGS_VIEW:
                return(new Point()
                {
                    X = 100, Y = 400
                });

            case VATRPWindowType.REMOTE_VIDEO_VIEW:
                return(new Point()
                {
                    X = 100, Y = 400
                });

            case VATRPWindowType.KEYPAD_VIEW:
                return(new Point()
                {
                    X = 100, Y = 400
                });

            case VATRPWindowType.CALL_INFO_VIEW:
                return(new Point()
                {
                    X = 200, Y = 500
                });

            case VATRPWindowType.AUTHENTICATION_VIEW:
                return(new Point()
                {
                    X = 200, Y = 500
                });

            default:
                throw new ArgumentOutOfRangeException("wndType");
            }
        }
예제 #6
0
 private static Size GetWindowDefaultDimensions(VATRPWindowType wndType)
 {
     switch (wndType)
     {
         case VATRPWindowType.CALL_VIEW:
             return new Size() {Width = 300, Height = 300};
         case VATRPWindowType.CONTACT_VIEW:
             return new Size() {Width = 300, Height = 350};
         case VATRPWindowType.DIALPAD_VIEW:
             return new Size() {Width = 400, Height = 450};
         case VATRPWindowType.MAIN_VIEW:
             return new Size() {Width = 300, Height = 400};
         case VATRPWindowType.MESSAGE_VIEW:
             return new Size() {Width = 700, Height = 400};
         case VATRPWindowType.RECENTS_VIEW:
             return new Size() {Width = 300, Height = 500};
         case VATRPWindowType.SELF_VIEW:
             return new Size() {Width = 300, Height = 300};
         case VATRPWindowType.SETTINGS_VIEW:
             return new Size() {Width = 400, Height = 500};
         case VATRPWindowType.REMOTE_VIDEO_VIEW:
             return new Size() {Width = 300, Height = 300};
         case VATRPWindowType.KEYPAD_VIEW:
             return new Size() {Width = 100, Height = 400};
         case VATRPWindowType.CALL_INFO_VIEW:
             return new Size() {Width = 350, Height = 500};
         default:
             return new Size() {Width = 300, Height = 400};
     }
 }
예제 #7
0
 private static Point GetWindowDefaultCoordinates(VATRPWindowType wndType)
 {
     switch (wndType)
     {
         case VATRPWindowType.CALL_VIEW:
             return new Point() {X = 100, Y = 100};
         case VATRPWindowType.CONTACT_VIEW:
             return new Point() { X = 300, Y = 100 };
         case VATRPWindowType.DIALPAD_VIEW:
             return new Point() { X = 100, Y = 100 };
         case VATRPWindowType.MAIN_VIEW:
         {
             int top = (int)(SystemParameters.PrimaryScreenHeight - 720)/2;
             if (top < 0)
                 top = 0;
             return new Point() { X = 300, Y = top };
         }
         case VATRPWindowType.MESSAGE_VIEW:
             return new Point() { X = 300, Y = 100 };
         case VATRPWindowType.RECENTS_VIEW:
             return new Point() { X = 500, Y = 100 };
         case VATRPWindowType.SELF_VIEW:
             return new Point() { X = 100, Y = 400 };
         case VATRPWindowType.SETTINGS_VIEW:
             return new Point() { X = 100, Y = 400 };
         case VATRPWindowType.REMOTE_VIDEO_VIEW:
             return new Point() { X = 100, Y = 400 };
         case VATRPWindowType.KEYPAD_VIEW:
             return new Point() { X = 100, Y = 400 };
         case VATRPWindowType.CALL_INFO_VIEW:
             return new Point() { X = 200, Y = 500 };
         default:
             throw new ArgumentOutOfRangeException("wndType");
     }
 }
예제 #8
0
        private static Configuration.ConfSection ConfSectionFromWindow(VATRPWindowType wndType)
        {
            switch (wndType)
            {
                case VATRPWindowType.CALL_VIEW:
                    return Configuration.ConfSection.CALL_WINDOW;
                case VATRPWindowType.CONTACT_VIEW:
                    return Configuration.ConfSection.CONTACT_WINDOW;
                case VATRPWindowType.DIALPAD_VIEW:
                    return Configuration.ConfSection.DIALPAD_WINDOW;
                case VATRPWindowType.MAIN_VIEW:
                    return Configuration.ConfSection.MAIN_WINDOW;
                case VATRPWindowType.MESSAGE_VIEW:
                    return Configuration.ConfSection.MESSAGE_WINDOW;
                case VATRPWindowType.RECENTS_VIEW:
                    return Configuration.ConfSection.HISTORY_WINDOW;
                case VATRPWindowType.SELF_VIEW:
                    return Configuration.ConfSection.SELF_WINDOW;
                case VATRPWindowType.SETTINGS_VIEW:
                    return Configuration.ConfSection.SETTINGS_WINDOW;
                case VATRPWindowType.REMOTE_VIDEO_VIEW:
                    return Configuration.ConfSection.REMOTE_VIDEO_VIEW;
                case VATRPWindowType.KEYPAD_VIEW:
                    return Configuration.ConfSection.KEYPAD_WINDOW;
                case VATRPWindowType.CALL_INFO_VIEW:
                    return Configuration.ConfSection.CALLINFO_WINDOW;

                default:
                    throw new ArgumentOutOfRangeException("wndType");
            }
        }