コード例 #1
0
        public FreezerTemplate(Freezer NewEmptyFreezer)
        {
            InitializeComponent();

            NewFreezer = NewEmptyFreezer;

            TitleLabel.Text = NewFreezer.TitleToString("Freezer");

            ColorInfoLabel.Text            = NewFreezer.Color;
            OverallVolumeInfoLabel.Text    = Convert.ToString(NewFreezer.OverallVolume) + " L";
            ControlTypeInfoLabel.Text      = Convert.ToString(NewFreezer.ControlType);
            DisplayInfoLabel.Text          = (NewFreezer.Display == true) ? "Yes" : "No";
            DefrostSystemInfoLabel.Text    = (NewFreezer.DefrostSystem == true) ? "Yes" : "No";
            DimensionsInfoLabel.Text       = NewFreezer.DimensionsToString() + " sm";
            WeightInfoLabel.Text           = Convert.ToString(NewFreezer.Weight) + " kg";
            ProducingCountryInfoLabel.Text = NewFreezer.ProducingCountry;
            PriceLabel.Text              = Convert.ToString(NewFreezer.Price) + " UAH";
            PriceLabel.ForeColor         = Color.Red;
            SmallFreezerPictureBox.Image = ByteArrayToImage(NewFreezer.DeviceImage);

            HardFeaturesInfoLabel.Text = "";
        }