Esempio n. 1
0
        public void RoleChangedHandler(object sender, RoutedEventArgs e)
        {
            RootNet rootNet = e.OriginalSource as RootNet;

            if (rootNet != null)
            {
                MessageBox.Show(rootNet.Role);
            }
        }
Esempio n. 2
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            RootNet root = new RootNet()
            {
                Role = "C#"
            };
            RoutedEventArgs arg = new RoutedEventArgs(RootNet.RoleChanged, root);

            button.RaiseEvent(arg);
        }
Esempio n. 3
0
 public Window2()
 {
     InitializeComponent();
     RootNet.AddRoleChangedHandler(this.gridMain, RoleChangedHandler);
 }