protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _orgRescalingChoices = LinearScaleRescaleConditionsController.CreateListNodeList(_doc.OrgRescaling);
                _endRescalingChoices = LinearScaleRescaleConditionsController.CreateListNodeList(_doc.EndRescaling);

                _orgRelativeToChoices = new SelectableListNodeList(_doc.OrgRelativeTo);
                _endRelativeToChoices = new SelectableListNodeList(_doc.EndRelativeTo);
            }

            if (null != _view)
            {
                _view.OrgRescaling  = _orgRescalingChoices;
                _view.EndRescaling  = _endRescalingChoices;
                _view.OrgRelativeTo = _orgRelativeToChoices;
                _view.EndRelativeTo = _endRelativeToChoices;

                var org = GetOrgValueToShow();
                var end = GetEndValueToShow();

                if (org is DateTime)
                {
                    _view.OrgValueDT = (DateTime)org;
                    _view.ShowOrgTS  = false;
                }
                else
                {
                    _view.OrgValueTS = (TimeSpan)org;
                    _view.ShowOrgTS  = true;
                }

                if (end is DateTime)
                {
                    _view.EndValueDT = (DateTime)end;
                    _view.ShowEndTS  = false;
                }
                else
                {
                    _view.EndValueTS = (TimeSpan)end;
                    _view.ShowEndTS  = true;
                }
            }
        }
예제 #2
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _orgRescalingChoices = LinearScaleRescaleConditionsController.CreateListNodeList(_doc.OrgRescaling);
                _endRescalingChoices = LinearScaleRescaleConditionsController.CreateListNodeList(_doc.EndRescaling);

                _orgRelativeToChoices = new SelectableListNodeList(_doc.OrgRelativeTo);
                _endRelativeToChoices = new SelectableListNodeList(_doc.EndRelativeTo);
            }

            if (null != _view)
            {
                _view.OrgRescaling  = _orgRescalingChoices;
                _view.EndRescaling  = _endRescalingChoices;
                _view.OrgRelativeTo = _orgRelativeToChoices;
                _view.EndRelativeTo = _endRelativeToChoices;
                _view.OrgValue      = GetOrgValueToShow();
                _view.EndValue      = GetEndValueToShow();
            }
        }