Пример #1
0
        public void Init(ExportButton button, Grid mainGrid)
        {
            if (button == null)
            {
                throw new ArgumentNullException("button");
            }

            if (mainGrid == null)
            {
                throw new ArgumentNullException("mainGrid");
            }

            _button   = button;
            _mainGrid = mainGrid;
        }
Пример #2
0
		protected void Init(ExportButton exportBtn, Grid mainGrid, Func<IEnumerableEx> getItems)
		{
			if (exportBtn == null)
				throw new ArgumentNullException("exportBtn");

			if (mainGrid == null)
				throw new ArgumentNullException("mainGrid");

			if (getItems == null)
				throw new ArgumentNullException("getItems");

			_exportBtn = exportBtn;
			_exportBtn.ExportStarted += ExportBtnOnExportStarted;

			dynamic ctrl = this;

			_from = ctrl.FromCtrl;
			_to = ctrl.ToCtrl;
			_drivePanel = ctrl.DrivePanel;

			Progress.Init(_exportBtn, mainGrid);

			From = DateTime.Today - TimeSpan.FromDays(7);
			To = DateTime.Today + TimeSpan.FromDays(1);

			_getItems = getItems;
		}