private void Load_Msgbox(string msg) { if (msg.Contains("večerní") && stav == Netopyri.NetopyrVecerni) { AutoClosingMessageBox.Show("Máš štěstí! Ulovil jsi signál netopýra večerního. Víš, že netopýr večerní nemá rád hory, ale zato rád bydlí blízko lidí? \n \nStiskni OK a pokračuj dál v lovu", "Info", correctTime, MessageBoxButton.OK, MessageBoxImage.Information); } else if (msg.Contains("vodní") && stav == Netopyri.NetopyrVodni) { AutoClosingMessageBox.Show("Skvělé! Máš signál netopýra rezavého. Víš, že vytrvalý lezec a na své zimoviště uletí i přes 2000 km? \n \nStiskni OK a pokračuj dál v lovu", "Info", correctTime, MessageBoxButton.OK, MessageBoxImage.Information); } else if (msg.Contains("rezavý") && stav == Netopyri.NetopyrRezavy) { AutoClosingMessageBox.Show("Skvělé! Máš signál netopýra rezavého. Víš, že vytrvalý lezec a na své zimoviště uletí i přes 2000 km? \n \nStiskni OK a pokračuj dál v lovu", "Info", correctTime, MessageBoxButton.OK, MessageBoxImage.Information); } else if (msg.Contains("malý") && stav == Netopyri.VrapenecMaly) { AutoClosingMessageBox.Show("Trefa! Signály, které jsi zaměřil patří vrapenci malému. Víš, že také zimuje v koloniích, ale odděleně, aby se ostátních vrápenců nedotýkal? \n \nStiskni OK a pokračuj dál v lovu", "Info", correctTime, MessageBoxButton.OK, MessageBoxImage.Information); } else { AutoClosingMessageBox.Show("Špatně jsi to naladil, zkus to znovu! ", "Info", errorTime, MessageBoxButton.OK, MessageBoxImage.Error); //MessageBox.Show(, MessageBoxButton.OK, MessageBoxImage.Error); return; } batLabels[stav].Foreground = System.Windows.Media.Brushes.LightGreen; batPics[stav].Visibility = Visibility.Visible; stav = Netopyri.ZadnyNetopyr; }
// naladit private void netopyr_Click(object sender, RoutedEventArgs e) { RefreshTimer(); if (stav != Netopyri.ZadnyNetopyr) { batLabels[stav].Foreground = System.Windows.Media.Brushes.White; } Button b = sender as Button; stav = (Netopyri)b.Tag; batLabels[stav].Foreground = System.Windows.Media.Brushes.Yellow; if (_videoSource.IsRunning == false) { StartCamera(); } }