コード例 #1
0
        private void btnFltreHesapla_Click(object sender, EventArgs e)
        {
            double frekans, direnc, kapasitor, sarimsayisi1, sarimsayisi2, VP, Imax, Iort, Vdc, VMax, VR, RF, Vort, diyot;

            try
            {
                diyot        = Convert.ToDouble(txtFltreDiyot.Text);
                frekans      = Convert.ToDouble(txtFltrFrekans.Text);
                kapasitor    = Convert.ToDouble(txtFltrKondansator.Text) * Math.Pow(10, (-6));
                VP           = Convert.ToDouble(txtFltreVP.Text);
                direnc       = Convert.ToDouble(txtFltrDirenc.Text) * 1000;
                sarimsayisi2 = Convert.ToDouble(txtfiltresarimsayisi2.Text);
                sarimsayisi1 = Convert.ToDouble(txtfiltresarimsayisi1.Text);
                if (diyot > 0 & direnc > 0 & kapasitor > 0)
                {
                    VP = VP * sarimsayisi2 / sarimsayisi1;

                    VMax = VP - 2 * diyot;
                    Vdc  = 2 * VMax / Math.PI;
                    Imax = VMax / direnc;
                    Iort = 2 * Imax / Math.PI;
                    Vort = VMax - (VMax / (2 * frekans * direnc * kapasitor));
                    VR   = VMax / (2 * Math.Sqrt(3) * frekans * direnc * kapasitor);
                    RF   = (VR / Vort) * 100;
                    LBLfiltreeeVort.Text = "Vort=" + Vdc.ToString();
                    LBLfiltreeeVmax.Text = "Vmax=" + VMax.ToString();
                    LBLfiltreeeIort.Text = "Iort=" + (1000 * Iort).ToString() + "mA";
                    LBLfiltreeeImax.Text = "Imax=" + (1000 * Imax).ToString() + "mA";

                    lblFltreRF.Text = "=%" + RF.ToString();
                }
                else
                {
                    MessageBox.Show("değerleri doğru giriniz:");
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Değerleri Kontrol Ediniz...", "Dikkat!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #2
0
 public override string ToString()
 {
     return("{ U:" + UMin.ToString() + " To " + UMax.ToString() + "; V:" + VMin.ToString() + " To " + VMax.ToString() + " }");
 }
コード例 #3
0
 protected override void Serializing(XmlWriter writer)
 {
     writer.WriteAttributeString("vmax", VMax.ToString(System.Globalization.CultureInfo.InvariantCulture));
     writer.WriteAttributeString("vmin", VMin.ToString(System.Globalization.CultureInfo.InvariantCulture));
     base.Serializing(writer);
 }