Example #1
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public ListOfNewSurveysViewModel()
 {
     List = new ObservableCollection <SurveyBasicInfo>();
     DownloadListStatus    = new DownloadListStatus();
     Operations            = new OperationsOnListOfSurveys(List, DownloadListStatus);
     DownloadSurveysStatus = new DownloadSurveysStatus();
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 public ListOfNewSurveysViewModel()
 {
     List = new ObservableCollection<SurveyBasicInfo>();
     DownloadListStatus = new DownloadListStatus();
     Operations = new OperationsOnListOfSurveys(List, DownloadListStatus);
     DownloadSurveysStatus = new DownloadSurveysStatus();
 }
        /// <summary>
        /// Allows you to initialize all necessary data members.
        /// </summary>
        /// <param name="operationsOnList">Instance of <see cref="OperationsOnListOfSurveys" /> class.</param>
        /// <param name="surveysToDownload">List of surveys downloaded with <see cref="CheckForNewSurveyList" /> class.</param>
        /// <param name="downloadStatus">Instance of <see cref="DownloadSurveysStatus" /> class.</param>
        public DownloadNewSurveys(OperationsOnListOfSurveys operationsOnList, List<SurveyBasicInfo> surveysToDownload, DownloadSurveysStatus downloadStatus)
        {
            _operationsOnList = operationsOnList;
            _surveysToDownload = surveysToDownload;
            _downloadStatus = downloadStatus;

            string strIMEI = OperationsOnSettings.Instance.IMEI;
            string strBaseURL = OperationsOnSettings.Instance.ServerURL;

            Random rand = new Random();
            _downloadUrl = string.Format("{0}ReceiveSurveys?do=download&imei={1}&nocache={2}", strBaseURL, strIMEI, rand.Next(50));
            _ackUrl = string.Format("{0}ReceiveSurveys?do=ack&imei={1}&nocache={2}", strBaseURL, strIMEI, rand.Next(50));
        }
Example #4
0
        /// <summary>
        /// Allows you to initialize all necessary data members.
        /// </summary>
        /// <param name="operationsOnList">Instance of <see cref="OperationsOnListOfSurveys" /> class.</param>
        /// <param name="surveysToDownload">List of surveys downloaded with <see cref="CheckForNewSurveyList" /> class.</param>
        /// <param name="downloadStatus">Instance of <see cref="DownloadSurveysStatus" /> class.</param>
        public DownloadNewSurveys(OperationsOnListOfSurveys operationsOnList, List <SurveyBasicInfo> surveysToDownload, DownloadSurveysStatus downloadStatus)
        {
            _operationsOnList  = operationsOnList;
            _surveysToDownload = surveysToDownload;
            _downloadStatus    = downloadStatus;

            string strIMEI    = OperationsOnSettings.Instance.IMEI;
            string strBaseURL = OperationsOnSettings.Instance.ServerURL;

            Random rand = new Random();

            _downloadUrl = string.Format("{0}ReceiveSurveys?do=download&imei={1}&nocache={2}", strBaseURL, strIMEI, rand.Next(50));
            _ackUrl      = string.Format("{0}ReceiveSurveys?do=ack&imei={1}&nocache={2}", strBaseURL, strIMEI, rand.Next(50));
        }