Exemple #1
0
        private void InitQRInput()
        {
            TextBox qrInputTextBox = (TextBox)this.FindName("QRInput");
            Binding binding        = new Binding("CurrentUserQRIndex")
            {
                Mode                = BindingMode.TwoWay,
                Converter           = new ZeroBasedIndexToOneBasedIndex(),
                UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
            };

            ActionViewBase.InitUserInputField(qrInputTextBox, binding, 1, 4, ViewModel.QRInputHandler);
        }
Exemple #2
0
        private void InitRoundInput()
        {
            TextBox roundInputTextBox = (TextBox)this.FindName("RoundInput");
            int     maxRound          = ViewModel.Settings.Rounds;
            Binding binding           = new Binding("CurrentUserRoundIndex")
            {
                Mode                = BindingMode.TwoWay,
                Converter           = new ZeroBasedIndexToOneBasedIndex(),
                UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
            };

            ActionViewBase.InitUserInputField(roundInputTextBox, binding, 1, maxRound, ViewModel.RoundInputHandler);
        }
Exemple #3
0
        private void InitKeystreamBlockInput()
        {
            TextBox keystreamBlockInput = (TextBox)this.FindName("KeystreamBlockInput");
            int     maxKeystreamBlock   = ViewModel.ChaCha.TotalKeystreamBlocks;
            Binding binding             = new Binding("CurrentKeystreamBlockIndex")
            {
                Mode                = BindingMode.TwoWay,
                Converter           = new ZeroBasedIndexToOneBasedIndex(),
                UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
            };

            ActionViewBase.InitUserInputField(keystreamBlockInput, binding, 1, maxKeystreamBlock, ViewModel.KeystreamBlockInputHandler);
        }