// This file has been autogenerated from a class added in the UI designer.

using System;
using AsReaderDock4;
using Foundation;
using UIKit;

namespace AsReaderDock_VS
{
    public partial class AdminViewController : UIViewController
	{
        AsReaderDockManager dockManager = AsReaderDockManager.sharedInstance();

		public AdminViewController (IntPtr handle) : base (handle)
		{
		}

        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);
        }
        partial void actionPw(NSObject sender)
        {
            if (olPassword.Text == "111111")
            {
                olSegment.Hidden = false;
                olSetMode.Hidden = false;
                olLabelProgMode.Hidden = false;
            }
            olPassword.Text = "";
            View.EndEditing(true);
        }

        partial void actionMode(NSObject sender)
        {
            int mode = (int)olSegment.SelectedSegment;
            bool status = dockManager.rfidDevice.SetReaderProgMode(mode);
        }

        bool checkDeviceBattery()
        {
            float deviceBattery = UIDevice.CurrentDevice.BatteryLevel;
            if ((deviceBattery * 100) > 50)
            {
                return true;
            }
            return false;
        }
	}
}
