Exemplo n.º 1
0
 protected BatteryBase(double voltage, double maxCapacity)
 {
     ArgChecker.Chech4Positive(voltage);
     ArgChecker.Chech4Positive(maxCapacity);
     this.Voltage  = voltage;
     this.Capacity = this.MaxCapacity = maxCapacity;
     this.Charge   = 100;
 }
Exemplo n.º 2
0
        protected ScreenBase(double height, double width, uint pixelsH, uint pixelsW)
        {
            ArgChecker.Chech4Positive(height);
            ArgChecker.Chech4Positive(width);

            this.Height  = height;
            this.Width   = width;
            this.PixelsH = pixelsH;
            this.PixelsW = pixelsW;

            double dpi = (Height * Width) / (PixelsH * PixelsW) * mmToInchKoef;

            Dpi = Convert.ToUInt32(dpi);
        }