コード例 #1
0
        private void Broadcaster_BroadcastBitLockerControl(BitLockerControlEventArgs args)
        {
            if (Status == (int)SocketStatus.LoggedIn && device.Type == ClientType.Device && args.Device.Account.Id == device.Account.Id)
            {
                if (args.Lock)
                {
                    Utils.SendPacket(SocketStream, PacketFactory.CreateServerBitLockerLockRequest(args.Drive));
                }
                else
                {
                    Utils.SendPacket(SocketStream, PacketFactory.CreateServerBitLockerUnlockRequest(args.Drive, args.Password, CryptoProvider));
                }

                messageQueue.Wait(PacketType.ClientBitLockerCommandResponse);
                args.IsSuccess = (bool)messageQueue.Dequeue().Payload;
            }
        }