/// <summary>
 /// 执行触发事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void XinlongyuButton_Click(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(_clickEvent))
     {
         EventAssitant.CallEventDerectly(_clickEvent, this);
     }
 }
        /// <summary>
        /// 图片的点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var    selectedItem = MyFlipView.SelectedItem as FlipViewItem;
            string eventText    = string.Format("[\"0.a5({0})\"]", selectedItem.pageId);

            EventAssitant.CallEventDerectly(eventText, this);
        }
 /// <summary>
 /// 页面初始化事件
 /// </summary>
 /// <param name="value"></param>
 public void SetP7(object value)
 {
     if (!object.Equals(value, null) && !string.IsNullOrEmpty(value.ToString()))
     {
         EventAssitant.CallEventDerectly(value.ToString(), this);
     }
 }
예제 #4
0
 /// <summary>
 /// 执行失败进行调用
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="inControl"></param>
 /// <param name="eventText"></param>
 public static void SetP12 <T>(this T inControl, string eventText) where T : IControl
 {
     if (ExcuteClassMethodByname(inControl, "SetP12", eventText) == ReturnConst.CancleReturn)
     {
         EventAssitant.CallEventDerectly(eventText, inControl);
     }
 }
예제 #5
0
        /// <summary>
        /// 设置控件的值
        /// 这个是父类的方法,如果是图片控件什么的,需要自己重新重写一下这个方法
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="inControl"></param>
        /// <param name="text"></param>
        public static void SetD0 <T>(this T inControl, object value) where T : IControl
        {
            //更新一下d0的值
            if (value is string)
            {
                ControlDetailForPage obj = (inControl as FrameworkElement).Tag as ControlDetailForPage;
                obj.d0 = value.ToString();
                (inControl as FrameworkElement).Tag = obj;
            }

            if (ExcuteClassMethodByname(inControl, "SetD0", value) == ReturnConst.CancleReturn)
            {
                //if (!object.Equals(value, null))
                //{
                //    //(inControl as FrameworkElement) = value.ToString();
                //}
            }

            //数据获取后执行的事件
            if (!object.Equals(value, null) && !string.IsNullOrEmpty(value.ToString()))
            {
                if (!string.IsNullOrEmpty(((inControl as FrameworkElement).Tag as ControlDetailForPage).p4))
                {
                    EventAssitant.CallEventDerectly(((inControl as FrameworkElement).Tag as ControlDetailForPage).p4, inControl);
                }
            }
        }
 /// <summary>
 /// 标签的点击事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TxtContent_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     //throw new System.NotImplementedException();
     if (!string.IsNullOrEmpty(_clickEvent))
     {
         EventAssitant.CallEventDerectly(_clickEvent, this);
     }
 }
 /// <summary>
 /// 主值改变事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void XinlongyuCombobox_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (this.SelectedIndex != -1)
     {
         string p9 = (this.Tag as ControlDetailForPage).p9;
         if (!string.IsNullOrEmpty(p9))
         {
             EventAssitant.CallEventDerectly(p9, this);
         }
     }
 }
 public void SetA1(string text)
 {
     try
     {
         DecoderOfControl dct = new DecoderOfControl();
         //dct.CtrlId = int.Parse(this.Name);
         dct.RightDirectValue = (this.Tag as ControlDetailForPage).d0;
         //执行d0sql的数据获取
         if (EventAssitant.dealWithSqlRequest(dct, this))
         {
             //触发后触发的事件
             EventAssitant.CallEventDerectly((this.Tag as ControlDetailForPage).p9, this);
         }
         else
         {
             //触发后触发的事件
             EventAssitant.CallEventDerectly((this.Tag as ControlDetailForPage).p12, this);
         }
     }
     catch (Exception ex)
     {
         Logging.Error("数据控件出错:" + ex.Message);
     }
 }