Ejemplo n.º 1
0
        private void DealWithApperence()
        {
            if (this != null)
            {
                StatisticalChart control = null;
                if (this is StatisticalChart)
                {
                    control = this as StatisticalChart;
                }

                StatisticalApperence form1 = new StatisticalApperence();
                form1.IsReport    = control.IsReport;
                form1.ChartParent = control as PMSChartCtrl;
                DataSource ds = control.Apperence.Clone();
                form1.SqlSource = control.Apperence;
                if (DialogResult.OK == form1.ShowDialog())
                {
                    Apperence = form1.SqlSource.Clone();
                    control.SelectRecordFields = form1.SqlSource.YAixs;
                    control.XRecordField       = form1.XAixs;
                    if (null != Site)
                    {
                        IComponentChangeService cs = Site.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
                        if (null != cs)
                        {
                            cs.OnComponentChanged(this, null, null, null);
                        }
                    }
                }
                else
                {
                    Apperence = ds;
                }
            }
        }