internal void RecalculateArrayGroups()
 {
     ArrayGroups = new GenericGroup <VarArray>(this.Arrays, a => a.Group, a => a.Name);
 }
 internal void RecalculateVariableGroups()
 {
     VariableGroups = new GenericGroup <Variable>(this.Variables, a => a.Group, a => a.Name);
 }
 internal void ReclaculateStatusEffectGroups()
 {
     StatusEffectGroups = new GenericGroup <StatusEffect>(StatusEffects, a => a.Group, a => a.Name);
 }
 internal void RecalculateConversationGroups()
 {
     ConversationGroups = new GenericGroup <Conversation>(this.Conversations, a => a.GroupName, a => a.Name);
 }
 internal void RecalculateCommonEventGroups()
 {
     CommonEventGroups = new GenericGroup <CommonEvent>(this.CommonEvents, a => a.Group, a => a.Name);
 }
        public MainViewModel()
        {
            /*
             #region Debug Data
             * this.Zones = new ObservableCollection<Zone>();
             * Zone playerHouse = new Zone
             * {
             *  ZoneName = "Player House",
             *  ZoneId = Guid.NewGuid()
             * };
             * var bedroom = new Room
             * {
             *  RoomName = "Bedroom",
             *  RoomID = Guid.NewGuid()
             * };
             * playerHouse.Rooms.Add(bedroom);
             * var hallway = new Room
             * {
             *  RoomName = "Hallway",
             *  RoomID = Guid.NewGuid()
             * };
             *
             * playerHouse.Rooms.Add(hallway);
             * playerHouse.Rooms.Add(new Room
             * {
             *  RoomName = "Living Room",
             *  RoomID = Guid.NewGuid()
             * });
             * Zones.Add(playerHouse);
             * Zone mall = new Zone
             * {
             *  ZoneName = "Mall",
             *  ZoneId = Guid.NewGuid()
             * };
             * mall.Rooms.Add(new Room
             * {
             *  RoomName = "West Entrance",
             *  RoomID = Guid.NewGuid()
             * });
             * mall.Rooms.Add(new Room
             * {
             *  RoomName = "East Entrance",
             *  RoomID = Guid.NewGuid()
             * });
             * mall.Rooms.Add(new Room
             * {
             *  RoomName = "Food Court",
             *  RoomID = Guid.NewGuid()
             * });
             * mall.Rooms.Add(new Room
             * {
             *  RoomName = "Department Store",
             *  RoomID = Guid.NewGuid()
             * });
             * mall.Rooms.Add(new Room
             * {
             *  RoomName = "Book Store",
             *  RoomID = Guid.NewGuid()
             * });
             * this.Zones.Add(mall);
             *
             * bedroom.Exits.Add(new Exit { ZoneLink = playerHouse, RoomLink = hallway, Direction = ExitDirection.West });
             * hallway.Exits.Add(new Exit { ZoneLink = playerHouse, RoomLink = bedroom, Direction = ExitDirection.East });
             *
             #endregion
             */


            MainViewModelStatic = this;
            CommonEventGroups   = new GenericGroup <CommonEvent>(CommonEvents, a => a.Group, a => a.Name);
            ConversationGroups  = new GenericGroup <Conversation>(this.Conversations, a => a.GroupName, a => a.Name);
            VariableGroups      = new GenericGroup <Variable>(Variables, a => a.Group, a => a.Name);
            StatusEffectGroups  = new GenericGroup <StatusEffect>(StatusEffects, a => a.Group, a => a.Name);
            //this.OpenWindows.Add(new WindowView { Content = new Editor.Editors.InteractableEditor() });
            #region More debug data

            /*
             * var TestInteractable = new Interactable();
             * this.Interactables.Add(TestInteractable);
             * TestInteractable.InteractableName = "Bookshelf";
             * TestInteractable.DefaultDisplayName = "Old Bookshelf";
             * TestInteractable.CanExamine = true;
             * TestInteractable.CanExamineUsesScript = true;
             * TestInteractable.CanInteract = true;
             * TestInteractable.CanInteractUsesScript = false;
             * Script testIntCanExScript = new Script();
             * testIntCanExScript.AddBeforeSelected(new Comment { CommentText = "Test Can Examine Script" });
             * Script testIntCanInScript = new Script();
             * testIntCanInScript.AddBeforeSelected(new Comment { CommentText = "Test Can Interact Script" });
             * Script testIntExScript = new Script();
             * testIntExScript.AddBeforeSelected(new Comment { CommentText = "Test Examine Script" });
             * Script testIntInScript = new Script();
             * testIntInScript.AddBeforeSelected(new Comment { CommentText = "Test Interaction Script" });
             * TestInteractable.ExamineScript = testIntExScript;
             * TestInteractable.InteractScript = testIntInScript;
             * TestInteractable.CanInteractScript = testIntCanInScript;
             * TestInteractable.CanExamineScript = testIntCanExScript;
             * TestInteractable.GroupName = "Furniture";
             *
             * Variables.Add(TestData.TestDateTimeVariable);
             * Variables.Add(TestData.TestStringVariable);
             * Variables.Add(TestData.TestNumberVariable);
             * */
            #endregion
        }