/// <summary>
        /// Constructor which initializes properties and using input surveyId like ID of survey.
        /// </summary>
        /// <param name="surveyId">ID of survey.</param>
        public SurveyViewModel(string surveyId)
        {
            ListOfResults = new ObservableCollection<ResultBasicInfo>();
            _operations = new OperationsOnListOfResults(surveyId, ListOfResults);
            SurveyId = surveyId;
            ProgressBar = new ProcessingBar();
            Message = new DialogBox();
            _resultSender = new SendResult();
            _resultSender.SendingCompleted += (object sender, EventArgs args) =>
            {
                System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    SendResult.SendingEventArgs.SendingStatus status = (args as SendResult.SendingEventArgs).Status;
                    string resultId = (args as SendResult.SendingEventArgs).ResultId;
                    switch (status)
                    {
                        case Model.SendResult.SendingEventArgs.SendingStatus.Sent:
                            Message.Show(Languages.AppResources.surveyViewModel_sendingCompleted);
                            _operations.MarkResultAsSent(resultId);
                            break;
                        case Model.SendResult.SendingEventArgs.SendingStatus.ServerError:
                            Message.Show(Languages.AppResources.surveyViewModel_serverError);
                            break;
                        case Model.SendResult.SendingEventArgs.SendingStatus.UnknownError:
                            Message.Show(Languages.AppResources.surveyViewModel_unknownError);
                            break;
                        case Model.SendResult.SendingEventArgs.SendingStatus.Canceled:
                            break;
                    }

                    ProgressBar.IsEnabled = false;
                    SendingInProgress = false;
                });
            };
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 public ResultsFilterViewModel()
 {
     Filter = new ResultsFilter();
     ProgressBar = new ProcessingBar();
     ResultSender = new SendResult();
 }
 /// <summary>
 /// Initializes all necessary data objects.
 /// </summary>
 public DownloadListStatus()
 {
     ProgressBar = new ProcessingBar();
     Message = new DialogBox();
 }
 /// <summary>
 /// Constructor which initializes Survey property and displays idSurvey survey.
 /// </summary>
 /// <param name="idSurvey">Survey ID which will be displayed in preview.</param>
 public PreviewSurveyViewModel(string idSurvey)
 {
     Survey = new Survey();
     Survey.Display(Convert.ToInt32(idSurvey));
     ProgressBar = new ProcessingBar();
 }
 /// <summary>
 /// Initializes all necessary data objects.
 /// </summary>
 public TestConnection()
 {
     Message = new DialogBox();
     Busy = new ProcessingBar(Languages.AppResources.operationsOnRegistration_ProcessingBarInformation);
 }