コード例 #1
0
        private void Suwak_ValueChanged_LR_T(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            Properties.Settings.Default.Wybor = 1;
            if (Properties.Settings.Default.Wybor == 1)
            {
                Properties.Settings.Default.Frq_L = Suwak_Frq_LR.Value;

                // Przepisanie danych do klasy Dane
                Dane_Rzeczywisty dane = new Dane_Rzeczywisty(Properties.Settings.Default.Napiecie_L, Properties.Settings.Default.Rezystancja_L, Properties.Settings.Default.Frq_L, Properties.Settings.Default.Indukcyjnosc_L, Properties.Settings.Default.Pojemnosc_L, Properties.Settings.Default.Uplywnosc);

                // Wyświetlanie


                //Ustawienie wartości wykresu, 2)
                OxyPlotModel_Cewka oxyPlotModel = new OxyPlotModel_Cewka(Properties.Settings.Default.Napiecie_L, Properties.Settings.Default.Indukcyjnosc_L, Properties.Settings.Default.Frq_L);
                this.DataContext = oxyPlotModel; // To pozwala połączyć kontrolki z polami klasy OxyPlotModel

                //Wyświetlanie obliczonekj wartości OBLICZONYCH
                Z_L.Text = "Z= " + Convert.ToString(Math.Round(Dane_Rzeczywisty.Impedancja, 4)) + " + j" + Convert.ToString(Math.Round(Dane_Rzeczywisty.Impedancja_Urojona, 8)) + " [Ω]";

                Z_Modul_L.Text = "|Z|= " + Convert.ToString(Math.Round(Dane_Rzeczywisty.Modul_Z, 4)) + " [Ω]";
                IRMS_L.Text    = "I= " + Convert.ToString(Math.Round(Dane_Rzeczywisty.Irms, 4)) + " [A]";
                IRL_RMS_L.Text = "IRL= " + Convert.ToString(Math.Round(Dane_Rzeczywisty.Irl_rms, 4)) + " [A]";
                IC_RMS_L.Text  = "Ic= " + Convert.ToString(Math.Round(Dane_Rzeczywisty.Ic_rms, 4)) + " [µA]";
                Faza_L.Text    = "ρ= " + Convert.ToString(Math.Round(Dane_Rzeczywisty.Faza, 4)) + " [°]";
            }
        }
コード例 #2
0
        private void Suwak_ValueChanged_LV(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            Properties.Settings.Default.Wybor = 1;
            if (Properties.Settings.Default.Wybor == 1)
            {
                Properties.Settings.Default.Napiecie_L = Suwak_Napiecie_L.Value;
                Dane dane = new Dane(Properties.Settings.Default.Napiecie_L, Properties.Settings.Default.Indukcyjnosc, Properties.Settings.Default.Frq_L);

                OxyPlotModel_Cewka oxyPlotModel = new OxyPlotModel_Cewka(Properties.Settings.Default.Napiecie_L, Properties.Settings.Default.Indukcyjnosc, Properties.Settings.Default.Frq_L);
                this.DataContext = oxyPlotModel;

                Prad_L.Text = "IL= " + Convert.ToString(1000 * Math.Round(Dane.Prad, 4)) + " [A]";
                Ur_L.Text   = "UL= " + Convert.ToString(Math.Round(Properties.Settings.Default.Napiecie_L, 4)) + " [V]";
            }
        }