コード例 #1
0
        public bool Validate(string dataSourceString, DataSourceProvideArgs args)
        {
            if (args == null || args.WindowEntity == null)
            {
                Debug.Assert(false, "args.WindowEntity 为空");
                return(false);
            }
            WindowEntity window = args.WindowEntity;

            return(window.FindFormElementById(dataSourceString) != null);
        }
コード例 #2
0
        public override void FromXml(string strXml)
        {
            base.FromXml(strXml);
            SEXElement xmlDoc = SEXElement.Parse(strXml);

            this.TargetWindow           = (EnumCallUIElementMethodTargetForm)xmlDoc.GetInnerObject <int>("/TargetWindow", 0);
            this.FormElement            = xmlDoc.GetInnerObject("/FormElement");
            this.FormElementControlType = UIElementEntityTypes.Instance.GetProvideAttribute(xmlDoc.GetInnerObject <int>("/FormElementControlType", -1));
            this.Event     = EventTypes.Instance.GetProvideAttribute(xmlDoc.GetInnerObject <int>("/EventCode", -1));
            this.CallEvent = this.EventTypesAdapter.CreateInstance(
                Convert.ToInt32(xmlDoc.SelectSingleNode("/Event").Attribute("EventCode").Value));
            this.CallEvent.FromXml(xmlDoc.SelectSingleNode("/Event").ToString());
            this.CallEvent.HostFormEntity = this.HostFormEntity;
        }
コード例 #3
0
        public string GetDisplayString(string dataSourceString, DataSourceProvideArgs args)
        {
            if (args == null || args.WindowEntity == null)
            {
                Debug.Assert(false, "args.WindowEntity 为空");
                return(String.Empty);
            }
            WindowEntity window  = args.WindowEntity;
            UIElement    element = window.FindFormElementById(dataSourceString);

            if (element != null)
            {
                return(_language.UIElementDataSoureDisplayString + " " + element.FullName);
            }
            else
            {
                return(String.Empty);
            }
        }
コード例 #4
0
        public DataSourceCollection GetAvailableDataSource(DataSourceProvideArgs args)
        {
            DataSourceCollection collection = new DataSourceCollection();

            if (args == null || args.WindowEntity == null)
            {
                Debug.Assert(false, "args.WindowEntity 为空");
                return(collection);
            }
            WindowEntity window = args.WindowEntity;

            foreach (var item in window.GetFormElement())
            {
                if (item.DataSourceUseable)
                {
                    UIElementDataSoure dataSource = new UIElementDataSoure(item);
                    collection.Add(dataSource);
                }
            }
            return(collection);
        }
コード例 #5
0
 public void Remove(WindowEntity value)
 {
     List.Remove(value);
 }
コード例 #6
0
 public void Insert(int index, WindowEntity value)
 {
     List.Insert(index, value);
 }
コード例 #7
0
 public int IndexOf(WindowEntity value)
 {
     return(List.IndexOf(value));
 }
コード例 #8
0
 public bool Contains(WindowEntity value)
 {
     return(List.Contains(value));
 }
コード例 #9
0
 public int Add(WindowEntity value)
 {
     return(List.Add(value));
 }
コード例 #10
0
 public UIElementCollection(WindowEntity hostFormEntity)
 {
     this._hostFormEntity = hostFormEntity;
 }
コード例 #11
0
 public EventCollection(WindowEntity formEntity, EntityBase hostEntity)
 {
     this._hostFormEntity = formEntity;
     this._hostEntity     = hostEntity;
 }