ACAT.Extensions.Default.UI.Dialogs.ScreenLockForm.ScreenLockForm C# (CSharp) Method

ScreenLockForm() public method

Initializes a new instance of the class.
public ScreenLockForm ( ) : System
return System
        public ScreenLockForm()
        {
            InitializeComponent();

            _syncObj = new SyncLock();

            ShowInTaskbar = false;
            if (!initialize())
            {
                Log.Debug("Initialization error!");
            }

            TopMost = true;

            RoundedCornerControl.CreateRoundedControl(Title);

            Windows.ShowWindowBorder(this, false);

            Windows.SetWindowPosition(this, Windows.WindowPosition.CenterScreen);

            _windowOverlapWatchdog = new WindowOverlapWatchdog(this);

            updateDateTime();

            // Title isn't used on this form, but we keep it hidden instead of removing it
            // so we don't have to modify the IScreenInterface GetTitle() method
            Title.Hide();

            // timer used for displaying the time
            timer.Start();

            FormBorderStyle = FormBorderStyle.None;
            WindowState = FormWindowState.Maximized;

            Load += ScreenLockForm_Load;
            FormClosing += ScreenLockForm_FormClosing;

            var actuator = ActuatorManager.Instance.GetActuator(typeof(KeyboardActuator));
            if (actuator != null)
            {
                _keyboardActuator = actuator as KeyboardActuator;
                if (_keyboardActuator != null)
                {
                    _keyboardActuator.EvtKeyDown += _keyboardActuator_EvtKeyDown;
                    _keyboardActuator.EvtKeyUp += _keyboardActuator_EvtKeyUp;
                }
            }
        }