// 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.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SPT.PTZ.Core;

namespace PTZController
{
    public partial class PanasonicMenuForm : SkinForm
    {
        private MenuEventHandler m_menuEvent;

        public MenuEventHandler MenuEvent
        {
            get { return m_menuEvent; }
            set { m_menuEvent = value; }
        }

        public PanasonicMenuForm()
        {
            InitializeComponent();
        }

        private void _closeButton_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void PanasonicMenuForm_Load(object sender, EventArgs e)
        {
            helpProvider1.HelpNamespace = ProductInfo.HelpFile;
            ApplyStyle();
        }

        private void helpButton_Click(object sender, EventArgs e)
        {
            Help.ShowHelp(this, ProductInfo.HelpFile, HelpNavigator.Topic, helpProvider1.GetHelpKeyword(this));
        }

        private void _menuOnButton_Click(object sender, EventArgs e)
        {
            MenuEvent(PtzFunction.MenuOpen, 0);
        }

        private void _menuOffButton_Click(object sender, EventArgs e)
        {
            MenuEvent(PtzFunction.MenuClose, 0);
        }

        private void _set1Button_Click(object sender, EventArgs e)
        {
            MenuEvent(PtzFunction.MenuMove, (int)MenuMoveCommand.set1);
        }

        private void _set2Button_Click(object sender, EventArgs e)
        {
            MenuEvent(PtzFunction.MenuMove, (int)MenuMoveCommand.set2);
        }

        private void _leftButton_Click(object sender, EventArgs e)
        {
            MenuEvent(PtzFunction.MenuMove, (int)MenuMoveCommand.moveLeft);
        }

        private void _upButton_Click(object sender, EventArgs e)
        {
            MenuEvent(PtzFunction.MenuMove, (int)MenuMoveCommand.moveUp);
        }

        private void _rightButton_Click(object sender, EventArgs e)
        {
            MenuEvent(PtzFunction.MenuMove, (int)MenuMoveCommand.moveRight);
        }

        private void _downButton_Click(object sender, EventArgs e)
        {
            MenuEvent(PtzFunction.MenuMove, (int)MenuMoveCommand.moveDown);
        }
    }
}