Exemplo n.º 1
0
 public void OpenWindow_Create()
 {
     CurrentModel = new ConnectionGroupModel();
     currentModel.GroupConnections = new ObservableCollection <ConnectionModel>();
     window = new GroupManagerWindow(this);
     window.ShowDialog();
 }
        private void ManageGroup()
        {
            GroupManagerViewModel gmvm = new GroupManagerViewModel();

            GroupManagerWindow window = new GroupManagerWindow
            {
                DataContext = gmvm
            };
            int agendaId = AgendaRepo.Instance.GetAll().Where(x => x.UserId == SessionManager.CurrentUser.UserId).FirstOrDefault().AgendaId;

            List <Group> listGroup = GroupRepo.Instance.GetAll().Where(x => x.AgendaId == agendaId).ToList();

            List <GroupManagerDataContext> gmdcList = new List <GroupManagerDataContext>();

            listGroup.ForEach(x => gmdcList.Add(new GroupManagerDataContext(GroupRepo.Instance.GetOne(x.GroupID))));

            gmdcList.ForEach(x => x.GMVM = gmvm);

            gmvm.AllGroup = gmdcList;

            gmvm.OnRequestClose += (s, e) => window.Close();

            window.ShowDialog();
        }
 public void OpenWindow_Create()
 {
     CurrentModel = new ConnectionGroupModel();
     window       = new GroupManagerWindow(this);
     window.ShowDialog();
 }