Ejemplo n.º 1
0
 public static void UpdateLastTimeModified(Profile profile)
 {
     profile.LastTimeModified = DateTime.Now;
     DBAccess.UpdateProfile(profile);
     if (ProfileMenu != null)
     {
         //ProfileMenu.GetListViewItemById(profile.Id).SubItems[(int)ListViewProfileSubItemIndex.INDEX_TIME_MODIFIED].Text = profile.LastTimeModified.ToString();
         ProfileMenu.EditListViewItem(profile);
     }
 }
Ejemplo n.º 2
0
        private void AddProfile()
        {
            Profile profile = new Profile
            {
                Name             = textBoxProfileName.Text,
                TimeCreated      = DateTime.Now, //yyyy-MM-dd HH:mm:ss,
                LastTimeModified = DateTime.MinValue,
                LastTimeExecuted = DateTime.MinValue
            };

            profile.ListViewIndex = ProfileMenu.listViewProfile.Items.Count;
            DBAccess.AddProfile(profile);
            ProfileMenu.Profiles.Add(profile);
            ListViewItem item = new ListViewItem();

            ProfileMenu.EditListViewItem(profile, item);
            ProfileMenu.listViewProfile.Items.Add(item);
            //ProfileMenu.ResizeForm();
        }