EdgeCreateWindow.xaml.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. namespace GraphDrawer
  15. {
  16. /// <summary>
  17. /// Interaction logic for EdgeCreateWindow.xaml
  18. /// </summary>
  19. public partial class EdgeCreateWindow : Window
  20. {
  21. bool focused = false;
  22. public EdgeCreateWindow()
  23. {
  24. InitializeComponent();
  25. }
  26. public int Weight
  27. {
  28. get { return (int)weightSlider.Value; }
  29. }
  30. public Color Color
  31. {
  32. get { return (Color)colorCanvas.SelectedColor; }
  33. }
  34. public bool State
  35. {
  36. get { return focused; }
  37. }
  38. private void focusedBtn_Click(object sender, RoutedEventArgs e)
  39. {
  40. this.DialogResult = true;
  41. focused = true;
  42. }
  43. private void unfocusedBtn_Click(object sender, RoutedEventArgs e)
  44. {
  45. this.DialogResult = true;
  46. focused = false;
  47. }
  48. }
  49. }