private void Window_Loaded(object sender, RoutedEventArgs e) { /*xyzParameter.Text=sc.read_string("fusion", "xyz"); * abrDistance.Text = sc.read_string("fusion", "abrDistance"); * abrAngle.Text = sc.read_string("fusion", "abrAngle"); * radarDisappearTime.Text = sc.read_string("fusion", "radarMiss"); * AISDisappearTime.Text = sc.read_string("fusion", "AISMiss"); * IMParameter.Text = sc.read_string("fusion", "IM"); * INParameter.Text = sc.read_string("fusion", "IN");*/ FusionParameter fp = new FusionParameter { xyzParameter = (float)double.Parse(sc.read_string("fusion", "xyz")), abrDistance = (float)double.Parse(sc.read_string("fusion", "abrDistance")), abrAngle = (float)double.Parse(sc.read_string("fusion", "abrAngle")), radarMiss = (long)double.Parse(sc.read_string("fusion", "radarMiss")), AISMiss = (long)double.Parse(sc.read_string("fusion", "AISMiss")), IM = (long)double.Parse(sc.read_string("fusion", "IM")), IN = (long)double.Parse(sc.read_string("fusion", "IN")), }; DataContext = fp; prompt.IsChecked = sc.read_bool("fusionRadio", "prompt"); warn.IsChecked = sc.read_bool("fusionRadio", "warn"); RadioB3.IsChecked = sc.read_bool("fusionRadio", "optimal"); RadioB4.IsChecked = sc.read_bool("fusionRadio", "weighted"); RadioB5.IsChecked = sc.read_bool("fusionRadio", "SF"); }
private void Window_Loaded(object sender, RoutedEventArgs e) { FuseParas fus = fuse.GetFuseParas();//查询融合参数,初始化数据 FusionParameter fp = new FusionParameter { xyzParameter = fus.XYZThreshold.ToString(), abrDistance = fus.DisThreshold.ToString(), abrAngle = fus.AngleThreshold.ToString(), radarMiss = fus.RadarDieTime.ToString(), AISMiss = fus.AISDieTime.ToString(), IM = fus.IM.ToString(), IN = fus.IN.ToString(), }; DataContext = fp; if (fus.AlarmThreshold == 1) { prompt.IsChecked = true; warn.IsChecked = false; } else if (fus.AlarmThreshold == 2) { prompt.IsChecked = false; warn.IsChecked = true; } if (fus.EstiArith == 1) { RadioB3.IsChecked = true; RadioB4.IsChecked = false; RadioB5.IsChecked = false; } else if (fus.EstiArith == 2) { RadioB3.IsChecked = false; RadioB4.IsChecked = true; RadioB5.IsChecked = false; } else if (fus.EstiArith == 3) { RadioB3.IsChecked = false; RadioB4.IsChecked = false; RadioB5.IsChecked = true; } }