示例#1
0
 /// <summary>
 /// Ensures that the given lockscreen is shown on screen. (fullscreen prefered.)
 /// </summary>
 /// <param name="lockScreen">The lockscreen form</param>
 public override void Show(LockForm lockScreen)
 {
     lockScreen.WindowState     = FormWindowState.Maximized;
     lockScreen.FormBorderStyle = FormBorderStyle.None;
     lockScreen.TopMost         = true;
     lockScreen.Visible         = true;
     lockScreen.Show();
     lockScreen.Activate();
     Win32.SetWinFullScreen(lockScreen.Handle);
 }
示例#2
0
        public void execute(Form hander)
        {
            MainForm mf = hander as MainForm;

            if (mf != null)
            {
                LockForm lockForm = new LockForm();
                lockForm.ShowDialog();
                mf.barcodeInput.Text = "";
            }
        }
示例#3
0
        /// <summary>
        /// Action sur le bouton Vérouiller
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLock_Click(object sender, EventArgs e)
        {
            LockForm lockForm = new LockForm();

            this.Hide();
            lockForm.ShowDialog();
            DoLogin();
            if (AuthManager.Instance.User == null)
            {
                Application.Exit();
                return;
            }
            this.Show();
        }
示例#4
0
        public void unLockForm()
        {
            lockForm.Hide();
            this.Visible      = true;
            lockForm          = null;
            isLock            = false;
            lockMenuItem.Text = "Lock";

            if (this.WindowState == FormWindowState.Minimized)
            {
                this.WindowState = FormWindowState.Normal;
            }
            this.Activate();
        }
示例#5
0
 private void tool_lock_Click(object sender, EventArgs e)
 {
     if (!isLock || lockForm == null)
     {
         lockForm = new LockForm();
         lockForm.showForm();
         lockForm.Show(this);
     }
     else
     {
         lockForm.showForm();
         lockForm.Show(this);
     }
 }
示例#6
0
        private void MainForm_Shown(object sender, EventArgs e)
        {
            VPNClass = new VPN_Class();
            //클라이언트 cid 서버로부터 받아오기
            //ClientID = "test1";
            string SendMsg = ClientID + "," + isInner;                             //아이디 + 내부 외부 보내서 외부면 vpn로그남김 (isInner bool형. 디버그했을때 실질적인 값 : true -> "True" | false -> "False")

            byte[] SendStringToByteGender = Encoding.UTF8.GetBytes(SendMsg);       // String -> bytes 변환
            mainSocket.CryptoSend(SendStringToByteGender, PacketType.Response);    //서버로 클라이언트 id 보냄
            blindClientCidPacket = mainSocket.CryptoReceive();                     // 서버로부터 cid받아옴
            byte[] data = BlindNetUtil.ByteTrimEndNull(blindClientCidPacket.data); // 넑값 지움
            byte[] tmp  = new byte[4];
            Array.Copy(data, 0, tmp, 0, data.Length);
            uint ClintCID = BitConverter.ToUInt32(tmp, 0);

            if (ClintCID == 0) //서버에서 아이디를 조회못했을때 0반환
            {
                MessageBox.Show("서버로부터 id를 받지 못하였거나 등록되지 않은 아이디입니다." + Environment.NewLine + "\t           관리자에게 문의하십시요.");
                mainSocket.Close();
                Application.Exit();
                return;
            }

            //각 기능 객체 및 Task 생성
            TaskScheduler scheduler = TaskScheduler.Default;

            token = new CancellationTokenSource();

            documentCenter = new Doc_Center(document_Center, isInner);
            documentCenter.Run();
            document_Center.docCenter = documentCenter;

            _ChatMain      = new ChatMain(ClintCID);
            _ChatMain.Dock = DockStyle.Fill;
            MainControlPanel.Controls.Add(_ChatMain);

            //Func
            chat  = new BlindChat(ClintCID, ref _ChatMain, this);
            tChat = Task.Factory.StartNew(() => chat.Run(), token.Token, TaskCreationOptions.LongRunning, scheduler);

            //ScreenLocking
            lockForm = new LockForm(isInner, ClientID);
            lockForm.connect();
            MessageBox.Show("락 연결!");

            deviceDriver  = new DeviceDriverHelper();
            tDeviceDriver = Task.Factory.StartNew(() => deviceDriver.Run(), token.Token, TaskCreationOptions.LongRunning, scheduler);
        }
示例#7
0
 /// <summary>
 /// Ensures that the given lockscreen is shown on screen. (fullscreen prefered.) 
 /// </summary>
 /// <param name="lockScreen">The lockscreen form</param>
 public override void Show(LockForm lockScreen)
 {
     lockScreen.WindowState = FormWindowState.Maximized;
     lockScreen.FormBorderStyle = FormBorderStyle.None;
     lockScreen.TopMost = true;
     lockScreen.Visible = true;
     lockScreen.Show();
     lockScreen.Activate();
     Win32.SetWinFullScreen(lockScreen.Handle);
 }
示例#8
0
 public LockFormPresenter(LockForm view)
 {
     this.view = view;
     service   = new CashierService();
 }
示例#9
0
 /// <summary>
 /// Ensures that the given lockscreen is shown on screen. (fullscreen prefered.) 
 /// </summary>
 /// <param name="lockScreen">The lockscreen form</param>
 public abstract void Show(LockForm lockScreen);
示例#10
0
 /// <summary>
 /// Ensures that the given lockscreen is shown on screen. (fullscreen prefered.)
 /// </summary>
 /// <param name="lockScreen">The lockscreen form</param>
 public abstract void Show(LockForm lockScreen);