public MenuUserControl()
 {
     InitializeComponent();
     languageWM = new LanguageViewModel();
     _exExcel = ExportExcel.Instance;
     _workspaceVM = WorkspaceViewModel.Instance;
 }
Exemple #2
0
        public Order()
        {
            _tempList = new List<GroupTypeOrder>();

            _order = WorkSheetktUIOrder.Instance;
            _sharedResources = SharedRessources.Instance;
            _workspaceVm = WorkspaceViewModel.Instance;
        }
        public ResourceTranslation()
        {
            _rTranslation = WorkSheetktResourceTranslation.Instance;
            _resources = WorkSheetktResources.Instance;
            _sharedResources = SharedRessources.Instance;
            _workspaceVM = WorkspaceViewModel.Instance;

            _tempList = new List<GroupTypeOrder>();
        }
 public LanguageViewModel()
 {
     WorkspaceVM = WorkspaceViewModel.Instance;
     itemFilterVM = ToolboxStandardItemsViewModel.Instance;
 }
 public GroupTableViewModel()
 {
     _wvm = WorkspaceViewModel.Instance;
 }
Exemple #6
0
        public void Initialize()
        {
            _importPath = System.IO.Path.Combine(Environment.CurrentDirectory, @"Ressources\Configuration.xlsx");
            _exportPath = System.IO.Path.Combine(Environment.CurrentDirectory, @"Ressources\UnitTest.xlsx");

            _wvm = WorkspaceViewModel.Instance;
            _groupTableVm = new GroupTableViewModel();
            _wvm.LoadWorkspace(_importPath);
            _impExcel = ImportExcel.Instance;
            _exExcel = TreatPraktik.ViewModel.ExportExcel.Instance;

            //Get original lists of worksheets
            _oldExGroup = (from a in _impExcel._workSheetktExaminedGroup.ExaminedGroupList
                           select new ktExaminedGroup
                           {
                               DataQualityScore = a.DataQualityScore,
                               Expanded = a.Expanded,
                               GroupExpendable = a.GroupExpendable,
                               GroupIdentifier = a.GroupIdentifier,
                               GroupType = a.GroupType,
                               ID = a.ID,
                               Name = a.Name,
                               RequiredScore = a.RequiredScore
                           }).ToList();

            _oldGroupOrder = (from a in _impExcel._workSheetktUIGroupOrder.ktUIGroupOrderList
                              select new ktUIGroupOrder
                              {
                                  DepartmentID = a.DepartmentID,
                                  GroupOrder = a.GroupOrder,
                                  GroupTypeID = a.GroupTypeID,
                                  PageTypeID = a.PageTypeID
                              }).ToList();

            _oldOrder = (from a in _impExcel._workSheetktUIOrder.ktUIOrderList
                         select new ktUIOrder
                         {
                             DesignID = a.DesignID,
                             GroupOrder = a.GroupOrder,
                             GroupTypeID = a.GroupTypeID,
                             IncludedTypeID = a.IncludedTypeID,
                             PageTypeID = a.PageTypeID
                         }).ToList();

            _oldResources = (from a in _impExcel._workSheetktResources.ktResourceList
                             select new ktResources
                             {
                                 ResourceID = a.ResourceID,
                                 ResourceResxID = a.ResourceResxID,
                                 ResourceTypeID = a.ResourceTypeID
                             }).ToList();

            _oldResTranslation = (from a in _impExcel._workSheetktResourceTranslation.ktResourceTranslationList
                                  select new ktResourceTranslation
                                  {
                                      LanguageID = a.LanguageID,
                                      ResourceID = a.ResourceID,
                                      TranslationText = a.TranslationText
                                  }).ToList();
        }
 public ExaminedGroup()
 {
     _examinedGroup = WorkSheetktExaminedGroup.Instance;
     _sharedResources = SharedRessources.Instance;
     _workspaceVm = WorkspaceViewModel.Instance;
 }
        public void PopulateGTList()
        {
            WorkspaceViewModel wvm       = WorkspaceViewModel.Instance;
            List <string>      checkList = new List <string>();
            List <string>      blackList = new List <string>();

            //Blacklist the following pages: 3, 18, 19, 255, 100
            //foreach (PageType pt in wvm.PageList)
            //{
            //    if (
            //        pt.PageTypeID.Equals("3") ||
            //        pt.PageTypeID.Equals("18") ||
            //        pt.PageTypeID.Equals("19") ||
            //        pt.PageTypeID.Equals("255") ||
            //        pt.PageTypeID.Equals("100")
            //        )
            //    {
            //        foreach (GroupTypeOrder gto in pt.GroupTypeOrders)
            //        {

            //            blackList.Add(gto.GroupTypeID);
            //        }
            //    }
            //}

            //foreach (PageType pt in wvm.PageList)
            //{

            //    foreach (GroupTypeOrder gto in pt.GroupTypeOrders)
            //    {
            //        if (!gto.GroupTypeID.Equals("60") && !gto.GroupTypeID.Equals("58") && !blackList.Exists(x => x.Equals(gto.GroupTypeID)) && !checkList.Exists(x => x.Equals(gto.GroupTypeID)))
            //        {
            //            ToolboxGroup tbGroup = new ToolboxGroup();
            //            tbGroup.Group = gto.Group;
            //            GTList.Add(tbGroup);
            //            //GTList.Add(gto.Group);
            //            checkList.Add(gto.GroupTypeID);
            //        }
            //    }
            //}


            foreach (PageType pt in wvm.PageList)
            {
                // Blacklisted pages: 3, 18, 19, 255, 100
                if (
                    !pt.PageTypeID.Equals("3") &&
                    !pt.PageTypeID.Equals("18") &&
                    !pt.PageTypeID.Equals("19") &&
                    !pt.PageTypeID.Equals("255") &&
                    !pt.PageTypeID.Equals("100")
                    )
                {
                    foreach (GroupTypeOrder gto in pt.GroupTypeOrders)
                    {
                        if (!gto.GroupTypeID.Equals("60") && !gto.GroupTypeID.Equals("58"))
                        {
                            int  i            = 0;
                            bool alreadyExist = false;
                            while (i < checkList.Count && !alreadyExist)
                            {
                                if (checkList[i].Equals(gto.GroupTypeID))
                                {
                                    alreadyExist = true;
                                }
                                i++;
                            }

                            if (!alreadyExist)
                            {
                                ToolboxGroup tbGroup = new ToolboxGroup();
                                tbGroup.Group = gto.Group;
                                GTList.Add(tbGroup);
                                //GTList.Add(gto.Group);
                                checkList.Add(gto.GroupTypeID);
                            }
                        }
                    }
                }
            }

            SetupToolBoxItemCollectionView();
        }
Exemple #9
0
 public Resources()
 {
     _resources = WorkSheetktResources.Instance;
     _sharedResources = new SharedRessources();
     _workspaceVM = WorkspaceViewModel.Instance;
 }
Exemple #10
0
 private ExportExcel()
 {
     _wvm = WorkspaceViewModel.Instance;
 }
 public GroupTableViewModel()
 {
     _wvm = WorkspaceViewModel.Instance;
 }
 public ECktUIPageType()
 {
     _pageType = WorkSheetUIPageType.Instance;
     _sharedResources = SharedRessources.Instance;
     _workspaceVm = WorkspaceViewModel.Instance;
 }
 public ECktUIFieldIncludedType()
 {
     _fieldIncludedType = WorkSheetktUIFieldIncludedType.Instance;
     _sharedResources = SharedRessources.Instance;
     _workspaceVm = WorkspaceViewModel.Instance;
 }
Exemple #14
0
 public LanguageViewModel()
 {
     WorkspaceVM  = WorkspaceViewModel.Instance;
     itemFilterVM = ToolboxStandardItemsViewModel.Instance;
 }
Exemple #15
0
 public ECQAGroups()
 {
     _qaGroups = WorkSheetQAGroup.Instance;
     _sharedResources = SharedRessources.Instance;
     _workspaceVm = WorkspaceViewModel.Instance;
 }
Exemple #16
0
 public ResourceType()
 {
     _resourceType = WorkSheetktResourceType.Instance;
     _sharedResources = SharedRessources.Instance;
     _workspaceVm = WorkspaceViewModel.Instance;
 }
Exemple #17
0
 public ECktUIDesign()
 {
     _uiDesign = WorkSheetktUIDesign.Instance;
     _sharedResources = SharedRessources.Instance;
     _workspaceVm = WorkspaceViewModel.Instance;
 }
Exemple #18
0
 //private ObservableCollection<PageType> _pages;
 //private List<ktUIGroupOrder> _orders;
 public GroupOrder()
 {
     _groupOrder = WorkSheetktUIGroupOrder.Instance;
     _sharedResources = SharedRessources.Instance;
     _workspaceVm = WorkspaceViewModel.Instance;
 }
Exemple #19
0
 private ExportExcel()
 {
     _wvm = WorkspaceViewModel.Instance;
 }
Exemple #20
0
 public void Initialize()
 {
     string importPath = System.IO.Path.Combine(Environment.CurrentDirectory, @"Ressources\Configuration.xlsx");
     ifvm = ToolboxStandardItemsViewModel.Instance;
     glvm = ToolboxGroupsViewModel.Instance;
     WorkspaceViewModel.Instance = null;
     wvm = WorkspaceViewModel.Instance;
     wvm.LoadWorkspace(importPath);
     ifvm.PopulateToolbox();
     glvm.PopulateGTList();
     sfvm = new ToolboxSpecialItemsViewModel();
     gtvm = new GroupTableViewModel();
 }