private void AddStatement()
        {
            var statementDataList = new List<StatementData>();

            var statementVm = new StatementVm3(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();
            statementView.DataContext = statementVm;
            statementView.ShowDialog();

            if (statementVm.VALID_DATA_FLAG)
            {
                if (statementDataList.Count > 1)
                {
                    var statement = new Statement.StatementCollection();
                    foreach (StatementData statementdata in statementDataList)
                    {

                    }
                }
            }
            else
            {
                MessageBoxResult msgBox = MessageBox.Show("Statement creaton canceled");
            }
        }
        private void AddStatement()
        {
            var statementDataList = new List <StatementData>();

            var statementVm   = new StatementVm3(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();

            statementView.DataContext = statementVm;
            statementView.ShowDialog();

            if (statementVm.VALID_DATA_FLAG)
            {
                if (statementDataList.Count > 1)
                {
                    var statement = new Statement.StatementCollection();
                    foreach (StatementData statementdata in statementDataList)
                    {
                    }
                }
            }
            else
            {
                MessageBoxResult msgBox = MessageBox.Show("Statement creaton canceled");
            }
        }
        private void AddStatement()
        {
            var statementDataList = new List<StatementData>();

            var statementVm = new StatementVm3(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();
            statementView.DataContext = statementVm;
            statementView.ShowDialog();
        }
Пример #4
0
        private void AddStatement()
        {
            var statementDataList = new List <StatementData>();

            var statementVm   = new StatementVm3(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();

            statementView.DataContext = statementVm;
            statementView.ShowDialog();
        }
        private void AddStatement()
        {
            var statementDataList = new List<StatementData>();

            var statementVm = new StatementVm3(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();
            statementView.DataContext = statementVm;
            statementView.ShowDialog();

            foreach (StatementData s in statementDataList)
            {
                Console.WriteLine(s.Signal + s.SignalOrValue + s.ExpressionValue);
            }
        }
        private void AddStatement()
        {
            var statementDataList = new List <StatementData>();

            var statementVm   = new StatementVm3(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();

            statementView.DataContext = statementVm;
            statementView.ShowDialog();

            foreach (StatementData s in statementDataList)
            {
                Console.WriteLine(s.Signal + s.SignalOrValue + s.ExpressionValue);
            }
        }
Пример #7
0
        private void AddStatement()
        {
            var statementDataList = new List <StatementData>();

            var statementVm   = new StatementVm3(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();

            statementView.DataContext = statementVm;
            statementView.ShowDialog();

            if (statementVm.VALID_DATA_FLAG)
            {
                if (statementDataList.Count > 1)
                {
                    var statement = new Statement.StatementCollection();
                    foreach (StatementData statementdata in statementDataList)
                    {
                        switch (statementdata.AlgebraOperator)
                        {
                        case "Or":
                            statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.Or);
                            break;

                        case "And":
                            statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.And);
                            break;

                        default:
                            statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.First);
                            break;
                        }
                    }
                    Statement = statement;
                }
                else
                {
                    Statement = CreateStatement(statementDataList.First());
                }
            }
            else
            {
                MessageBoxResult msgBox = MessageBox.Show("Statement creaton canceled");
            }
        }
Пример #8
0
        private void EditStatement()
        {
            _statementvalueList = new List <StatementValues>();

            var _avalibleSignalsByName = new List <string>();

            foreach (Signal signal in _avalibleSignals)
            {
                _avalibleSignalsByName.Add(signal.Name);
            }

            var statementVm2   = new StatementVm3(_statementvalueList, _avalibleSignalsByName);
            var statementView2 = new Views.StatementWindow3();

            statementView2.DataContext = statementVm2;
            statementView2.ShowDialog();

            if (statementVm2.VALID_DATA_FLAG)
            {
                if (_statementvalueList.Count == 1)
                {
                    //_trigger.AddStatement(CreateStatement(_statementvalueList.ElementAt(0)));

                    StatementString = _trigger.ToString();
                }
                else
                {
                    foreach (StatementValues SV in _statementvalueList)
                    {
                        var compoundstatement = new Statement.StatementCollection();
                    }
                }

                _canSave = true;
                SaveCommand.RaiseCanExecuteChanged();
            }
            else
            {
                StatementString = "";
                _canSave        = false;
                SaveCommand.RaiseCanExecuteChanged();
            }
        }
Пример #9
0
        private void AddStatement()
        {
            var statementDataList = new List <StatementDataModel>();

            var statementVm   = new StatementVm(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();

            statementView.DataContext = statementVm;
            statementView.ShowDialog();

            if (statementVm.IS_SAVED)
            {
                if (statementDataList.Count > 1)
                {
                    var statement = new Statement.StatementCollection();
                    foreach (StatementDataModel statementdata in statementDataList)
                    {
                        switch (statementdata.AlgebraOperator)
                        {
                        case "Or":
                            statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.Or);
                            break;

                        case "And":
                            statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.And);
                            break;

                        default:
                            statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.First);
                            break;
                        }
                    }
                    Statement = statement;
                }
                else
                {
                    Statement = CreateStatement(statementDataList.First());
                }
            }
            else
            {
            }
        }
        private void AddStatement()
        {
            var statementDataList = new List<StatementData>();

            var statementVm = new StatementVm3(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();
            statementView.DataContext = statementVm;
            statementView.ShowDialog();

            if (statementVm.VALID_DATA_FLAG)
            {
                if (statementDataList.Count > 1)
                {
                    var statement = new Statement.StatementCollection();
                    foreach (StatementData statementdata in statementDataList)
                    {
                        switch (statementdata.AlgebraOperator)
                        {
                            case "Or":
                                statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.Or);
                                break;
                            case "And":
                                statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.And);
                                break;
                            default:
                                statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.First);
                                break;
                        }

                    }
                    Statement = statement;
                }
                else
                {
                    Statement = CreateStatement(statementDataList.First());
                }
            }
            else
            {
                MessageBoxResult msgBox = MessageBox.Show("Statement creaton canceled");
            }
        }
        private void EditStatement()
        {
            _statementvalueList = new List<StatementData>();

            var _avalibleSignalsByName = new List<string>();
            foreach (Signal signal in _avalibleSignals)
            {
                _avalibleSignalsByName.Add(signal.Name);
            }

            var statementVm2 = new StatementVm3(_statementvalueList, _avalibleSignalsByName);
            var statementView2 = new Views.StatementWindow3();
            statementView2.DataContext = statementVm2;
            statementView2.ShowDialog();

            if (statementVm2.VALID_DATA_FLAG)
            {
                if (_statementvalueList.Count == 1)
                {
                    //_trigger.AddStatement(CreateStatement(_statementvalueList.ElementAt(0)));

                    StatementString = _trigger.ToString();

                }else
                {
                    foreach (StatementData SV in _statementvalueList)
                    {
                        var compoundstatement = new Statement.StatementCollection();

                    }
                }

                _canSave = true;
                SaveCommand.RaiseCanExecuteChanged();
            }
            else
            {
                StatementString = "";
                _canSave = false;
                SaveCommand.RaiseCanExecuteChanged();

            }
        }
        private void AddStatement()
        {
            var statementDataList = new List<StatementDataModel>();

            var statementVm = new StatementVm(statementDataList, _avalibleSignals);
            var statementView = new Views.StatementWindow3();
            statementView.DataContext = statementVm;
            statementView.ShowDialog();

            if (statementVm.IS_SAVED)
            {
                if (statementDataList.Count > 1)
                {
                    var statement = new Statement.StatementCollection();
                    foreach (StatementDataModel statementdata in statementDataList)
                    {
                        switch (statementdata.AlgebraOperator)
                        {
                            case "Or":
                                statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.Or);
                                break;
                            case "And":
                                statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.And);
                                break;
                            default:
                                statement.AddStatement(CreateStatement(statementdata), LogialAnalyzerTrigger.Statement.LogicalOperators.First);
                                break;
                        }

                    }
                    Statement = statement;
                }
                else
                {
                    Statement = CreateStatement(statementDataList.First());
                }
            }
            else
            {

            }
        }