コード例 #1
0
        private void buttonExport_Click(object sender, EventArgs e)
        {
            string fileName = @"E:\ToanTV\STM\2.source c#\STM_TestDevice\STM_TestDevice\bin\Debug\ConfigBatery.xlsx";
            // generateReport();
            //TestCopyPasteTextExcell();
            DevicesParser devicesParser = new DevicesParser(fileName);

            devicesParser.Open();

            List <Device> devices = devicesParser.ParseConfigDefine();
            List <Device> detail  = devicesParser.ParseSetupData(devices[0]);

            devicesParser.Close();
        }
コード例 #2
0
        // Event function

        /// <summary>
        /// control setup button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_Click(object sender, EventArgs e)
        {
            //Console.WriteLine("OK");
            Button b = sender as Button;

            if (!String.IsNullOrEmpty(b.Text))
            {
                Device rootDevice = getDeviceByName(b.Text);
                if (rootDevice != null)
                {
                    List <Device> listSetupDetail = mDevicesParser.ParseSetupData(rootDevice);
                    if (listSetupDetail != null)
                    {
                        SinggleSetupControl singgleSetup = new SinggleSetupControl(rootDevice, listSetupDetail);
                        singgleSetup.Show();
                    }
                }
            }
        }