Example #1
0
        public AdresserForm(Addressbook adressBuch, Address adresse)
        {
            _adressBuch = adressBuch;
            _adresse = adresse;

            InitializeComponent();

            // delegates registrieren
            _adressBuch.updateKontakte += new Addressbook.OnUpdateKontakteDelegate(ladeKontakte);
            _adresse.updateAdressEigenschaft += new Address.OnUpdateAdressEigenschaft(ladeAdressdetails);
        }
Example #2
0
        public Adresser()
        {
            _adrBuch = new Addressbook();
            _adr = new Address();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            _view = new AdresserForm(_adrBuch, _adr);

            // delegate registrieren
            _adrBuch.updateAdressbuchDatei += new Addressbook.OnUpdateAdressbuchDateiDelegate(ReadAdressbookXMLFile);
            _adrBuch.updateSpeichern += new Addressbook.OnUpdateSpeichernDelegate(WriteAdressbookXMLFile);

            Application.Run(_view);
        }