예제 #1
0
        //public void CompleteDataAdapter( )
        //{

        //  var res = (from item in PropertiesToShow
        //             where item.IsFilter
        //             select item.Name).ToList();
        //  FilterLists = res;
        //}
        #endregion

        /// <summary>
        /// 对象克隆方法
        /// </summary>
        /// <returns>克隆的对象结果</returns>
        public object Clone()
        {
            DataSourceAdaptor adaptor = new DataSourceAdaptor();

            adaptor.FilterLists       = this.FilterLists;
            adaptor.ShowLable         = this.ShowLable;
            adaptor.ShowLegend        = this.ShowLegend;
            adaptor.DataSourceName    = this.DataSourceName;
            adaptor.StatisticsEngName = this.StatisticsEngName;
            adaptor.PropertiesToShow  = PropertiyName.Clone(this.PropertiesToShow);
            adaptor.SOURCEPROVIDER    = this.SOURCEPROVIDER;
            adaptor.Style             = this.Style;
            adaptor.YX     = this.YX;
            adaptor.SortX  = this.SortX;
            adaptor.IsBand = this.IsBand;
            adaptor.Limits = new Limits {
                ColumnLimit = this.Limits.ColumnLimit, Enable = this.Limits.Enable, RowLimit = this.Limits.RowLimit
            };
            return(adaptor);
        }
예제 #2
0
        /// <summary>
        /// 对象克隆
        /// </summary>
        /// <returns>克隆返回的对象</returns>
        public object Clone()
        {
            PropertiyName propertiy = new PropertiyName();

            propertiy.NameOfCaption    = this.NameOfCaption;
            propertiy.Unit             = this.Unit;
            propertiy.xYShaft          = this.xYShaft;
            propertiy.Style            = this.Style;
            propertiy.BandName         = this.BandName;
            propertiy.IsFilter         = this.IsFilter;
            propertiy.IsSelected       = this.IsSelected;
            propertiy.Name             = this.Name;
            propertiy.Caption          = this.Caption;
            propertiy.IsDefaultChecked = this.IsDefaultChecked;
            propertiy.Index            = this.Index;
            propertiy._lineColor       = this._lineColor;
            propertiy.BlnRowKey        = this.BlnRowKey;
            propertiy.BlnColumnRank    = this.BlnColumnRank;
            propertiy.BlnRowGroup      = this.BlnRowGroup;
            propertiy.BlnDateFormat    = this.BlnDateFormat;
            propertiy.FormatString     = this.FormatString;
            return(propertiy);
        }
예제 #3
0
 /// <summary>
 /// 属性名对象克隆
 /// </summary>
 /// <param name="filter">要克隆的对象</param>
 /// <returns>克隆完成的对象</returns>
 public static PropertiyName Clone(PropertiyName filter)
 {
     return((PropertiyName)filter.Clone());
 }
예제 #4
0
 /// <summary>
 /// 属性类克隆
 /// </summary>
 /// <param name="propertyName"></param>
 /// <returns></returns>
 public static PropertiyName Clone(PropertiyName propertyName)
 {
     return((PropertiyName)propertyName.Clone());
 }
예제 #5
0
        /// <summary>
        /// 根据xml配置信息给过滤对象赋值
        /// </summary>
        /// <param name="xml">文本节点</param>
        public void Deserialize(XmlNode xml)
        {
            if (xml == null)
            {
                return;
            }
            XmlDocument Doc = new XmlDocument();

            Doc.LoadXml(xml.OuterXml);
            if (Doc.DocumentElement != null)
            {
                if (Doc.DocumentElement.GetElementsByTagName("DataSourceName")[0] != null)
                {
                    this.DataSourceName = Doc.DocumentElement.GetElementsByTagName("DataSourceName")[0].InnerText;
                }
                if (Doc.DocumentElement.GetElementsByTagName("StatisticsEngName")[0] != null)
                {
                    this.StatisticsEngName = Doc.DocumentElement.GetElementsByTagName("StatisticsEngName")[0].InnerText;
                }
                XmlNodeList          PropertiesToShownodes = Doc.DocumentElement.GetElementsByTagName("PropertiesToShow");
                List <PropertiyName> showpros = new List <PropertiyName>();
                foreach (XmlNode node in PropertiesToShownodes)
                {
                    if (node != null)
                    {
                        PropertiyName speicalDate = new PropertiyName();
                        speicalDate.Deserialize(node);
                        showpros.Add(speicalDate);
                    }
                }
                this.PropertiesToShow = showpros;
                XmlNode XAxisnode = Doc.DocumentElement.GetElementsByTagName("XAxis")[0];
                if (XAxisnode != null)
                {
                }
                XmlNode Limitsnode = Doc.DocumentElement.GetElementsByTagName("Limits")[0];
                if (Limitsnode != null)
                {
                    Limits _limits = new Limits();
                    _limits.Deserialize(Limitsnode);
                    this.Limits = _limits;
                }
            }
            if (xml.Attributes != null)
            {
                if (xml.Attributes["FilterLists"] != null)
                {
                    this.FilterLists.AddRange(xml.Attributes["FilterLists"].Value.Split(new String[] { " " }, StringSplitOptions.RemoveEmptyEntries));
                }
                if (xml.Attributes["ShowLable"] != null)
                {
                    this.ShowLable = xml.Attributes["ShowLable"].Value == "true";
                }
                if (xml.Attributes["ShowLegend"] != null)
                {
                    this.ShowLegend = xml.Attributes["ShowLegend"].Value == "true";
                }
                if (xml.Attributes["YX"] != null)
                {
                    this.YX = xml.Attributes["YX"].Value == "true";
                }
                if (xml.Attributes["IsBand"] != null)
                {
                    this.IsBand = xml.Attributes["IsBand"].Value == "true";
                }
                if (xml.Attributes["SortX"] != null)
                {
                    this.SortX = int.Parse(xml.Attributes["SortX"].Value);
                }
                if (xml.Attributes["SOURCEPROVIDER"] != null)
                {
                    this.SOURCEPROVIDER = (SOURCEPROVIDER)Enum.Parse(typeof(SOURCEPROVIDER), xml.Attributes["SOURCEPROVIDER"].Value);
                }
                if (xml.Attributes["Style"] != null)
                {
                    this.Style = xml.Attributes["Style"].Value;
                }
                //if (xml.Attributes["FilterLists"] != null)
                //    this.FilterLists = xml.Attributes["FilterLists"].Value;
            }
        }