private void Button_Click(object sender, RoutedEventArgs e)
        {
            //-->弹出页面
            _EventDesigner = Wrapper.CreateControl <FrameworkElement>(AttributeInfo.EventDesigner);
            if (null == _EventDesigner)
            {
                string msg = string.Format("请查看【{0}】复合控件\r\n的【{1}】属性事件配置是否正确", this.ParentControl.GetType().FullName, AttributeInfo.Name);
                Wrapper.ShowDialog(msg);
                return;
            }
            string title = "";

            if (_EventDesigner is IEventDesigner)
            {
                var ed = (_EventDesigner as IEventDesigner);
                ed.CurrentSelectedControl = ParentControl as FrameworkElement;
                ed.IDesignFramework       = IDesignFramework;
                ed.EventName        = MethodName;
                ed.EventControlName = ed.CurrentSelectedControl.Name;
                ed.AttributeInfo    = this.AttributeInfo;
                title = string.Format("现在对【{0}】控件的【{1}】事件设置", ed.EventControlName, ed.EventName);
            }
            XtnChildWindow child = new XtnChildWindow(this.IDesignFramework, _EventDesigner);

            child.Closed += child_Closed;
            child.SetTitle(title);
            child.Show();
        }
Example #2
0
        /// <summary>
        /// 进行参数设置
        /// </summary>
        /// <param name="cmi"></param>
        /// <param name="bac"></param>
        void _ParameterSettings(ContextMenuInfo cmi, XtnBaseActivity bac)
        {
            if (cmi.AssemblyQualifiedName.IsNullOrEmpty())
            {
                return;
            }
            FrameworkElement ui     = Wrapper.CreateControl <FrameworkElement>(cmi.AssemblyQualifiedName);
            ISelectors       select = ui as ISelectors;

            if (null == select)
            {
                return;
            }
            select.IDesignFramework       = this.IDesignFramework;
            select.CurrentContextMenuInfo = cmi;
            select.IActivity        = bac as IActivity;
            select.ActivityName     = bac.Name;
            select.EventControlName = this.EventControlName;
            select.EventName        = this.EventName;
            select.ActivityType     = bac.GetType().Name;
            select.AttributeInfo    = this.AttributeInfo;
            select.CurrentSelectedSetEventControl = this.CurrentSelectedControl;

            //-->弹出窗体来
            XtnChildWindow pcc = new XtnChildWindow(this.IDesignFramework, ui);

            pcc.Closed += pcc_Closed;
            pcc.SetTitle(string.Format("正在对【{0}】控件【{1}】事件参数进行设置...", this.CurrentSelectedControl.Name, this.EventName));
            pcc.Show();
        }
Example #3
0
        /// <summary>
        /// 打开数据库框架
        /// </summary>
        internal void OpenDBFramework()
        {
            DBFramework dbf   = new DBFramework();
            var         child = new XtnChildWindow(this._IDesignFramework, dbf);

            child.Closed += child_Closed;
            child.Show();
        }
Example #4
0
        /// <summary>
        /// 显示
        /// </summary>
        internal void PageView()
        {
            var ui           = Wrapper.LoadXaml <FrameworkElement>(this.txtXaml.Text);
            var childDisplay = new XtnChildWindow(this._IDesignFramework, ui);

            childDisplay.Closed += childDisplay_Closed;
            childDisplay.Show();
        }
        void btnNew_Click(object sender, RoutedEventArgs e)
        {
            XtnCreateEventWorkFlow work  = new XtnCreateEventWorkFlow();
            XtnChildWindow         child = new XtnChildWindow(IDesignFramework, work);

            child.Closed += child_Closed;
            child.SetTitle(string.Format("创建新的事件处理流程"));
            child.Show();
        }
        void child_Closed(object sender, System.EventArgs e)
        {
            XtnChildWindow pcc = sender as XtnChildWindow;

            if (null != pcc)
            {
                pcc.Closed -= child_Closed;
                pcc.Dispose();
            }
        }
Example #7
0
        void pcc_Closed(object sender, EventArgs e)
        {
            XtnChildWindow pcc = sender as XtnChildWindow;

            if (null != pcc)
            {
                pcc.Closed -= pcc_Closed;
                pcc.Dispose();
            }
        }
        void child_Closed(object sender, System.EventArgs e)
        {
            //-->如果是事件的话,得注册事件
            XtnChildWindow child = sender as XtnChildWindow;

            if (null != child)
            {
                child.Closed -= child_Closed;
                child.Dispose();
            }
            GetTextBoxValue();
        }
Example #9
0
        void Button_Click(object sender, RoutedEventArgs e)
        {
            if (UIElementProperty is IUserControl)
            {
                var iuc = UIElementProperty as IUserControl;
                iuc.CurrentSelectedControlName = this.CurrentSelectedControlName;
                iuc.EvaluationContent          = this.EvaluationContent;
            }
            var child = new XtnChildWindow(IDesignFramework, UIElementProperty);

            child.CurrentSelectedControlName = this.CurrentSelectedControlName;
            child.EvaluationContent          = this.EvaluationContent;
            child.Closed += child_Closed;
            child.SetTitle(string.Format("正在对【{0}】控件进行操作...", this.CurrentSelectedControlName));
            child.Show();
        }
 /// <summary>
 ///
 /// </summary>
 public PageFileTree()
 {
     InitializeComponent();
     try
     {
         child                       = new XtnChildWindow(null, pfd);
         this.child.Closed          += child_Closed;
         this.Loaded                += PageFileTree_Loaded;
         this.btnAdd.Click          += btnAdd_Click;
         this.btnModify.Click       += btnModify_Click;
         this.btnDelete.Click       += btnDelete_Click;
         this.btnAddDirectory.Click += btnAddDirectory_Click;
         this.btnRefresh.Click      += btnRefresh_Click;
     }
     catch { }
 }
        void btnModify_Click(object sender, RoutedEventArgs e)
        {
            if (null == SelectedItem)
            {
                Wrapper.ShowDialog("请选择要修改的事件流程。");
                return;
            }
            var edc = SelectedItem;
            XtnCreateEventWorkFlow work = new XtnCreateEventWorkFlow();

            work.SetEventDesignerContent(edc);
            XtnChildWindow modify = new XtnChildWindow(IDesignFramework, work);

            modify.Closed += modify_Closed;
            modify.SetTitle(string.Format("正在修改【{0}】事件流程", edc.EventName));
            modify.Show();
        }