Exemplo n.º 1
0
        //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();
            }
        }
Exemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            Consumo consumo = new Consumo();

            DataContext = new ConsumoViewModel(consumo);
        }
Exemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();
            Data_Initialize();



            Consumo consumo = new Consumo();

            DataContext = new ConsumoViewModel(consumo);

            txt_applicationName.Text = application_name;
            if (RadioButtonDefault == "0")
            {
                RadioBtn_English.IsChecked = true;
            }

            else
            {
                RadioBtn_Bahasa.IsChecked = true;
            }

            /*
             #if DEBUG
             * List<Data_Measure> data_test_measures = new List<Data_Measure> ();
             * data_test_measures = SensorHelper_2.Test_DataMeasure();
             * //SensorHelper_2.Generate_Simple_PDF_Bahasa("label supllier.test", "sensor1", "dateprint", "printtime", "average","9", "Jayson Fetra",data_test_measures);
             * //SensorHelper_2.Generate_Simple_PDF_English("label supllier_test", "sensor1", "dateprint", "printtime", "average", "9", "Jayson Fetra", data_test_measures);
             * //SensorHelper_2.Generate_Simple_PDF_English("label supllier_test", "sensor1", "dateprint", "printtime", "average", "9", "Jayson Fetra", data_test_measures);
             * SensorHelper_2.Generate_Simple_PDF_A5_Small
             *  ("label supllier_test", "sensor1", "dateprint", "printtime"
             *  , "average", "9", "Jayson Fetra", data_test_measures, 0);
             *
             *
             * Thread.Sleep(2000);
             * SensorHelper_2.Generate_Simple_PDF_A5_Small
             *  ("label supllier_test", "sensor1", "dateprint", "printtime"
             *  , "average", "9", "Jayson Fetra", data_test_measures, 1);
             *
             * Thread.Sleep(2000);
             * SensorHelper_2.Generate_Simple_PDF_A4
             *  ("label supllier_test", "sensor1", "dateprint", "printtime"
             *  , "average", "9", "Jayson Fetra", data_test_measures, 0);
             *
             *
             * Thread.Sleep(2000);
             * SensorHelper_2.Generate_Simple_PDF_A4
             *  ("label supllier_test", "sensor1", "dateprint", "printtime"
             *  , "average", "9", "Jayson Fetra", data_test_measures, 1);
             *
             * Thread.Sleep(2000);
             * SensorHelper_2.Generate_Simple_PDF_A5
             *  ("label supllier_test", "sensor1", "dateprint", "printtime"
             *  , "average", "9", "Jayson Fetra", data_test_measures, 0);
             *
             *
             * Thread.Sleep(2000);
             * SensorHelper_2.Generate_Simple_PDF_A5
             *  ("label supllier_test", "sensor1", "dateprint", "printtime"
             *  , "average", "9", "Jayson Fetra", data_test_measures, 1);
             *
             #endif
             */
        }