Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. using System.Windows.Data;
  4. using System.Windows.Media;
  5. using System.Windows.Shapes;
  6. using System.Windows.Input;
  7.  
  8. namespace BlendTutorial
  9. {
  10. /// <summary>
  11. /// Interaction logic for MainWindow.xaml
  12. /// </summary>
  13. public partial class MainWindow : Window
  14. {
  15. public MainWindow()
  16. {
  17. this.InitializeComponent();
  18. }
  19.  
  20. private void AddButton_Click(object sender, RoutedEventArgs e)
  21. {
  22. }
  23.  
  24. private void RemoveButton_Click(object sender, RoutedEventArgs e)
  25. {
  26. }
  27.  
  28. private void ContainerBorder_MouseDown(object sender, MouseButtonEventArgs e)
  29. {
  30. }
  31.  
  32. private void RadioButton_Checked(object sender, RoutedEventArgs e)
  33. {
  34. }
  35. }
  36. }
  37.  
  38. namespace BlendTutorial
  39. {
  40.  
  41. class MainWindow final: public Window
  42. {
  43. public:
  44. MainWindow()
  45. {
  46. InitializeComponent();
  47. }
  48.  
  49. private:
  50. void InitializeComponent()
  51. {
  52. Noesis::GUI::LoadComponent(this, "MainWindow.xaml");
  53. }
  54.  
  55. bool ConnectEvent(BaseComponent* source, const char* event, const char* handler) override
  56. {
  57. NS_CONNECT_EVENT(Button, Click, AddButton_Click);
  58. NS_CONNECT_EVENT(Button, Click, RemoveButton_Click);
  59. NS_CONNECT_EVENT(Border, PreviewMouseLeftButtonDown, ContainerBorder_MouseDown);
  60. NS_CONNECT_ATTACHED_EVENT(ToggleButton, Checked, RadioButton_Checked);
  61. return false;
  62. }
  63.  
  64. void AddButton_Click(BaseComponent*, const RoutedEventArgs&)
  65. {
  66. }
  67.  
  68. void RemoveButton_Click(BaseComponent*, const RoutedEventArgs&)
  69. {
  70. }
  71.  
  72. void ContainerBorder_MouseDown(BaseComponent*, const MouseButtonEventArgs&)
  73. {
  74. }
  75.  
  76. void RadioButton_Checked(BaseComponent*, const RoutedEventArgs&)
  77. {
  78. }
  79.  
  80. NS_IMPLEMENT_INLINE_REFLECTION(MainWindow, Window)
  81. {
  82. NsMeta<TypeId>("BlendTutorial.MainWindow");
  83. }
  84. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement