/// <summary>
        /// Constructor without initialize probabilities
        /// </summary>
        /// <param name="formMain"></param>
        public FormCreateProbabilities(FormMain formMain, bool withoutInit)
        {
            this.listNodes = formMain.listNodes;

            InitializeComponent();
            InitForm();
            IsProbabilityEntered();
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="formMain"></param>
        public FormCreateProbabilities(FormMain formMain)
        {
            this.listNodes = formMain.listNodes;

            InitializeComponent();
            InitProbs();
            InitForm();
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="formMain"></param>
        public FormCreateGraph(FormMain formMain)
        {
            this.formMain       = formMain;
            this.listNodes      = formMain.listNodes;
            this.isGraphChanged = false;

            InitializeComponent();
            RefreshForm();
        }
Exemplo n.º 4
0
        /// <summary>
        /// buttonCreateGraph click event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonCreateGraph_Click(object sender, EventArgs e)
        {
            FormDialogCreate dialogCreate = new FormDialogCreate();

            if (dialogCreate.ShowDialog(this) == DialogResult.Yes)
            {
                listNodes = new BayesianTree();

                changeOrCreateGraphResult();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Perform execute to create or change graph
        /// </summary>
        private void changeOrCreateGraphResult()
        {
            Form         formCreateGraph = new FormCreateGraph(this);
            BayesianTree backupListNodes = new BayesianTree(listNodes);

            this.Hide();
            if (formCreateGraph.ShowDialog() == DialogResult.Abort)
            {
                listNodes = backupListNodes;
            }
            RefreshForm();
            this.Show();
        }
Exemplo n.º 6
0
        /// <summary>
        /// Contructor
        /// </summary>
        /// <param name="LeafOrNot"></param>
        /// <param name="fact_Nodes"></param>
        public FormCreateNode(bool LeafOrNot, BayesianTree fact_Nodes)
        {
            InitializeComponent();

            listChildrenOrParents = new List <Node>();
            this.fact_Nodes       = fact_Nodes;
            if (LeafOrNot)
            {
                labelLeafOrRoot.Text = "Родители";
            }
            else
            {
                labelLeafOrRoot.Text = "Дети";
            }

            foreach (var fact in fact_Nodes.Nodes)
            {
                checkedListBoxConnectedNodes.Items.Add(fact.NameFact);
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// Form constructor
 /// </summary>
 public FormMain()
 {
     listNodes = new BayesianTree();
     InitializeComponent();
     TestListNodes();
 }