Example #1
0
        /// <summary>
        /// Dretva koja zapravo provodi pravo testiranje
        /// </summary>
        private void TestThread(object list_att)
        {
            List <object> att = (List <object>)list_att;

            try
            {
                IVisualView graph     = (IVisualView)att[1];
                Prikaz      newPrikaz = (Prikaz)att[2];

                Tester.StartTesting();
                foreach (Point i in newPrikaz.getPoints())
                {
                    graph.DrawPoint(i);
                }
                foreach (Line l in newPrikaz.getLines())
                {
                    graph.DrawLine(l);
                }

                PrikazRepos.Instance().AddPrikaz(newPrikaz);
                graph.ShowView(newPrikaz.Name);
            }
            catch (CrtajMeException e)
            {
                IMainForm frm = (IMainForm)att[0];
                frm.ShowErrorMessage(e.getMsg());
            }
        }
Example #2
0
        public void ShowPrikaz(IVisualView graph, string prikazName)
        {
            try
            {
                Prikaz newPrikaz = PrikazRepos.Instance().GetPrikazByName(prikazName);
                foreach (Point i in newPrikaz.getPoints())
                {
                    graph.DrawPoint(i);
                }
                foreach (Line l in newPrikaz.getLines())
                {
                    graph.DrawLine(l);
                }

                graph.ShowView(newPrikaz.Name);
            }
            catch (CrtajMeException e)
            {
                graph.ShowErrorMessage(e.getMsg());
            }
        }