Beispiel #1
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            LatticeManualInputView inputView = new LatticeManualInputView((int)scrollBar.Value, (int)scrollBar.Value, 0, viewModel.PublicKeyB, true, null);

            if (inputView.ShowDialog() != true)
            {
                return;
            }
            viewModel.Dim        = (int)scrollBar.Value;
            viewModel.PublicKeyB = inputView.returnLattice.ToMatrixND();
            viewModel.UpdateTextBoxes();
        }
Beispiel #2
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            LatticeManualInputView inputView = new LatticeManualInputView((int)scrollBar.Value, 0, viewModel.ErrorVector, new List <BigInteger> {
                -1, 1
            });

            if (inputView.ShowDialog() != true)
            {
                return;
            }
            viewModel.ErrorVector = inputView.returnLattice.Vectors[0];
        }
Beispiel #3
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            LatticeManualInputView inputView = new LatticeManualInputView(2, 2, viewModel.Lattice, true, true, 0, null);

            if (inputView.ShowDialog() != true)
            {
                return;
            }
            viewModel.ResetCanvasPosition();
            viewModel.SetLatticeManually(inputView.returnLattice);
            viewModel.CalculatePixelsPerPoint();
            viewModel.GenerateLatticePoints(true, true);
            UpdateTextBoxes();
        }
Beispiel #4
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            LatticeManualInputView inputView = new LatticeManualInputView((int)scrollBarN.Value, (int)scrollBarM.Value, viewModel.Lattice, false, false, 0, null);

            if (inputView.ShowDialog() != true)
            {
                return;
            }
            Cursor = Cursors.Wait;
            viewModel.SetLatticeManually(inputView.returnLattice);

            scrollBarN.Value = viewModel.Lattice.N;
            scrollBarM.Value = viewModel.Lattice.M;
            if (viewModel.Lattice.N == viewModel.Lattice.M)
            {
                scrollBarDim.Value = viewModel.Lattice.N;
            }

            UpdateTextBoxes();
            Cursor = Cursors.Arrow;
        }