Ejemplo n.º 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();
        }
Ejemplo n.º 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];
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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;
        }