Exemplo n.º 1
0
        public BillRecordDetailPopup(BillRecordDetail detail, OnRecordDeleted listener)
        {
            InitializeComponent();

            Detail = detail;

            _listener = listener;

            TimeLabel.Text = DateConverter.ToFriendDateTimeString(Detail.Time);

            TypeIcon.Source = Detail.Type.Icon;

            TypeNameLabel.Text = Detail.Type.Name;

            AmountLabel.Text      = $"¥{Detail.Amount:F2}";
            AmountLabel.TextColor = Detail.Color;

            if (Detail.RemarkVisible)
            {
                RemarkLabel.Text = $"备注:{Detail.Remark}";
            }
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return($"{Id}, {DateConverter.ToFriendDateTimeString(Time)}, {BillType}, {Amount}, {Remark}");
 }
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return(DateConverter.ToFriendDateTimeString(value as DateTime? ?? DateTime.Now));
 }