コード例 #1
0
        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
 }
コード例 #4
0
 public void Clear()
 {
     Persons = new CPersons();
 }