/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="isDiagnosticWindowShown"><c>true</c> if a diagnostic window should be shown</param>
 public NetSparkleDiagnostic(bool isDiagnosticWindowShown)
 {
     _isDiagnosticWindowShown = isDiagnosticWindowShown;
     if (_isDiagnosticWindowShown)
     {
         _diagnosticWindow = new NetSparkleMainWindows();
     }
 }
Exemple #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="isDiagnosticWindowShown"><c>true</c> if a diagnostic window should be shown</param>
 public NetSparkleDiagnostic(bool isDiagnosticWindowShown)
 {
     _isDiagnosticWindowShown = isDiagnosticWindowShown;
     if (_isDiagnosticWindowShown)
     {
         _diagnosticWindow = new NetSparkleMainWindows();
     }
 }
Exemple #3
0
        /// <summary>
        /// ctor which needs the appcast url and a referenceassembly
        /// </summary>
        public Sparkle(String appcastUrl, String referenceAssembly, Boolean ShowDiagnostic)
        {
            // preconfige ssl trust
            TrustEverySSLConnection = false;

            // configure ssl cert link
            ServicePointManager.ServerCertificateValidationCallback += RemoteCertificateValidation;

            // enable visual style to ensure that we have XP style or higher
            // also in WPF applications
            System.Windows.Forms.Application.EnableVisualStyles();

            // reset vars
            ApplicationIcon       = null;
            _AppReferenceAssembly = null;

            // set var
            ShowDiagnosticWindow = ShowDiagnostic;

            // create the diagnotic window
            _DiagnosticWindow = new NetSparkleMainWindows();

            // set the reference assembly
            if (referenceAssembly != null)
            {
                _AppReferenceAssembly = referenceAssembly;
                _DiagnosticWindow.Report("Checking the following file: " + _AppReferenceAssembly);
            }

            // show if needed
            ShowDiagnosticWindowIfNeeded();

            // adjust the delegates
            _worker.WorkerReportsProgress = true;
            _worker.DoWork          += new DoWorkEventHandler(_worker_DoWork);
            _worker.ProgressChanged += new ProgressChangedEventHandler(_worker_ProgressChanged);

            // build the wait handle
            _exitHandle    = new EventWaitHandle(false, EventResetMode.AutoReset);
            _loopingHandle = new EventWaitHandle(false, EventResetMode.ManualReset);

            // set the url
            _AppCastUrl = appcastUrl;
            _DiagnosticWindow.Report("Using the following url: " + _AppCastUrl);
        }
Exemple #4
0
        /// <summary>
        /// ctor which needs the appcast url and a referenceassembly
        /// </summary>
        public Sparkle(String appcastUrl, String referenceAssembly, Boolean ShowDiagnostic)
        {
            // enable visual style to ensure that we have XP style or higher
            // also in WPF applications
            Application.EnableVisualStyles();

            // reset vars
            ApplicationIcon       = null;
            _AppReferenceAssembly = null;

            // set var
            ShowDiagnosticWindow = ShowDiagnostic;

            // create the diagnotic window
            _DiagnosticWindow = new NetSparkleMainWindows();

            // show if needed
            ShowDiagnosticWindowIfNeeded();

            // adjust the delegates
            _worker.WorkerReportsProgress = true;
            _worker.DoWork          += _worker_DoWork;
            _worker.ProgressChanged += _worker_ProgressChanged;

            // build the wait handle
            _exitHandle = new EventWaitHandle(false, EventResetMode.AutoReset);

            // set the url
            _AppCastUrl = appcastUrl;
            _DiagnosticWindow.Report("Using the following url: " + _AppCastUrl);

            // set the reference assembly
            if (referenceAssembly != null)
            {
                _AppReferenceAssembly = referenceAssembly;
                _DiagnosticWindow.Report("Checking the following file: " + _AppReferenceAssembly);
            }
        }
Exemple #5
0
        /// <summary>
        /// ctor which needs the appcast url and a referenceassembly
        /// </summary>        
        public Sparkle(String appcastUrl, String referenceAssembly, Boolean ShowDiagnostic)
        {
            // preconfige ssl trust
            TrustEverySSLConnection = false;

            // configure ssl cert link
            ServicePointManager.ServerCertificateValidationCallback += RemoteCertificateValidation;

            // enable visual style to ensure that we have XP style or higher
            // also in WPF applications
            System.Windows.Forms.Application.EnableVisualStyles();

            // reset vars
            ApplicationIcon = null;
            _AppReferenceAssembly = null;

            // set var
            ShowDiagnosticWindow = ShowDiagnostic;

            // create the diagnotic window
            _DiagnosticWindow = new NetSparkleMainWindows();

            // set the reference assembly
            if (referenceAssembly != null)
            {
                _AppReferenceAssembly = referenceAssembly;
                _DiagnosticWindow.Report("Checking the following file: " + _AppReferenceAssembly);
            }

            // show if needed
            ShowDiagnosticWindowIfNeeded();

            // adjust the delegates
            _worker.WorkerReportsProgress = true;
            _worker.DoWork += new DoWorkEventHandler(_worker_DoWork);
            _worker.ProgressChanged += new ProgressChangedEventHandler(_worker_ProgressChanged);

            // build the wait handle
            _exitHandle = new EventWaitHandle(false, EventResetMode.AutoReset);
            _loopingHandle = new EventWaitHandle(false, EventResetMode.ManualReset);

            // set the url
            _AppCastUrl = appcastUrl;
            _DiagnosticWindow.Report("Using the following url: " + _AppCastUrl);
        }
Exemple #6
0
        /// <summary>
        /// ctor which needs the appcast url and a referenceassembly
        /// </summary>        
        public Sparkle(String appcastUrl, String referenceAssembly, Boolean ShowDiagnostic)
        {
            // enable visual style to ensure that we have XP style or higher
            // also in WPF applications
            Application.EnableVisualStyles();

            // reset vars
            ApplicationIcon = null;
            _AppReferenceAssembly = null;

            // set var
            ShowDiagnosticWindow = ShowDiagnostic;

            // create the diagnotic window
            _DiagnosticWindow = new NetSparkleMainWindows();

            // show if needed
            ShowDiagnosticWindowIfNeeded();

            // adjust the delegates
            _worker.WorkerReportsProgress = true;
            _worker.DoWork += _worker_DoWork;
            _worker.ProgressChanged += _worker_ProgressChanged;

            // build the wait handle
            _exitHandle = new EventWaitHandle(false, EventResetMode.AutoReset);

            // set the url
            _AppCastUrl = appcastUrl;
            _DiagnosticWindow.Report("Using the following url: " + _AppCastUrl);

            // set the reference assembly
            if (referenceAssembly != null)
            {
                _AppReferenceAssembly = referenceAssembly;
                _DiagnosticWindow.Report("Checking the following file: " + _AppReferenceAssembly);
            }
        }