public Page_DataGrid(ComViewModel vm)
        {
            InitializeComponent();

            this.DataContext = vm;
            this.vm          = vm;

            save_path = txt_path.Text;

            _Page_Ref_Grid = new Page_Ref_Grid(vm, txt_path.Text);

            Calculate_Ref_Chart_DataPoint();

            _Page_Ref_Chart = new Page_Ref_Chart(vm, list_datapoint);

            pageTransitionControl.ShowPage(_Page_Ref_Grid);

            if (vm.isConnected == false)
            {
                if (vm.Ini_Read("Connection", "Band") == "C Band")
                {
                    vm.Double_Laser_Wavelength = 1523;  //Set wavelength to setup ref value
                }
                else
                {
                    vm.Double_Laser_Wavelength = 1571;
                }
            }
        }
 private void btn_reload_Click(object sender, RoutedEventArgs e)
 {
     _Page_Ref_Grid = new Page_Ref_Grid(vm, txt_path.Text);
     Calculate_Ref_Chart_DataPoint();
     _Page_Ref_Chart = new Page_Ref_Chart(vm, list_datapoint);
     pageTransitionControl.ShowPage(_Page_Ref_Chart);
     save_path = txt_path.Text;
 }
 private void Btn_show_Click(object sender, RoutedEventArgs e)
 {
     if (txt_path.Text == save_path)    //判斷Ref檔路徑是否改變
     {
         pageTransitionControl.ShowPage(_Page_Ref_Grid);
     }
     else
     {
         _Page_Ref_Grid = new Page_Ref_Grid(vm, txt_path.Text);
         pageTransitionControl.ShowPage(_Page_Ref_Grid);
         Calculate_Ref_Chart_DataPoint();
         _Page_Ref_Chart = new Page_Ref_Chart(vm, list_datapoint);
         save_path       = txt_path.Text;
     }
 }