Ejemplo n.º 1
0
 public void ShowSettings()
 {
     var setting = new SurfaceSettings(MyCharge);
     bool? result = setting.ShowDialog();
     if (result == true)
     {
         MyCharge = new ChargeDensity(setting.ChrDensity);
         MainWindow.Instance.Calculation();
         CheckColor();
     }
 }
Ejemplo n.º 2
0
        public SurfaceSettings(ChargeDensity chargeDensity)
        {
            InitializeComponent();
            ChrDensity = new ChargeDensity(chargeDensity);
            cmboxChargeType.SelectedIndex = chargeDensity.Type == Charge.ChargeType.Positive ? 0 : 1;

            doubleUDCharge.Value = chargeDensity.ElectricCharge;
            doubleUDDensity.Value = chargeDensity.Density;

            intUDHeight.Value = chargeDensity.BodySurface.Height;
            intUDWidth.Value = chargeDensity.BodySurface.Width;
        }
Ejemplo n.º 3
0
 public Surface(ChargeDensity chargeDensity)
 {
     InitializeComponent();
     MyCharge = new ChargeDensity(chargeDensity);
     CheckColor();
 }
Ejemplo n.º 4
0
 public void RemoveExistingCharge(ChargeDensity charge, UIElement element)
 {
     gridField.Children.Remove(element);
     Calculation();
     FieldOutline.Update();
 }