Beispiel #1
0
        private void DownloaderThread()
        {
            try{
                clsDownload m_Dwnld;
                clsDownload.enStatusType enStatus;

                m_Dwnld  = new clsDownload();
                enStatus = m_Dwnld.DownloadPrefilledData();
                if (enStatus == clsDownload.enStatusType.Downloaded)
                {
                    niconNotifyBalloon.ShowBalloon("Meticulus FAS", "Download completed successfully.", clsNotifyBalloon.NotifyInfoFlags.None);
                }
                else if (enStatus == clsDownload.enStatusType.GotLatest)
                {
                    niconNotifyBalloon.ShowBalloon("Meticulus FAS", "Downloads are already up to date.", clsNotifyBalloon.NotifyInfoFlags.Info);
                }
                else
                {
                    niconNotifyBalloon.ShowBalloon("Meticulus FAS", "Download error has occurred.\n\nClick here to view the errors.", clsNotifyBalloon.NotifyInfoFlags.Error);
                    SwapIcons();
                }
                m_Utils.DownloadUnLock();
            }catch (Exception e) {
                m_Utils.DownloadUnLock();
                niconNotifyBalloon.ShowBalloon("Meticulus FAS", e.Message + "\n\nClick here to view the errors.", clsNotifyBalloon.NotifyInfoFlags.Error);
            }
        }
        public Download_Service()
        {
            // This call is required by the Windows.Forms Component Designer.
            InitializeComponent();
            // TODO: Add any initialization after the InitComponent call

            m_Utils          = new clsUtils();
            this.ServiceName = m_Utils.GetServiceName();

            m_Dwnld       = new clsDownload();
            m_AppEventLog = null;
            m_Utils.CreateEventLog(EVENT_LOG_SOURCE);
        }
Beispiel #3
0
        public int Download(int manifestNumber)
        {
            Initialise();

            clsDownload.enStatusType enStatus = clsDownload.enStatusType.Failure;
            try
            {
                clsDownload commonDownloader = new clsDownload();
                enStatus = commonDownloader.DownloadSpecificPrefilledData(url, customerCode, siteCode, manifestNumber);
            }
            catch (Exception ex)
            {
                //TODO: Log using Logger class.
                throw ex;
            }
            return((int)enStatus);
        }