Beispiel #1
0
        public MainWindowViewModel()
        {
            Pensen p = new Pensen();

            MainModel          = this;
            Table1             = new UserTable1();
            FormulaList        = new System.Collections.ObjectModel.ObservableCollection <FormulaModel>();
            CalculateList      = new System.Collections.ObjectModel.ObservableCollection <FormulaModel>();
            Table1.DataContext = Table1model = new UserTable1Model();
            CommandSubmit      = new RelayCommand(
                () =>
            {
                ReflectionTest();
            });
            CommandFormula = new RelayCommand(
                () =>
            {
                FormulaView.Singleton().Show();
            }
                );
            CommandCalculate = new RelayCommand(
                () =>
            {
                CalculateView.Singleton().Show();
            }
                );
        }
Beispiel #2
0
        private void ReflectionTest()
        {
            string result = TxtCondition;

            if (StartScript())
            {
                global::System.Windows.MessageBox.Show("通过");
            }
            else
            {
                global::System.Windows.MessageBox.Show("没通过验证");
                FormulaView.Singleton().Show();
            }
        }