Ejemplo n.º 1
0
        /// <summary>
        /// Set server to email list view.
        /// </summary>
        /// <param name="_server">_server.</param>
        public void SetServer(Server _server)
        {
            // Servers
            ActiveServer = _server;

            // Clear items
            EmailItems.Clear();

            // Clear list content
            EmailListContent.Clear();

            // Add all emails from Server
            int x = 0;

            foreach (Email i in ActiveServer.Emails)
            {
                var tmp = new EmailListItem(this, i, (x % 2 == 0) ? Colors.White : Colors.LightGray);
                if (!Email.IsValid(i.UserEmail))
                {
                    tmp.BackgroundColor = Colors.Red;
                }
                EmailListContent.PackStart(tmp);
                EmailItems.Add(tmp);
                x++;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Add new email to email list in server & create email list box.
        /// </summary>
        private void NewEmail_Clicked(object sender, EventArgs e)
        {
            var _new = new Email();

            ActiveServer.Emails.Add(_new);
            int size = ActiveServer.Emails.Count + 1;
            var tmp  = new EmailListItem(this, _new, (size % 2 == 0) ? Colors.White : Colors.LightGray)
            {
                BackgroundColor = Colors.Red
            };

            EmailItems.Add(tmp);
            EmailListContent.PackStart(tmp);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Add new email to email list in server & create email list box.
 /// </summary>
 private void NewEmail_Clicked(object sender, EventArgs e)
 {
     var _new = new Email();
     ActiveServer.Emails.Add(_new);
     int size = ActiveServer.Emails.Count + 1;
     var tmp = new EmailListItem(this, _new, (size%2 == 0) ? Colors.White : Colors.LightGray)
     {
         BackgroundColor = Colors.Red
     };
     EmailItems.Add(tmp);
     EmailListContent.PackStart(tmp);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Set server to email list view.
        /// </summary>
        /// <param name="_server">_server.</param>
        public void SetServer(Server _server)
        {
            // Servers
            ActiveServer = _server;

            // Clear items
            EmailItems.Clear();

            // Clear list content
            EmailListContent.Clear();

            // Add all emails from Server
            int x = 0;
            foreach (Email i in ActiveServer.Emails)
            {
                var tmp = new EmailListItem(this, i, (x%2 == 0) ? Colors.White : Colors.LightGray);
                if (!Email.IsValid(i.UserEmail))
                {
                    tmp.BackgroundColor = Colors.Red;
                }
                EmailListContent.PackStart(tmp);
                EmailItems.Add(tmp);
                x++;
            }
        }