static private GetAppAttribute ( string attributeName ) : string | ||
attributeName | string | |
리턴 | string |
private void CheckApplicationState() { var webClient = new WebClient(); webClient.OpenReadCompleted += (client, arguments) => { if (null == arguments.Error) { try { var serializer = new DataContractJsonSerializer(typeof(CertStatus)); var results = (CertStatus)(serializer.ReadObject(arguments.Result)); var currentVersion = App.GetAppAttribute("Version"); if (currentVersion == results.Version) { App.IsCertified = results.IsCertified; } } catch {} } else { } }; App.IsCertified = true; webClient.OpenReadAsync(new Uri("http://freecars.hanseartic.de/cert_status.php?nocache=" + Environment.TickCount, UriKind.Absolute)); }
public About() { InitializeComponent(); DataContext = this; try { Version = App.GetAppAttribute("Version"); } catch { Version = "Error loading Version"; } }