Esempio n. 1
0
        private void RecycleBin_KeyDown(CoreWindow sender, KeyEventArgs args)
        {
            CoreVirtualKeyStates CtrlState = sender.GetKeyState(VirtualKey.Control);

            switch (args.VirtualKey)
            {
            case VirtualKey.A when CtrlState.HasFlag(CoreVirtualKeyStates.Down):
            {
                ListViewControl.SelectAll();
                break;
            }

            case VirtualKey.Delete when CtrlState.HasFlag(CoreVirtualKeyStates.Down):
            case VirtualKey.D when CtrlState.HasFlag(CoreVirtualKeyStates.Down):
            {
                PermanentDelete_Click(null, null);
                break;
            }
            }
        }
        private void RecycleBin_KeyDown(CoreWindow sender, KeyEventArgs args)
        {
            if (!LoadingControl.IsLoading)
            {
                SelectFlyout.Hide();
                EmptyFlyout.Hide();

                CoreVirtualKeyStates CtrlState = sender.GetKeyState(VirtualKey.Control);

                switch (args.VirtualKey)
                {
                case VirtualKey.A when CtrlState.HasFlag(CoreVirtualKeyStates.Down):
                {
                    ListViewControl.SelectAll();
                    break;
                }

                case VirtualKey.Delete:
                case VirtualKey.D when CtrlState.HasFlag(CoreVirtualKeyStates.Down):
                {
                    PermanentDelete_Click(null, null);
                    break;
                }

                case VirtualKey.R when CtrlState.HasFlag(CoreVirtualKeyStates.Down):
                {
                    RestoreRecycle_Click(null, null);
                    break;
                }

                case VirtualKey.E when CtrlState.HasFlag(CoreVirtualKeyStates.Down):
                {
                    ClearRecycleBin_Click(null, null);
                    break;
                }
                }
            }
        }