public MainWindow() { InitializeComponent(); GistogramColor.mainWindow = this; ActionImage.mainWindow = this; image = showImage(); //Отображаем картинку ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image); ActionImage.Standard = image; ActionImage.loadPanel("Стандарт"); }
private void listAction_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (flagInit == true) { ActionImage.loadPanel((listAction.SelectedItem as TextBlock).Text); } else { flagInit = true; } }
private void Button_Click(object sender, RoutedEventArgs e) { Thread thread; string current = (listAction.SelectedItem as TextBlock).Text; switch (current) { case "Чёрно-белый": ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image); thread = new Thread(ActionImage.BlachAndWhite) { IsBackground = true }; thread.Start(); break; case "Стандарт": ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image); thread = new Thread(ActionImage.ColorEqualizer) { IsBackground = true }; thread.Start(); break; case "Негатив": ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image); thread = new Thread(ActionImage.Negative) { IsBackground = true }; thread.Start(); break; case "Оттенки серого": ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image); thread = new Thread(ActionImage.GrayShade) { IsBackground = true }; thread.Start(); break; case "Яркость": ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image); thread = new Thread(ActionImage.Brightness) { IsBackground = true }; thread.Start(); break; case "Контраст": ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image); thread = new Thread(ActionImage.Contrast) { IsBackground = true }; thread.Start(); break; } }