예제 #1
0
 protected ChartSchemaItem(SerializationInfo info, StreamingContext context)
 {
     try
     {
         int version = info.GetInt32("Version");
         _level = info.GetInt32("Level");
         if (version == 1)
         {
             _items = new Hashtable();
             ChartSchemaItemAmong sia = new ChartSchemaItemAmong();
             sia.ChartXml  = info.GetString("ChartXML");
             sia.Source    = (ArrayList)info.GetValue("Source", typeof(ArrayList));
             sia.OrderType = info.GetInt32("OrderType");
             sia.TopRank   = info.GetInt32("TopRank");
             sia.Caption   = U8ResService.GetResStringEx("U8.Report.ChartSchema") + " 1";
             _defaultid    = sia.ID;
             _items.Add(sia.ID, sia);
         }
         else if (version == 2)
         {
             _items     = (Hashtable)info.GetValue("Items", typeof(Hashtable));
             _defaultid = info.GetString("DefaultID");
         }
     }
     catch
     {
     }
 }
예제 #2
0
        private void SetCaptionPostfix(ChartSchemaItemAmong csia)
        {
            ICollection ids   = this.IDs(this.CurrentLevelChart.Level);
            int         index = 1;
            bool        bfind = false;

            while (true)
            {
                bfind = false;
                foreach (string id in ids)
                {
                    ChartSchemaItemAmong tmp = this.CurrentLevelChart[id];
                    if (tmp.Caption == csia.Caption + " " + index.ToString())
                    {
                        bfind = true;
                        index++;
                        break;
                    }
                }
                if (!bfind)
                {
                    csia.Caption += " " + index.ToString();
                    break;
                }
            }
        }
예제 #3
0
        public ChartSchemaItemAmong AddAChart(int level, string id)
        {
            this.SetCurrentLevelChart(level);
            ChartSchemaItemAmong csia = new ChartSchemaItemAmong(this[level, id]);

            csia.Caption = U8ResService.GetResStringEx("U8.Report.ChartSchema");
            SetCaptionPostfix(csia);
            this.CurrentLevelChart.Add(csia);
            return(csia);
        }
예제 #4
0
 public ChartSchemaItemAmong(ChartSchemaItemAmong csia) : this()
 {
     _id       = Guid.NewGuid().ToString();
     _caption  = "";
     _chartxml = csia.ChartXml;
     if (csia.Source == null)
     {
         throw new ResourceReportException("请保存当前方案后复制!");
     }
     _source    = csia.Source.Clone() as ArrayList;
     _ordertype = csia.OrderType;
     _toprank   = csia.TopRank;
 }
예제 #5
0
        private void _chartwizard_SchemaCompleted(int level, string id)
        {
            ChartSchemaItemAmong among = _chartservice.GetSchemaAmongBy(level, id);

            _chartservice.SaveSettings(_chartwizard.WizardPane, among, level);
        }
예제 #6
0
        private void _chartwizard_SchemaCaptionChanged(int level, string id, string caption)
        {
            ChartSchemaItemAmong among = _chartservice.GetSchemaAmongBy(level, id);

            among.Caption = caption;
        }
예제 #7
0
        private SchemaIdentity _chartwizard_AddingSchema(int level)
        {
            ChartSchemaItemAmong among = _chartservice.AddASchema(level);

            return(new SchemaIdentity(among.ID, among.Caption));
        }
예제 #8
0
        private SchemaIdentity _chartwizard_CopySchema(int level, string id)
        {
            ChartSchemaItemAmong among = _chartservice.AddASchema(level, id);

            return(new SchemaIdentity(among.ID, among.Caption));
        }
예제 #9
0
 public void Add(ChartSchemaItemAmong csia)
 {
     _items.Add(csia.ID, csia);
 }