Exemple #1
0
        public void loadBdayData(Birthday b)
        {
            try
            {
                lbl_Name.Text     = b.name;
                lbl_Birthday.Text = b.birthday.ToShortDateString();
                connToImg cti = new connToImg();

                lv_ContactInfo.Items.Clear();

                foreach (Connection c in b.connections)
                {
                    ListViewItem lvi = new ListViewItem();

                    lvi.ImageIndex = cti.getIndex(c.type);

                    lvi.Tag  = c.id;
                    lvi.Text = (c.type.ToString());
                    lvi.SubItems.Add(c.contactstring);
                    lv_ContactInfo.Items.Add(lvi);
                }

                lv_Alerts.Items.Clear();

                foreach (Alert a in b.alerts)
                {
                    ListViewItem lvi = new ListViewItem();
                    lvi.Text = a.alert.Month + ". " + a.alert.Day + ".";
                    lvi.SubItems.Add(a.showText ? a.text : "--");
                    lvi.SubItems.Add(a.makeSound ? a.sound + "" : "--");
                    lv_Alerts.Items.Add(lvi);
                }

                pb_Edit_Picture.Image = b.image;
                p_Color.BackColor     = b.birthdayColor;

                sc_Main.Panel2Collapsed = false;
            }
            catch
            {
            }
        }