示例#1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            string model_temp = str_conf_model;

            List <string> availableModel_list = Util.strArrayToList(readFeigJson.feigJsonList.AvailableModels);

            availableModel_list.Add(model_temp);
            readFeigJson.feigJsonList.AvailableModels = Util.ListToStrArray(availableModel_list);

            readFeigJson.feigJsonList.ReaderConfig.Add(CreateFeig(str_conf_model));
            List <string> modelList = readFeigJson.feigJsonList.getModels().ToList();

            modelList.Add(model_temp.Trim());
            readFeigJson.writeToFile(Form1.jsonPath);

            initFeigJson();
            toolStripStatusLabel1.Text = model_temp + " is added to file successfully";
        }
示例#2
0
        private void saveAsReaderConfigToolStripMenuItem_Click(object sender, EventArgs e)
        {
            saveFileDialog1        = new SaveFileDialog();
            saveFileDialog1.Filter = "Reader config Files|*.json";
            saveFileDialog1.Title  = "save a Feig json File";
            saveFileDialog1.ShowDialog();

            if (saveFileDialog1.ShowDialog(this) == DialogResult.OK)
            {
                string SaveAsPath = saveFileDialog1.FileName;
                readFeigJson.writeToFile(SaveAsPath);
                labelReadConfigFile.Text = "Reader Config File : " + SaveAsPath;
            }
        }