Example #1
0
		private void DownloadVersionfile() {
			string fileUrl = Path.Combine( mUrl, VersionFileName );
			if( DownloadFile( fileUrl, VersionFilePath ) == true ) {
				XmlSerializer xml = new XmlSerializer( typeof( SVersionFile ) );
				using( FileStream fs = File.OpenRead( VersionFilePath ) )
					mVersionFile = xml.Deserialize( fs ) as SVersionFile;

				return;
			}

			mVersionFile = null;
		}
Example #2
0
		private void frmMain_Load(object sender, EventArgs e) {
			if (File.Exists(UpdateHandler.VersionFileName) == false) {
				MessageBox.Show("Cant find VersionFile!\nCancel Updating...");
				this.Close();
				return;
			}
			XmlSerializer xml = new XmlSerializer(typeof(SVersionFile));
			using (FileStream fs = File.OpenRead(UpdateHandler.VersionFileName))
				mVersionFile = xml.Deserialize(fs) as SVersionFile;

			this.Text += mVersionFile.ApplicationName;
			StatusRtb.Text += "Initialize Update...\n";
			mBackgroundWorker.RunWorkerAsync();
		}
Example #3
0
        private void DownloadVersionfile()
        {
            string fileUrl = Path.Combine(mUrl, VersionFileName);

            if (DownloadFile(fileUrl, VersionFilePath) == true)
            {
                XmlSerializer xml = new XmlSerializer(typeof(SVersionFile));
                using (FileStream fs = File.OpenRead(VersionFilePath))
                    mVersionFile = xml.Deserialize(fs) as SVersionFile;

                return;
            }

            mVersionFile = null;
        }