예제 #1
0
        void OnProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            IProgressInformer informer = e.UserState as IProgressInformer;

            StatusMessage    = informer.StatusMessage;
            ProgressBarStyle = informer.Style;

            Status = e.ProgressPercentage;
        }
예제 #2
0
            /// <summary>
            /// Creates a new instance of the <c>ProcessParams</c> class.
            /// </summary>
            /// <param name="profile">Import profile to importing.</param>
            /// <param name="defaultDate">Default date for default initialize imported objects.</param>
            /// <param name="dataProvider">Data provider.</param>
            /// <param name="cancelChecker">Cancellation checker.</param>
            /// <param name="informer">Progress informer.</param>
            public ProcessParams(ImportProfile profile,
                                 DateTime defaultDate,
                                 IDataProvider dataProvider,
                                 ICancellationChecker cancelChecker,
                                 IProgressInformer informer)
            {
                Debug.Assert(null != profile);       // created
                Debug.Assert(null != dataProvider);  // creatde
                Debug.Assert(null != cancelChecker); // created
                Debug.Assert(null != informer);      // created

                Profile       = profile;
                DefaultDate   = defaultDate;
                DataProvider  = dataProvider;
                CancelChecker = cancelChecker;
                Informer      = informer;
            }
예제 #3
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Creates a new instance of the <c>Importer</c> class.
        /// </summary>
        /// <param name="informer">Progress informer.</param>
        public Importer(IProgressInformer informer)
        {
            Debug.Assert(null != informer); // created

            _informer = informer;
        }
예제 #4
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Creates a new instance of the <c>Geocoder</c> class.
        /// </summary>
        /// <param name="informer">Progress informer.</param>
        public Geocoder(IProgressInformer informer)
        {
            Debug.Assert(null != informer); // created

            _informer = informer;
        }
예제 #5
0
            /// <summary>
            /// Creates a new instance of the <c>ProcessParams</c> class.
            /// </summary>
            /// <param name="profile">Import profile to importing.</param>
            /// <param name="defaultDate">Default date for default initialize imported objects.</param>
            /// <param name="dataProvider">Data provider.</param>
            /// <param name="cancelChecker">Cancellation checker.</param>
            /// <param name="informer">Progress informer.</param>
            public ProcessParams(ImportProfile profile,
                                 DateTime defaultDate,
                                 IDataProvider dataProvider,
                                 ICancellationChecker cancelChecker,
                                 IProgressInformer informer)
            {
                Debug.Assert(null != profile); // created
                Debug.Assert(null != dataProvider); // creatde
                Debug.Assert(null != cancelChecker); // created
                Debug.Assert(null != informer); // created

                Profile = profile;
                DefaultDate = defaultDate;
                DataProvider = dataProvider;
                CancelChecker = cancelChecker;
                Informer = informer;
            }