Esempio n. 1
0
    public void Start()
    {
        examplesTable = gameObject.GetComponent <ExamplesTable>();
        logout        = gameObject.GetComponent <Logout>();

        float centerY    = 0;
        float partCenter = Screen.height / nodesCount / 2;
        float parts      = Screen.height / nodesCount;

        CreateInputNodes(centerY, partCenter, parts);
        CreateWeightNodes(centerY, partCenter, parts);
        CreateSumNode();
        CreateThresholdNode();
        CreateOutputNode();
        ResetValues();
        examplesTable.DrawExamplesTitle(inputValues.GetLength(1) + 1, inputValues.GetLength(0));
    }
        public GrammarDataSet()
        {
            _tableGrammar = new GrammarTable();
            _tableTopics = new TopicsTable();
            _tableRules = new RulesTable();
            _tableExamples = new ExamplesTable();

            this.Tables.AddRange(new DataTable[] {_tableGrammar, _tableTopics, _tableRules, _tableExamples} );

            AddForeignKey(_tableTopics, _tableTopics, Strings.COL_TOPIC_ID, Strings.COL_PARENT_TOPIC_ID, Strings.FK_TOPICS_TOPICS, true, true);
            AddForeignKey(_tableTopics, _tableRules, Strings.COL_TOPIC_ID, Strings.FK_RULES_TOPICS, true);
            AddForeignKey(_tableRules, _tableExamples, Strings.COL_RULE_ID, Strings.FK_EXAMPLES_RULES, true);

            _tableGrammar.DefaultView.Sort = Strings.COL_GRAMMAR_ID;
            _tableTopics.DefaultView.Sort = "ParentTopicId, Position";
            _tableRules.DefaultView.Sort = "TopicId, Position";
            _tableExamples.DefaultView.Sort = "RuleId, Position";

            this.EnforceConstraints = true;
        }