Ejemplo n.º 1
0
        private void rbtn_alarmConfirm_Click(object sender, EventArgs e)
        {
            try
            {
                //跳转编辑窗口
                SelectMessage form = new SelectMessage();
                form.ShowDialog();

                if (!string.IsNullOrEmpty(form.SendText) && form.m_lTime > 0)
                {
                    addMemo(form.SendText, form.m_lTime);
                    saveMemo(form.SendText, form.m_lTime);
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 2
0
        private void SelectMessage_Received(SelectMessage message)
        {
            if (message.Sender != DataContext)
            {
                return;
            }

            var elem = FindName(message.ElementName);

            if (elem == null)
            {
                return;
            }

            if (elem is FrameworkElement)
            {
                ((FrameworkElement)elem).Focus();
                if (elem is TextBox)
                {
                    ((TextBox)elem).SelectAll();
                }
            }
        }
Ejemplo n.º 3
0
 public Task SendSelectMessage(SelectMessage message)
 {
     return(this.SendMessage(message));
 }