Example #1
0
        /// <summary>
        /// Starts the webservice for reception of point coordinates.
        /// The controller is handed over to the webservice as an observer/visitor
        /// </summary>
        private void StartWebservice()
        {
            KSvc.Service serv = new KSvc.Service();

            showmetadata = true;
            //showmetadata = false;
            serv.ShowMetaData = showmetadata;

            serv.Run(this);
        }
Example #2
0
        /// <summary>
        /// Starts the webservice for reception of point coordinates.
        /// The controller is handed over to the webservice as an observer/visitor
        /// </summary>
        private void StartWebservice()
        {
            KSvc.Service serv = new KSvc.Service();


            showmetadata = true;
            //showmetadata = false;
            serv.ShowMetaData = showmetadata;

            serv.Run(this);
        }
Example #3
0
        static void Main(string[] args)
        {
            KSvc.Service serv = new KSvc.Service();

            //show meta data
            bool showmetadata = true;

            //or don't show metadata
            //showmetadata = false;

            serv.ShowMetaData = showmetadata;

            serv.Run(new PointListSaveObserver());
        }
Example #4
0
        static void Main(string[] args)
        {
            KSvc.Service serv = new KSvc.Service();

            //show meta data
            bool showmetadata = true;

            //or don't show metadata
            //showmetadata = false;

            serv.ShowMetaData = showmetadata;

            serv.Run(new PointListSaveObserver());
        }
Example #5
0
        static void Main()
        {
            KSvc.Service serv = new KSvc.Service();

            //don't show metadata
            serv.ShowMetaData = false;

            //starting service
            PointLoadObserver plso   = new PointLoadObserver();
            ThreadStart       tStart = delegate { serv.Run(plso); };
            Thread            t      = new Thread(tStart);

            t.Start();

            //starting mirror GUI
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //get characters
            List <Character> characterdatabase =
                UPXReader.ParseUPXFile(
                    File.Open("C:\\Diplom\\kanjiteacher\\data\\exampleFormat.upx", FileMode.Open));


            //initialise viewing area
            MirrorArea ma = new MirrorArea(plso);

            //go through all the strokes in the database
            //fill viewing area
            foreach (Character c in characterdatabase)
            {
                foreach (Stroke dbStroke in c.StrokeList)
                {
                    plso.ReveivePoints(dbStroke.AllPoints);
                }
            }

            //show viewing area
            ma.ShowDialog();
            ma.Hide();
            ma.Close();
            ma.Dispose();
            t.Abort();

//            Application.Run(new MirrorArea(plso));
        }
Example #6
0
        public MirrorArea()
            : base()
        {
            Text = "MirrorArea";
            PointLoader = new PointLoadObserver();

            mouseListener = new MirrorEventListener(this.pnlDrawingArea);
            PointLoader.MouseListener = mouseListener as MirrorEventListener;

            KSvc.Service serv = new KSvc.Service();

            //don't show metadata
            serv.ShowMetaData = false;

            ThreadStart tStart = delegate { serv.Run(PointLoader); };
            ServiceThread = new Thread(tStart);
            ServiceThread.Start();
        }
Example #7
0
        public MirrorArea() : base()
        {
            Text        = "MirrorArea";
            PointLoader = new PointLoadObserver();

            mouseListener             = new MirrorEventListener(this.pnlDrawingArea);
            PointLoader.MouseListener = mouseListener as MirrorEventListener;

            KSvc.Service serv = new KSvc.Service();

            //don't show metadata
            serv.ShowMetaData = false;

            ThreadStart tStart = delegate { serv.Run(PointLoader); };

            ServiceThread = new Thread(tStart);
            ServiceThread.Start();
        }
Example #8
0
        private static void TestInkMLReading()
        {
            KSvc.Service serv = new KSvc.Service();

            //don't show metadata
            serv.ShowMetaData = false;

            //starting service
            PointLoadObserver plso   = new PointLoadObserver();
            ThreadStart       tStart = delegate { serv.Run(plso); };
            Thread            t      = new Thread(tStart);

            t.Start();

            //starting mirror GUI
            F.Application.EnableVisualStyles();
            F.Application.SetCompatibleTextRenderingDefault(false);

            //initialise viewing area
            MirrorArea    ma      = new MirrorArea(plso);
            List <Stroke> strokes = new List <Stroke>();

            //strokes = InkMLReader.ReadInkMLFile("char02211.inkml");
            //strokes = InkMLReader.ReadInkMLFile("char00846.inkml");
            //strokes = InkMLReader.ReadInkMLFile("char00555.inkml");
            //strokes = InkMLReader.ReadInkMLFile("char00117.inkml");
            //strokes = InkMLReader.ReadInkMLFile("char00935.inkml");
            strokes = InkMLReader.ReadInkMLFile("char00117vs935hybrid.inkml");


            //go through all the strokes in the file
            //fill viewing area
            foreach (Stroke dbStroke in strokes)
            {
                plso.ReveivePoints(dbStroke.AllPoints);
            }

            //show viewing area
            ma.ShowDialog();
            ma.Hide();
            ma.Close();
            ma.Dispose();
            t.Abort();
        }
Example #9
0
        static void Main()
        {
            KSvc.Service serv = new KSvc.Service();

            //don't show metadata
            serv.ShowMetaData = false;

            //starting service
            PointLoadObserver plso = new PointLoadObserver();
            ThreadStart tStart = delegate { serv.Run(plso); };
            Thread t = new Thread(tStart);
            t.Start();

            //starting mirror GUI
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //get characters
            List<Character> characterdatabase =
                UPXReader.ParseUPXFile(
                    File.Open("C:\\Diplom\\kanjiteacher\\data\\exampleFormat.upx", FileMode.Open));

            //initialise viewing area
            MirrorArea ma = new MirrorArea(plso);

            //go through all the strokes in the database
            //fill viewing area
            foreach (Character c in characterdatabase)
            {
                foreach (Stroke dbStroke in c.StrokeList)
                {
                    plso.ReveivePoints(dbStroke.AllPoints);
                }
            }

            //show viewing area
            ma.ShowDialog();
            ma.Hide();
            ma.Close();
            ma.Dispose();
            t.Abort();

            //            Application.Run(new MirrorArea(plso));
        }
Example #10
0
        private static void TestInkMLReading()
        {
            KSvc.Service serv = new KSvc.Service();

            //don't show metadata
            serv.ShowMetaData = false;

            //starting service
            PointLoadObserver plso = new PointLoadObserver();
            ThreadStart tStart = delegate { serv.Run(plso); };
            Thread t = new Thread(tStart);
            t.Start();

            //starting mirror GUI
            F.Application.EnableVisualStyles();
            F.Application.SetCompatibleTextRenderingDefault(false);

            //initialise viewing area
            MirrorArea ma = new MirrorArea(plso);
            List<Stroke> strokes = new List<Stroke>();
            //strokes = InkMLReader.ReadInkMLFile("char02211.inkml");
            //strokes = InkMLReader.ReadInkMLFile("char00846.inkml");
            //strokes = InkMLReader.ReadInkMLFile("char00555.inkml");
            //strokes = InkMLReader.ReadInkMLFile("char00117.inkml");
            //strokes = InkMLReader.ReadInkMLFile("char00935.inkml");
            strokes = InkMLReader.ReadInkMLFile("char00117vs935hybrid.inkml");

            //go through all the strokes in the file
            //fill viewing area
            foreach (Stroke dbStroke in strokes)
            {
                plso.ReveivePoints(dbStroke.AllPoints);
            }

            //show viewing area
            ma.ShowDialog();
            ma.Hide();
            ma.Close();
            ma.Dispose();
            t.Abort();
        }