Exemplo n.º 1
0
        private void cmdWife_Click(object sender, EventArgs e)
        {
            ItemPicker IP = new ItemPicker();
            string     ID;
            XmlNode    tmpNode;

            if (lblWife.Tag == null)
            {
                ID = IP.ShowDialogAndReturnString("", "INDI");
            }
            else
            {
                ID = IP.ShowDialogAndReturnString(lblWife.Tag.ToString(), "INDI");
            }

            if (ID != "")
            {
                tmpNode = GEDXMLUtilites.GlobalLocateNodeByID(ID, "INDI", MyNode);
                if (tmpNode != null)
                {
                    GEDFileEntryIndi Wife = new GEDFileEntryIndi();
                    Wife.Node    = tmpNode;
                    lblWife.Text = Wife.DisplayName;
                    lblWife.Tag  = ID;
                }
            }
            else
            {
                lblWife.Text = "";
                lblWife.Tag  = "";
            }
        }
Exemplo n.º 2
0
        private void cmdSource_Click(object sender, EventArgs e)
        {
            ItemPicker IP = new ItemPicker();
            string     ID;
            XmlNode    tmpNode;

            if (Source == null)
            {
                ID = IP.ShowDialogAndReturnString("", "SOUR");
            }
            else
            {
                ID = IP.ShowDialogAndReturnString(Source.ID, "SOUR");
            }

            if (ID != "")
            {
                tmpNode = GEDXMLUtilites.GlobalLocateNodeByID(ID, "SOUR", MyNode);
                if (tmpNode != null)
                {
                    Source         = new GEDFileEntrySour();
                    Source.Node    = tmpNode;
                    lblSource.Text = Source.DisplayName;
                }
            }
        }
Exemplo n.º 3
0
        private void cmdAddChild_Click(object sender, EventArgs e)
        {
            ItemPicker IP = new ItemPicker();
            string     ID;
            XmlNode    tmpNode;

            ID = IP.ShowDialogAndReturnString("", "INDI");

            if (ID != "")
            {
                tmpNode = GEDXMLUtilites.GlobalLocateNodeByID(ID, "INDI", MyNode);
                if (tmpNode != null)
                {
                    GEDFileEntryIndi Chil = new GEDFileEntryIndi();
                    Chil.Node = tmpNode;
                    lstChildren.Items.Add(Chil);
                }
            }
        }