示例#1
0
        internal EntryEditor(LogEntry entry)
        {
            InitializeComponent();

              txtProject.DataBindings.Add("Text", entry, "Project");
              txtComment.DataBindings.Add("Text", entry, "Comment");
              txtDuration.DataBindings.Add("Text", entry, "Duration");
        }
示例#2
0
        private void StoreEntry()
        {
            var project = cboProjects.Text;
              var entry = new LogEntry()
                    {
                      Duration = (int)m_span.TotalSeconds,
                      Project = project,
                      Comment = txtComment.Text,
                      StartedAt = m_start
                    };

              m_log.AddEntry(entry);
              if(!cboProjects.Items.Contains(entry.Project))
              {
            cboProjects.Items.Add(entry.Project);
              }
        }