예제 #1
0
        /// <summary>
        /// Method detaches a progress model. No error occurred if no model attached.
        /// </summary>
        public void DetachModel()
        {
            if (_model != null)
            {
                _model.ProgressTitle = string.Empty;
                _model.ProgressValue = 0;
                _model.ProgressText  = string.Empty;
            }

            _model = null;
        }
예제 #2
0
        /// <summary>
        /// Method attaches a progress model.
        /// Model contains relevant properties to describe the progress status and progress status is showed in other part of the application.
        /// </summary>
        /// <param name="model">Model to attach. All relevant data of progress status will be set into this model.</param>
        public void AttachModel(IProgressBridgeModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            _model = model;
            SetProgressTitle();
            SetProgressText();
            SetProgressValue();
        }