Check() public method

public Check ( ) : void
return void
示例#1
0
        /// <summary>
        /// Konstruktor główny
        /// </summary>
        /// <param name="user">zalogowany użytkownik</param>
        public StatusesPresenter(UserViewModel user)
        {
            try
            {
                refreshTimeSec = (int) Properties.Settings.Default["RefreshTimeSec"];
                statusesLimit = (int) Properties.Settings.Default["StatusesLimit"];
                webGetTimout = (int) Properties.Settings.Default["WebGetTimoutSec"];
            }
            catch (Exception)
            {
                throw;
            }

            //sprawdzamy parametry
            CheckParameters();

            statusUpdateQueue = new Queue<StatusViewModel>(2*statusesLimit);

            this.blipfaceUser = user;
            blpCom = new BlipCommunication(blipfaceUser.UserName, blipfaceUser.Password, webGetTimout);

            blpCom.StatusesLoaded += new EventHandler<StatusesLoadingEventArgs>(BlpComStatusesLoaded);

            blpCom.MainStatusLoaded += new EventHandler<MainStatusLoadingEventArgs>(BlpComMainStatusLoaded);

            blpCom.StatusesAdded += new EventHandler<EventArgs>(BlpComStatusesAdded);

            blpCom.StatusesUpdated += new EventHandler<StatusesLoadingEventArgs>(BlpComStatusesUpdated);

            blpCom.ExceptionOccure += new EventHandler<ExceptionEventArgs>(BlpComExceptionOccure);

            blpCom.CommunicationError += new EventHandler<CommunicationErrorEventArgs>(BlpComCommunicationError);

            CheckLatestVersion checkLatestVersion = new CheckLatestVersion();
            checkLatestVersion.LatestVersionChecked += new EventHandler<BlipFaceVersionEventArgs>(CheckVersion);
            checkLatestVersion.Check();

            updateStatusTimer = new Timer(refreshTimeSec*1000); //time in milisconds
            updateStatusTimer.Enabled = false;
            updateStatusTimer.Elapsed += new ElapsedEventHandler(UpdateStatusTimerElapsed);
        }