コード例 #1
0
        public virtual void DisplayItem(object itemIn)
        {
            item = (CryptoEditorTimeSheetItem)itemIn;

            // Clear fields
            time.Clear();
            hours.Clear();
            name.Clear();
            notes.Clear();

            BringToFront();

            if (item == null)
            {
                this.Enabled = false;
                return;
            }

            this.Enabled = true;

            // Fill in fields ...
            time.Text += string.Format("{0:0000}/", item.Time.Year);
            time.Text += string.Format("{0:00}/", item.Time.Month);
            time.Text += string.Format("{0:00}", item.Time.Day);

            hours.Text = string.Format("{0:00.00}", item.Hours);

            name.Text = item.Name;
            notes.Text = item.Notes;
        }
コード例 #2
0
        public CrytoEditorTimesheetForm(CryptoEditorTimeSheetItem item)
        {
            InitializeComponent();
            this.item = item;

            time.Value = item.Time;
            name.Text = item.Name;
            hours.Text = string.Format("{0:00.00}", item.Hours);
            notes.Text = item.Notes;
        }
コード例 #3
0
 public static int CompareCryptoEditorTimeSheetItem(CryptoEditorTimeSheetItem i1, CryptoEditorTimeSheetItem i2)
 {
     return i1.Time.CompareTo(i2.Time);
 }