My winform app Live Update Architecture

Source: Internet
Author: User

Vs2008, C #

I. Basic Ideas
I have been developing web forms. Recently I tried win form and made a small system. After the first available version was released, the automatic update function was implemented by the way. I have no experience in this area and have not read the relevant materials. I have thought of a simple idea. If you have any jokes, I 'd like to criticize and correct them.
This is basically the case:
The client has two sub-accountsProgramIn short, there are two EXE files, one main application and one Automatic Live Update Program. on the server side, there is a WCF, which provides the program version update information and updates files.
When a program is started (or click "detect Update" manually), the main program calls the server-side WCF detection update. If a new version is detected, the live update program is started and the system is closed.
After Live Update is started, call the server-side WCF to obtain the file list, and then download the Update file directly and overwrite the local file. After the completion, start the main program and close itself. In this way, an automatic update is complete.
Ii. System Architecture

Iii. Sequence Diagram

4. Others
1. Check the new version
In WCF, an xml configuration file is generated for the customer to check the version and update the file.

2. Download and overwrite old files
Live Update files are saved in the Temporary Folder. After the files are downloaded, They overwrite the old files of the main application from the Temporary Folder. Prevent the primary application from being unavailable because automatic update fails.

3. WCF contract (for reference only)

Using System;
Using System. Collections. Generic;
Using System. LINQ;
Using System. text;
Using System. servicemodel;

Namespace Wendyfinance. updatecenter. Contract {

[Servicecontract]
Public   Interface Iautoupdate {

[Operationcontract]
Bool Checkupdate ( String Clientversion );

[Operationcontract]
String Getcurrentversion ();

[Operationcontract]
String Getupdatedescription ();

[Operationcontract]
List < String > Getfilelist ();

[Operationcontract]
String GetFile ( String Filename );
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.