Beispiel #1
0
        private void ShowProjectDetails(Message.M_EditTile msg)
        {
            if (msg.Sender is View.V_Tiles | msg.Sender is App)
            {
                SelectedItem = msg.SelectedTile;

                EditedItem = ObjectCopier.CloneJson <Project>(SelectedItem);

                Messenger.Default.Send(new Message.M_ChangeView(Message.M_ChangeView.ViewToSelect.DisplayAddNewTab));
            }
        }
Beispiel #2
0
        public List <TestCase> GatherTestResultSpecificDate(List <TestCase> testCases, DateTime dateTime)
        {
            List <TestCase> res = new List <TestCase>();

            double totalCount = testCases.Count;

            Console.Write("Gathering Results for Date {0}", dateTime.Date.ToShortDateString());

            using (var progress = new ProgressBar())
            {
                double currentCount = 0;

                foreach (TestCase currTestCase in testCases)
                {
                    //progress.Report(currentCount / totalCount);

                    if (currTestCase.TestCaseResults.Count > 0)
                    {
                        //Console.WriteLine(currTestCase.TestCaseResults.Count);
                        foreach (TestCaseResult currTestCaseResult in currTestCase.TestCaseResults)
                        {
                            //Console.WriteLine(currTestCaseResult.ResultDT.Date);
                            if (currTestCaseResult.ResultDT.Date == dateTime.Date)
                            {
                                TestCase testCaseCopy = ObjectCopier.CloneJson <TestCase>(currTestCase);

                                //TestCaseResult testCaseResultCopy = new TestCaseResult(currTestCaseResult.TestCaseId,
                                //    currTestCaseResult.Result,
                                //    currTestCaseResult.ResultDT);

                                TestCaseResult testCaseResultCopy = ObjectCopier.CloneJson <TestCaseResult>(currTestCaseResult);

                                testCaseCopy.CurrentTestCaseResult = testCaseResultCopy;
                                res.Add(testCaseCopy);
                            }
                        }
                    }

                    currentCount += 1;
                }

                Console.WriteLine();
                Console.Write("Done.");
            }

            Console.WriteLine();

            return(res);
        }
Beispiel #3
0
 private void PopulateApplications(ObservableCollection <TopApplication> msg)
 {
     ApplicationsCollection       = msg;
     EditedApplicationsCollection = ObjectCopier.CloneJson <ObservableCollection <TopApplication> >(ApplicationsCollection);
     //ApplicationsCollection = msg;
 }
Beispiel #4
0
 public Grafo clone()
 {
     return(ObjectCopier.CloneJson <Grafo>(this));
 }