Пример #1
0
        /// <summary>
        /// Add Group of Chart for coordinating with the defined axile to existing group
        /// </summary>
        /// <param name="axile">Which axile for coordinating</param>
        /// <param name="group">Send 'ID' of existing group</param>
        /// <param name="charts">Group of Chart</param>
        public void InsertCoordinator(Axile axile, int group, params Chart[] charts)
        {
            foreach (Coordinated c in coordinated)
            {
                foreach (Chart chart in charts)
                {
                    if (chart.Component == null)
                    {
                        throw new Exception("Chart has not axile component");
                    }
                    else
                    {
                        AxileBase ab = chart.Component as AxileBase;
                        if (ab == null)
                        {
                            throw new Exception("Chart has not axile component");
                        }
                        else
                        {
                            if (c.Contains(chart) && c.Axile == axile)
                            {
                                throw new Exception("Repeat add axile chart");
                            }
                        }
                    }
                }
            }

            SetChartDrawManager(charts);

            coordinated[group].AddRange(charts);
        }
Пример #2
0
        /// <summary>
        /// Add Group of Chart for coordinating with the defined axile
        /// </summary>
        /// <param name="axile">Which axile for coordinating</param>
        /// <param name="charts">Group of Chart</param>
        /// <returns>return 'ID' for add chart to this group later</returns>
        public int AddCoordinatorGroup(Axile axile, params Chart[] charts)
        {
            foreach (Coordinated c in coordinated)
            {
                foreach (Chart chart in charts)
                {
                    if (chart.Component == null)
                    {
                        throw new Exception("Chart has not axile component");
                    }
                    else
                    {
                        AxileBase ab = chart.Component as AxileBase;
                        if (ab == null)
                        {
                            throw new Exception("Chart has not axile component");
                        }
                        else
                        {
                            if (c.Contains(chart) && c.Axile == axile)
                            {
                                throw new Exception("Repeat add axile chart");
                            }
                        }
                    }
                }
            }
            SetChartDrawManager(charts);

            Coordinated co = new Coordinated(axile);

            co.AddRange(charts);
            coordinated.Add(co);

            return(coordinated.Count - 1);
        }
Пример #3
0
 internal Coordinated(Axile axile)
 {
     this.Axile = axile; Charts = new List <Chart>();
 }