/// <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); }
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()); }
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)); }
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(); }
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(); }
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)); }
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(); }