Пример #1
0
        public EasySelect(MainForm mainForm)
        {
            InitializeComponent();
            parentForm = mainForm;
            userTriggered = true;

            Array sex = Enum.GetValues(typeof(Gender));
            Array provinces = Enum.GetValues(typeof(Province));
            foreach (Gender g in sex)
            {
                if (!g.ToString().Equals("Unspecified"))
                {
                    this.cbxListSex.Items.Add(g.ToString());
                }
            }
            foreach (Province p in provinces)
            {
                if (!p.ToString().Equals("Unspecified"))
                {
                    this.cbxListProvince.Items.Add(p.ToString());
                }
            }
            this.cbxListSex.CheckOnClick = true;
            this.cbxListProvince.CheckOnClick = true;
        }
Пример #2
0
        //Constructs a new Edit form for a new entry or an edit session...
        public Form_Edit_New(MainForm mainForm, List<Member> members)
        {
            InitializeComponent();
            parentForm = mainForm;
            memberImpl = new MemberImpl();
            converter = new Converter();

            this.cbxSex.Items.AddRange(new Object[] { Gender.Female.ToString(), Gender.Male.ToString() });
            this.cbxCity.Items.AddRange(new Object[]{Province.Anvers.ToString(), Province.Bruxelles.ToString(),
                Province.Charleroi.ToString(), Province.Liège.ToString(), Province.Namur.ToString(),
                Province.Etranger.ToString()});
            if (members != null)
            {
                this.NewRecord = false;
                this.btnSave.Enabled = true;
                this.editMembers = members;
                this.editMembers.Reverse();
                this.activeMemberIndex = 0;
                this.zapper(activeMemberIndex);
                this.btnZapperNext.Enabled = true;
                this.btnZapperPrev.Enabled = true;
            }
            else
            {
                this.NewRecord = true;
                this.editMembers = null;
                this.btnSave.Enabled = false;
                this.btnZapperNext.Enabled = false;
                this.btnZapperPrev.Enabled = false;
                this.lblZapper.Text = "1/1";
            }
        }
Пример #3
0
 public Management(MainForm mainForm)
 {
     InitializeComponent();
     parentForm = mainForm;
     meetingImpl = new MeetingImpl();
     memberImpl = new MemberImpl();
     attendanceImpl = new AttendanceImpl();
 }
Пример #4
0
        public MailSender(MainForm mainForm)
        {
            InitializeComponent();
            this.parentForm = mainForm;
            memberImpl = new MemberImpl();
            recipients = parentForm.SelectedMembers;
            foreach (Member member in recipients) {
                this.txtReceiver.Text += member.Email + ", ";
            }

            //This code autocompletes the receiver's details...but only the first!
            AutoCompleteStringCollection source = new AutoCompleteStringCollection();
            List<Member> recipientsAuto = memberImpl.getAllMembers();
            foreach (Member member in recipientsAuto)
            {
                source.Add(member.Lastname + " " + member.Firstname + ": " + member.Email);
            }
            this.txtReceiver.AutoCompleteCustomSource = source;
            this.txtReceiver.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            this.txtReceiver.AutoCompleteSource = AutoCompleteSource.CustomSource;
        }