Ejemplo n.º 1
0
        private void listBoxSelectModel_SelectedIndexChanged(object sender, EventArgs e)
        {
            contentClear();
            string selectModel = listBoxSelectModel.SelectedItem.ToString();

            feigJson = getSelectedReaderJson(selectModel);

            textBoxFeigModel.Text    = selectModel;
            str_conf_model           = selectModel;
            textBoxSupportedICs.Text = Util.StrArrayToStr(feigJson.SupportedICs, ";");
            initCheckBoxComboBoxSupportedProtocols();
            initCheckBoxComboBoxSupportedICs();

            if (feigJson.SetupCommands.Count > 0)
            {
                initCheckBoxComboBoxICsName1();
            }
            if (feigJson.SetupCommands.Count > 1)
            {
                initCheckBoxComboBoxICsName2();
            }
            if (feigJson.SetupCommands.Count > 2)
            {
                initCheckBoxComboBoxICsName3();
            }
        }
Ejemplo n.º 2
0
        private FeigJson CreateFeig(string model)
        {
            List <CommandJson> commandJsonList = new List <CommandJson>();
            CommandJson        temp;

            if (!(str_arr_icName_1 == null || str_arr_icName_1.Length == 0))
            {
                temp.icName    = str_arr_icName_1;
                temp.icCommand = str_arr_command_1;
                commandJsonList.Add(temp);
            }
            if (!(str_arr_icName_2 == null || str_arr_icName_2.Length == 0))
            {
                temp.icName    = str_arr_icName_2;
                temp.icCommand = str_arr_command_2;
                commandJsonList.Add(temp);
            }
            if (!(str_arr_icName_3 == null || str_arr_icName_3.Length == 0))
            {
                temp.icName    = str_arr_icName_3;
                temp.icCommand = str_arr_command_3;
                commandJsonList.Add(temp);
            }
            FeigJson feigJsonTemp = new FeigJson(model, str_arr_conf_protocols, str_arr_conf_ICs, commandJsonList);

            return(feigJsonTemp);
        }
Ejemplo n.º 3
0
        private void initFeigJson()
        {
            readFeigJson = new ReadFeigJson();
            readFeigJson.readFromFile(Form1.jsonPath);
            feigJson = new FeigJson();

            InitComboBoxes();
            InitlistBoxSelectModel();
            toolStripStatusLabel1.Text = "Operation Status";//DateTime.Now.ToShortDateString();
        }
Ejemplo n.º 4
0
        private FeigJson getSelectedReaderJson(string selectedModel)
        {
            FeigJson feig_temp = new FeigJson();

            foreach (FeigJson temp in readFeigJson.feigJsonList.ReaderConfig)
            {
                if (string.Equals(temp.Model, selectedModel))
                {
                    feig_temp = temp;
                    return(feig_temp);
                }
            }
            return(null);
        }
Ejemplo n.º 5
0
        private void deleteFeig(string model)
        {
            feigJson = getSelectedReaderJson(model);

            readFeigJson.feigJsonList.ReaderConfig.Remove(feigJson);
        }