Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();

            Core.SetSaveOnErrorPath("GeneratedCode");

            RoxyModelAssembler.AssembleSelectableRemovablePerson();

            RoxyModelAssembler.AssembleSelectableRemovableBusinessGroup();

            RoxyModelAssembler.AssembleBusinessGroupsCollection();

            Core.Save("GeneratedCode");

            SingleSelectionObservableCollection <ISelectableRemovableBusinessGroup> dataContext =
                Core.GetInstanceOfGeneratedType <SingleSelectionObservableCollection <ISelectableRemovableBusinessGroup> >();

            this.DataContext = dataContext;

            ISelectableRemovableBusinessGroup businessGroup1 =
                Core.GetInstanceOfGeneratedType <ISelectableRemovableBusinessGroup>();

            businessGroup1.Name = "Astrologists";
            dataContext.Add(businessGroup1);

            ISelectableRemovablePerson person1 = Core.GetInstanceOfGeneratedType <ISelectableRemovablePerson>();

            person1.FirstName = "Joe";
            person1.LastName  = "Doe";
            businessGroup1.People.Add(person1);

            ISelectableRemovablePerson person2 = Core.GetInstanceOfGeneratedType <ISelectableRemovablePerson>();

            person2.FirstName = "Jane";
            person2.LastName  = "Dane";
            businessGroup1.People.Add(person2);

            ISelectableRemovableBusinessGroup businessGroup2 =
                Core.GetInstanceOfGeneratedType <ISelectableRemovableBusinessGroup>();

            businessGroup2.Name = "Alchemists";
            dataContext.Add(businessGroup2);

            ISelectableRemovablePerson person3 = Core.GetInstanceOfGeneratedType <ISelectableRemovablePerson>();

            person3.FirstName = "Michael";
            person3.LastName  = "Mont";
            businessGroup2.People.Add(person3);

            ISelectableRemovablePerson person4 = Core.GetInstanceOfGeneratedType <ISelectableRemovablePerson>();

            person4.FirstName = "Michelle";
            person4.LastName  = "Mitchell";
            businessGroup2.People.Add(person4);
        }
Esempio n. 2
0
        public MainWindow()
        {
            InitializeComponent();

            Core.AddEventIdxInfo <INotifyPropertyChanged>(nameof(INotifyPropertyChanged.PropertyChanged));
            Core.SetSaveOnErrorPath("GeneratedCode");

            SingleSelectionObservableCollection <ISelectableRemovableBusinessGroup> dataContext =
                Core.CreateImplementedInstance <SingleSelectionObservableCollection <ISelectableRemovableBusinessGroup>, IRemovableCollectionBehaviorImplementor>();

            this.DataContext = dataContext;

            ISelectableRemovableBusinessGroup businessGroup1 =
                Core.CreateImplementedInstance <ISelectableRemovableBusinessGroup, ISelectableRemovableBusinessGroupImplementor>();

            businessGroup1.Name = "Astrologists";
            dataContext.Add(businessGroup1);

            ISelectableRemovablePerson person1 =
                Core.CreateImplementedInstance <ISelectableRemovablePerson, ISelectableRemovablePersonImplementor>();

            person1.FirstName = "Joe";
            person1.LastName  = "Doe";
            businessGroup1.People.Add(person1);

            ISelectableRemovablePerson person2 =
                Core.CreateImplementedInstance <ISelectableRemovablePerson, ISelectableRemovablePersonImplementor>();

            person2.FirstName = "Jane";
            person2.LastName  = "Dane";
            businessGroup1.People.Add(person2);

            ISelectableRemovableBusinessGroup businessGroup2 =
                Core.CreateImplementedInstance <ISelectableRemovableBusinessGroup, ISelectableRemovableBusinessGroupImplementor>();

            businessGroup2.Name = "Alchemists";
            dataContext.Add(businessGroup2);

            ISelectableRemovablePerson person3 =
                Core.CreateImplementedInstance <ISelectableRemovablePerson, ISelectableRemovablePersonImplementor>();

            person3.FirstName = "Michael";
            person3.LastName  = "Mont";
            businessGroup2.People.Add(person3);

            ISelectableRemovablePerson person4 =
                Core.CreateImplementedInstance <ISelectableRemovablePerson, ISelectableRemovablePersonImplementor>();

            person4.FirstName = "Michelle";
            person4.LastName  = "Mitchell";
            businessGroup2.People.Add(person4);

            Core.Save("GeneratedCode");
        }