Ejemplo n.º 1
0
 public static LKLockScreen GetInstance()
 {
     if (lkLockScreen == null)
     {
         lock (locker)
         {
             if (lkLockScreen == null)
             {
                 lkLockScreen = new LKLockScreen();
             }
         }
     }
     return(lkLockScreen);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 时钟事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void timeCycle(object sender, EventArgs e)
        {
            LastInputInfoHook lastInputInfoHook = new LastInputInfoHook();

            if (lastInputInfoHook.NoOpera(MainWindow.VM.SeccondLock * 1000))
            {
                this.WindowState = WindowState.Minimized;
                LKLockScreen lkLockScreen = LKLockScreen.GetInstance();
                lkLockScreen.OnCloseEvent += (s, e2) =>
                {
                    if (s.ToString() == "1")
                    {
                        timeTrigger.Start();
                    }
                };
                lkLockScreen.Activate();
                lkLockScreen.Show();
                timeTrigger.Stop();
            }
        }
Ejemplo n.º 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mw = ((LockScreen.LKLockScreen)(target));
                return;

            case 2:
                this.content = ((System.Windows.Controls.ContentControl)(target));
                return;

            case 3:
                this.screenUnlock = ((LockScreen.UserControls.ucScreenUnlock)(target));
                return;

            case 4:
                this.numUnlock = ((LockScreen.UserControls.ucKeyboard)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 4
0
 protected override void OnClosed(EventArgs e)
 {
     base.OnClosed(e);
     lkLockScreen = null;
 }