예제 #1
0
        public void UpdateListViewItem()
        {
            this.Text       = Name;
            this.ImageIndex = IconId;

            while (SubItems.Count > 1)
            {
                SubItems.RemoveAt(1);
            }

            if (Price > 0)
            {
                double rounded = Math.Round(Price, 2);
                this.SubItems.Add(String.Format("{0} €", rounded));
            }
            else
            {
                this.SubItems.Add("");
            }

            this.SubItems.Add(NumberOfDiscs.ToString());

            if (BoughtOn.Year > 1980)
            {
                this.SubItems.Add(BoughtOn.ToShortDateString());
            }
            else
            {
                this.SubItems.Add("");
            }

            this.SubItems.Add(Errors());
        }
예제 #2
0
 private string GetDisks()
 {
     if (Disc == 9999 && NumberOfDiscs == 9999)
     {
         return("Expansion");
     }
     return(Disc.ToString() + " of " + NumberOfDiscs.ToString());
 }