//WebBrowser webBrowser1 = new WebBrowser(); public MainWindow() { var result = ValidateLicence.validateLicnece(); if (result.Contains("Valid:1")) { InitializeComponent(); Consumo consumo = new Consumo(); DataContext = new ConsumoViewModel(consumo); AdditionalProfileInfo adproinfo = new AdditionalProfileInfo(null, null); adproinfo.RefreshProfiles(); frame.Visibility = Visibility.Visible; frame.NavigationService.Navigate(new Dashboardndex()); } else { if (result.Contains("network-related")) { this.Hide(); MessageBox.Show("Please Check Your Internet Connection."); return; } this.Hide(); Licence.Licence win2 = new Dashboard1.Licence.Licence(); win2.Activate(); win2.Show(); } }
private void Bw_CheckLicence(object sender, DoWorkEventArgs e) { string[] param = e.Argument as string[]; var result = ValidateLicence.validateLicnece(); e.Result = result; }