예제 #1
0
 private void StartupInitialize()
 {
     P_Node1.Hide();
     P_Node2.Hide();
     P_Node3.Hide();
     P_Node4.Hide();
     P_Node5.Hide();
 }
예제 #2
0
        public void FillNode2Slot(NM.Node node)
        {
            TB_NodeName2.Text = node.NodeName;
            List <DataType> LocalDataTypes = node.DataTypes;

            TB_DataTypes2.Text = "Type: ";
            for (int i = 0; i < LocalDataTypes.Count(); i++)
            {
                TB_DataTypes2.Text += LocalDataTypes[i].ToString();
            }
            TB_Limits2.Text = "Limits: " + node.LowLimit.ToString() + " < x < " + node.HighLimit.ToString();
            LB_Node2SN.Text = node.SN.ToString();
            if (node.InactiveFlag == true)
            {
                RTB_Node2ColorStatus.BackColor = Color.Maroon;
            }
            else
            {
                RTB_Node2ColorStatus.BackColor = Color.Lime;
            }
            LB_N2Battery.Text = node.BatteryLevel.ToString();
            P_Node2.Show();
        }
예제 #3
0
        public void CleanNodeManagementPage()
        {
            P_Node1.Hide();
            P_Node2.Hide();
            P_Node3.Hide();
            P_Node4.Hide();
            P_Node5.Hide();

            switch (NM.NodeDict.Count)
            {
            case 0:
                P_Node1.Hide();
                P_Node2.Hide();
                P_Node3.Hide();
                P_Node4.Hide();
                P_Node5.Hide();
                TB_NodeName1.Text      = string.Empty;
                TB_DataTypes1.Text     = "Type: ";
                TB_Limits1.Text        = "Limits: Undefined";
                LB_Node1SN.Text        = string.Empty;
                CB_SelectNode1.Checked = false;

                TB_NodeName2.Text      = string.Empty;
                TB_DataTypes2.Text     = "Type: ";
                TB_Limits2.Text        = "Limits: Undefined";
                LB_Node2SN.Text        = string.Empty;
                CB_SelectNode2.Checked = false;

                TB_NodeName3.Text      = string.Empty;
                TB_DataTypes3.Text     = "Type: ";
                TB_Limits3.Text        = "Limits: Undefined";
                LB_Node3SN.Text        = string.Empty;
                CB_SelectNode3.Checked = false;

                TB_NodeName4.Text      = string.Empty;
                TB_DataTypes4.Text     = "Type: ";
                TB_Limits4.Text        = "Limits: Undefined";
                LB_Node4SN.Text        = string.Empty;
                CB_SelectNode4.Checked = false;

                TB_NodeName5.Text      = string.Empty;
                TB_DataTypes5.Text     = "Type: ";
                TB_Limits5.Text        = "Limits: Undefined";
                LB_Node5SN.Text        = string.Empty;
                CB_SelectNode5.Checked = false;
                break;

            case 1:
                P_Node2.Hide();
                P_Node3.Hide();
                P_Node4.Hide();
                P_Node5.Hide();

                CB_SelectNode1.Checked = false;

                TB_NodeName2.Text      = string.Empty;
                TB_DataTypes2.Text     = "Type: ";
                TB_Limits2.Text        = "Limits: Undefined";
                LB_Node2SN.Text        = string.Empty;
                CB_SelectNode2.Checked = false;

                TB_NodeName3.Text      = string.Empty;
                TB_DataTypes3.Text     = "Type: ";
                TB_Limits3.Text        = "Limits: Undefined";
                LB_Node3SN.Text        = string.Empty;
                CB_SelectNode3.Checked = false;

                TB_NodeName4.Text      = string.Empty;
                TB_DataTypes4.Text     = "Type: ";
                TB_Limits4.Text        = "Limits: Undefined";
                LB_Node4SN.Text        = string.Empty;
                CB_SelectNode4.Checked = false;

                TB_NodeName5.Text      = string.Empty;
                TB_DataTypes5.Text     = "Type: ";
                TB_Limits5.Text        = "Limits: Undefined";
                LB_Node5SN.Text        = string.Empty;
                CB_SelectNode5.Checked = false;
                break;

            case 2:
                P_Node3.Hide();
                P_Node4.Hide();
                P_Node5.Hide();

                CB_SelectNode1.Checked = false;
                CB_SelectNode2.Checked = false;

                TB_NodeName3.Text      = string.Empty;
                TB_DataTypes3.Text     = "Type: ";
                TB_Limits3.Text        = "Limits: Undefined";
                LB_Node3SN.Text        = string.Empty;
                CB_SelectNode3.Checked = false;

                TB_NodeName4.Text      = string.Empty;
                TB_DataTypes4.Text     = "Type: ";
                TB_Limits4.Text        = "Limits: Undefined";
                LB_Node4SN.Text        = string.Empty;
                CB_SelectNode4.Checked = false;

                TB_NodeName5.Text      = string.Empty;
                TB_DataTypes5.Text     = "Type: ";
                TB_Limits5.Text        = "Limits: Undefined";
                LB_Node5SN.Text        = string.Empty;
                CB_SelectNode5.Checked = false;
                break;

            case 3:
                P_Node4.Hide();
                P_Node5.Hide();

                CB_SelectNode1.Checked = false;
                CB_SelectNode2.Checked = false;
                CB_SelectNode3.Checked = false;

                TB_NodeName4.Text      = string.Empty;
                TB_DataTypes4.Text     = "Type: ";
                TB_Limits4.Text        = "Limits: Undefined";
                LB_Node4SN.Text        = string.Empty;
                CB_SelectNode4.Checked = false;

                TB_NodeName5.Text      = string.Empty;
                TB_DataTypes5.Text     = "Type: ";
                TB_Limits5.Text        = "Limits: Undefined";
                LB_Node5SN.Text        = string.Empty;
                CB_SelectNode5.Checked = false;
                break;

            case 4:
                P_Node5.Hide();

                CB_SelectNode1.Checked = false;
                CB_SelectNode2.Checked = false;
                CB_SelectNode3.Checked = false;
                CB_SelectNode4.Checked = false;

                TB_NodeName5.Text      = string.Empty;
                TB_DataTypes5.Text     = "Type: ";
                TB_Limits5.Text        = "Limits: Undefined";
                LB_Node5SN.Text        = string.Empty;
                CB_SelectNode5.Checked = false;
                break;

            case 5:
                break;

            default:
                break;
            }
        }