Exemplo n.º 1
0
        public static void Handle(Tenum key, bool?isChecked)
        {
            var m = new ButtonMessage <Tenum>(key);

            m.Checked = isChecked;

            MessageTube.Publish <ButtonMessage>(m);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Button Click handlers would call this method, and Button CommandParameter
        /// is the string of an enum value
        /// </summary>
        public static void HandleButton(Object sender, RoutedEventArgs e)
        {
            Button bu = (Button)sender;
            //object x = bu.CommandParameter; // contains string

            var m = new ButtonMessage <Tenum>(Convert.ToString(bu.CommandParameter));

            MessageTube.Publish <ButtonMessage>(m);
        }
Exemplo n.º 3
0
        public ExGrid()
        {
            InitializeComponent();

            //this.Gridc.EnableOptionalGridControls = false;

            ButtonBus <ExMenuKey> .HookupSubscriber(this.HandleMenuCommand);

            MessageTube.Subscribe <FarewellMessage>(Farewell);

            Loaded += ExGrid_Loaded;
        }
Exemplo n.º 4
0
        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            // but in OnClosed(), note that RestoreBounds is Empty

            base.OnClosing(e);

            try
            {
                SaveBounds();

                MessageTube.Publish(new FarewellMessage());

                FileInfo fi = LayoutFileInfo();
                InvokeSavingPanelLayout(fi);
            }
            catch (Exception ex)
            {
                AbnakiLog.Exception(ex);
            }
        }
Exemplo n.º 5
0
        public MainMenu()
        {
            InitializeComponent();

            MessageTube.Subscribe <FarewellMessage>(Farewell);
        }
Exemplo n.º 6
0
 public static void HookupSubscriber(Action <ButtonMessage <Tenum> > act)
 {
     MessageTube.Subscribe <ButtonMessage, ButtonMessage <Tenum> >(act);
 }