Пример #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button b = sender as Button;

            switch (b.Content.ToString())
            {
            case "browser": {
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.Filter   = "firmware *.bin|*.bin";
                openFileDialog.Title    = "Select path of file 'tclinux.bin'";
                openFileDialog.FileName = "tclinux.bin";
                if (openFileDialog.ShowDialog() == true)
                {
                    GlobalData.initSetting.DutFwPath = openFileDialog.FileName;
                }
                break;
            }

            case "Lưu cài đặt": {
                //JigFile.set(GlobalData.initSetting.JigNumber);
                GlobalData.initSetting.Save();
                GlobalData.AddTestCase();
                MessageBox.Show("Thành công.", string.Format("Lưu cài đặt-[DUT{0}]", GlobalData.initSetting.StationNumber), MessageBoxButton.OK, MessageBoxImage.Information);
                break;
            }
            }
        }