Esempio n. 1
0
        private void ShowDate(int type)
        {
            if (_IDate != null)
            {
                GpDate.Controls.Remove(_IDate.Control);
            }

            switch (type)
            {
                case CGtd.TYPE_DATES:
                    if (_UtDates == null)
                    {
                        _UtDates = new UtDates(this);
                        _UtDates.Dock = DockStyle.Fill;
                    }
                    GpDate.Text = "时间";
                    _IDate = _UtDates;
                    break;
                case CGtd.TYPE_EVENT:
                    if (_UtEvent == null)
                    {
                        _UtEvent = new UtEvent();
                        _UtEvent.Dock = DockStyle.Fill;
                    }
                    GpDate.Text = "事件";
                    _IDate = _UtEvent;
                    break;
                case CGtd.TYPE_MATHS:
                    if (_UtMaths == null)
                    {
                        _UtMaths = new UtMaths();
                        _UtMaths.Dock = DockStyle.Fill;
                    }
                    GpDate.Text = "公式";
                    _IDate = _UtMaths;
                    break;
                default:
                    return;
            }

            GpDate.Controls.Add(_IDate.Control);
            _IDate.MGtd = MGtd;
            _IDate.ShowData();
        }