Esempio n. 1
0
 public void Initialize(MessageListBox list)
 {
     if (list != null)
     {
         list.Items.Clear();
         List <Archive> profs = GetProfiles();
         if (profs.Count > 0)
         {
             foreach (Archive p in profs)
             {
                 list.Items.Add(new ParseMessageEventArgs(ParseMessageType.Archive, p.Name, p.Comment, "archive" + p.ID, p.LastDateModified));
             }
         }
         else
         {
             list.Items.Add(new ParseMessageEventArgs(ParseMessageType.Info, "No archives found!", "Saved current environment variables to create archive.", "0", string.Empty));
         }
         list.Invalidate();
     }
 }
 public void Initialize(MessageListBox list)
 {
     if (list != null)
     {
         list.Items.Clear();
         List <Workspace> profs = GetProfiles();
         if (profs.Count > 0)
         {
             foreach (Workspace p in profs)
             {
                 list.Items.Add(new ParseMessageEventArgs(ParseMessageType.Profile, p.Name, p.Directory, "workspace" + p.ID, p.LastDateUnbind));
             }
         }
         else
         {
             list.Items.Add(new ParseMessageEventArgs(ParseMessageType.Info, "No workspace found!", "Add folder to create new workspace.", "0", string.Empty));
         }
         list.Invalidate();
     }
 }
Esempio n. 3
0
        private void UpdateMessageDetails()
        {
            try
            {
                string id = ((AppMessage)MessagesLB.SelectedIndex())?.Id;
                if (!string.IsNullOrEmpty(id))
                {
                    AppMessage message = _messages.GetMessage(id);

                    if (message != null)
                    {
                        MessageListBox.Refresh();
                        SetMessageDetails(message);
                        ToggleButtons(true, message.Show ? HIDE : SHOW);
                    }
                }
            }
            catch (Exception)
            {
                // Something happened
            }
        }
Esempio n. 4
0
 private void MessageListBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     UpdateMessageDetails();
     MessageListBox.Refresh();
 }
 private void MessageListBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     MessageListBox.Items.MoveCurrentToLast();
     MessageListBox.ScrollIntoView(MessageListBox.Items.CurrentItem);
 }