private void Button_Click(object sender, RoutedEventArgs e) { HD.GatherGray(hWindowControl1.HalconWindow, txbGray); }