//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_CheckLicenceCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            var result = e.Result as string;

            if (result.Contains("Valid:1"))
            {
                var days = result.Split('|')[1].Replace("Days:", "");
                txtLicence.Text = "The Licence has " + days.ToString() + " days left";
            }
            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();
            }
        }