Exemplo n.º 1
0
        public void UpdateAsync()
        {
            autoUpdater.checkLoopFinished += (sender, args) =>
            {
                autoUpdater.StopLoop();
            };

            autoUpdater.StartLoop(true, true);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initiates an update check for the application.
        /// </summary>
        /// <returns>True if the update process was started successfully, false otherwise.</returns>
        public void CheckForUpdate()
        {
            _sparkle.StopLoop();

            _sparkle = new Sparkle(
                String.IsNullOrEmpty(ConfigurationManager.AppSettings["appCastUrl"])
                                        ? "http://lstratman.github.io/EasyConnect/updates/EasyConnect.xml"
                                        : ConfigurationManager.AppSettings["appCastUrl"]);
            _sparkle.ApplicationWindowIcon = Icon;
            _sparkle.ApplicationIcon       = Icon.ToBitmap();
            _sparkle.checkLoopFinished    += _sparkle_checkLoopFinished;

            _sparkle.StartLoop(true, true);
        }
Exemplo n.º 3
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     _sparkle.StopLoop();
 }
Exemplo n.º 4
0
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     _sparkle.StopLoop();
     Close();
 }
Exemplo n.º 5
0
 public void Stop()
 {
     m_autoUpdator.StopLoop();
 }
Exemplo n.º 6
0
 /// <summary>
 /// 关闭窗口
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnClose(object sender, RoutedEventArgs e)
 {
     this.TrayIcon.Dispose();
     _sparkle.StopLoop();
     Application.Current.Shutdown();
 }