Exemplo n.º 1
0
        public GroupWindow(Pages.IPage parent, WorldbuildingDBEntities Context, int?SelectedWorld, int?GroupID)
        {
            InitializeComponent();

            this.parent        = parent;
            this.Context       = Context;
            this.SelectedWorld = SelectedWorld;
            this.GroupID       = GroupID;

            if (GroupID == null)
            {
                c         = new Gruppe();
                c.WorldID = (int)SelectedWorld;

                DeleteButton.IsEnabled = false;
            }
            else
            {
                this.c = Context.Gruppe.First(x => x.WorldID == SelectedWorld && x.GroupID == GroupID);
            }

            NameTextBox.Text        = c.Name;
            DescriptionTextBox.Text = c.Description;

            FillConnectionListBox();
        }
Exemplo n.º 2
0
        public CharacterWindow(Pages.IPage parent, WorldbuildingDBEntities Context, int?SelectedWorld, int?CharID)
        {
            InitializeComponent();

            this.parent        = parent;
            this.Context       = Context;
            this.SelectedWorld = SelectedWorld;
            this.CharID        = CharID;

            if (CharID == null)
            {
                c         = new Character();
                c.WorldID = (int)SelectedWorld;

                DeleteButton.IsEnabled = false;
            }
            else
            {
                this.c = Context.Character.First(x => x.WorldID == SelectedWorld && x.CharacterID == CharID);
            }

            NameTextBox.Text        = c.Name;
            ApearanceTextBox.Text   = c.Appearance;
            DescriptionTextBox.Text = c.Description;

            FillConnectionListBox();
        }
Exemplo n.º 3
0
        public EventWindow(Pages.IPage parent, WorldbuildingDBEntities Context, int?SelectedWorld, int?EventID)
        {
            InitializeComponent();

            this.parent        = parent;
            this.Context       = Context;
            this.SelectedWorld = SelectedWorld;
            this.EventID       = EventID;

            if (EventID == null)
            {
                c         = new Event();
                c.WorldID = (int)SelectedWorld;

                DeleteButton.IsEnabled = false;
            }
            else
            {
                this.c = Context.Event.First(x => x.WorldID == SelectedWorld && x.EventID == EventID);
            }

            DescriptionTextBox.Text = c.Description;
            FillConnectionListBox();
        }