// ALL RIGHTS RESERVED:
// ====================
// The contents of this file, and associated files in this directory, are 
// Copyright (C) SPT , all rights reserved, 2009.
// All software Source Code, Images, Database-Design and code, Graphics Design 
// and source files, and related content (collectively referred to as SOURCE) are 
// Copyright (c) SPT, 2009, All Rights Reserved.
// http://SerialPortTool.com

// PTZ Controller is a Registered Trademark of SerialPortTool.com.
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Spt.Share.Data
{
    /// <summary>
    /// Class for hot key representation
    /// </summary>
    public class HotKey
    {
        private bool _altKey;

        public bool AltKey
        {
            get { return _altKey; }
            set { _altKey = value; }
        }

        private bool _shiftKey;

        public bool ShiftKey
        {
            get { return _shiftKey; }
            set { _shiftKey = value; }
        }

        private bool _controlKey;

        public bool ControlKey
        {
            get { return _controlKey; }
            set { _controlKey = value; }
        }

        private Keys _code = Keys.None;

        public Keys Code
        {
            get { return _code; }
            set { _code = value; }
        }

        public HotKey()
        {

        }

        public HotKey(bool alt, bool shift, bool control, Keys code)
        {
            this.AltKey = alt;
            this.ShiftKey = shift;
            this.ControlKey = control;
            this.Code = code;
        }

        public override string ToString()
        {
            string s = "";

            if (ControlKey)
            {
                s += "Control ";
            }

            if (AltKey)
            {
                s += "Alt ";
            }

            if (ShiftKey)
            {
                s += "Shift ";
            }

            s += Code.ToString();

            return s;
        }
    }
}
