public MainWindow() { InitializeComponent(); this.Closing += Window_Closing; ShowHideApp obj = (ShowHideApp)this.WindowGrid.Resources["ShowHide"]; obj.setWindow(this); }
private void Window_Loaded(object sender, RoutedEventArgs e) { App app = (App)Application.Current; var localFolder = app.WorkingDirectory(); var tempFolder = localFolder + "\\tmp"; _recognizer = new zcRecognizer(localFolder, "en_US"); _recognizer.initDefault(); _logger = new Logger(this.Log, this.Scroll); _recognizer.setLogger(_logger); _recognizer.logger().setLogDebug(true); //ComponentDispatcher.ThreadIdle += new EventHandler(OnProcessWork); ShowHideApp obj = (ShowHideApp)this.WindowGrid.Resources["ShowHide"]; obj.hide(); _recognizer.Run(); }