Esempio n. 1
0
        private void initFeigJson()
        {
            readFeigJson = new ReadFeigJson();
            readFeigJson.readFromFile(Form1.jsonPath);
            feigJson = new FeigJson();

            InitComboBoxes();
            InitlistBoxSelectModel();
            toolStripStatusLabel1.Text = "Operation Status";//DateTime.Now.ToShortDateString();
        }
Esempio n. 2
0
        public void InitData(bool isNew)
        {
            readFeigJson = new ReadFeigJson();
            if (isNew)
            {
                readFeigJson.createNewJson(jsonPath);
            }
            else
            {
                readFeigJson.readFromFile(jsonPath);//("feig.json");
            }

            if (checkedListBoxSelectIC.Items.Count > 0)
            {
                checkedListBoxSelectIC.Items.Clear();
            }
            if (checkedListBoxSelectReader.Items.Count > 0)
            {
                checkedListBoxSelectReader.Items.Clear();
            }
            if (!string.IsNullOrEmpty(textBoxCommand.Text))
            {
                textBoxCommand.Clear();
            }

            bool isEmpty = !readFeigJson.feigJsonList.ReaderConfig.Any();

            if (isEmpty)
            {
                MessageBox.Show("please check configuration files!");
            }
            else
            {
                labelReadConfigFile.Visible = true;
                checkedListBoxSelectIC.Items.AddRange(readFeigJson.feigJsonList.getICs().ToArray());
            }
        }