public CView(

            System.Windows.Forms.Form ParentForm,
            System.Windows.Forms.ToolTip MainToolTip,
            System.EventHandler EventHandlerClick,
            System.EventHandler EventHandlerDoubleClick,
            System.Windows.Forms.ContextMenu PersonContextMenu,
            CPersons GlobalPersons
            )
        {
            this.ParentForm              = ParentForm;
            this.MainToolTip             = MainToolTip;
            this.EventHandlerClick       = EventHandlerClick;
            this.EventHandlerDoubleClick = EventHandlerDoubleClick;
            this.PersonContextMenu       = PersonContextMenu;
            this.GlobalPersons           = GlobalPersons;
            Clear();
        }
Пример #2
0
        public CPersons GetChildren()
        {
            CPersons Chilren = new CPersons();

            foreach (CPerson c in Persons)
            {
                if (IsMan())
                {
                    if (c.FatherGuid == this.Guid)
                    {
                        Chilren.Add(c);
                    }
                }
                else
                {
                    if (c.MotherGuid == this.Guid)
                    {
                        Chilren.Add(c);
                    }
                }
            }
            return(Chilren);
        }
Пример #3
0
 public void LoadPersons()
 {
     Persons = new CPersons();
     Persons.LoadPersons();
     CPerson.Persons = Persons;             // Pass the collection of person to the CPerson class
 }
 public void Clear()
 {
     Persons = new CPersons();
 }