コード例 #1
0
        // CONSTRUCTORS
        public MainViewModel()
        {
            rand = new System.Random();

            A    = null;
            B    = null;
            algo = new Models.Algorithm();

            p      = null;
            a      = null;
            smallX = null;
            smallY = null;
            bigX   = null;
            bigY   = null;
            k1     = null;
            k2     = null;

            #region Commands
            generatePA = new RelayCommand(GeneratePAMethod);
            sendPA     = new RelayCommand(SendPAMethod, IsPSetted);
            generateX  = new RelayCommand(GenerateXMethod, IsABSetted);
            generateY  = new RelayCommand(GenerateYMethod, IsABSetted);
            sendX      = new RelayCommand(SendXMethod, IsABSetted);
            sendY      = new RelayCommand(SendYMethod, IsABSetted);
            #endregion
        }
コード例 #2
0
        private void ClearAll()
        {
            A = null;
            B = null;

            SmallX = null;
            SmallY = null;

            ClearValue();
        }
コード例 #3
0
        private void SendPAMethod(object obj)
        {
            A = new Models.Side(p.Value, a.Value);
            B = new Models.Side(p.Value, a.Value);

            SmallX = A.NumPower;
            SmallY = B.NumPower;

            ClearValue();
        }