コード例 #1
0
ファイル: BottleDetails.cs プロジェクト: isaman922/Cellar
        public BottleDetails(Dashboard sender, Models.Bottle bottle)
        {
            InitializeComponent();

            if (bottle.Vintage != 0)
            {
                lblVintName.Text = $"{bottle.Vintage} {bottle.BottleName}";
            }
            else
            {
                lblVintName.Text = $"N/V {bottle.BottleName}";
            }
            lblProducer.Text   = bottle.Producer;
            lblOrigin.Text     = $"{bottle.Subregion}, {bottle.Country}";
            lblStyle.Text      = $"{bottle.StyleOrVarietal}";
            lblDrinkRange.Text = $"{bottle.DrinkByStart} - {bottle.DrinkByEnd} (peak {bottle.DrinkByPeak})";
            lblSize.Text       = bottle.Size;
            lblCost.Text       = $"{bottle.Cost:C}";
            lblLocation.Text   = bottle.Location;
            lblType.Text       = GetCategoryText(bottle.TypeCode);
            lblImportance.Text = GetImportanceText(bottle.ImportanceCode);
            labelPicture.Image = Serializer.DeserializePhoto(bottle.SerializedLabelImage);
            txtRatings.Text    = GetRatingText(bottle.Ratings);
            txtNotes.Text      = bottle.Notes;

            theBottle = bottle;
            theSender = sender;
        }
コード例 #2
0
ファイル: BottleDetails.cs プロジェクト: isaman922/Cellar
 public BottleDetails(Models.Bottle bottle)
 {
     InitializeComponent();
 }