Ejemplo n.º 1
0
    void Start()
    {
        KanjiManager.Init(); //IMPORTANT
        KanjiWriter = gameObject.AddComponent <WriterManager>();
        KanjiWriter.TargetCamera = TargetCamera;
        KanjiWriter.TrailPrefab  = TrailPrefab;
        KanjiWriter.AddOnWinPerfectEvent(new OnWinPerfect(WinPerfectEvent));
        KanjiWriter.AddOnWinAlmostEvent(new OnWinAlmost(WinAlmostEvent));
        KanjiWriter.AddOnWinPoorEvent(new OnWinPoor(WinPoorEvent));
        KanjiWriter.AddOnNewKanjiEvent(new OnNewKanji(NewKanjiEvent));

        KanjiWriter.NewKanji();
    }
Ejemplo n.º 2
0
 private void SaveAsCommand_Execute(string filename, int index, ITableController table, IColumnDesc[] columns)
 {
     Busy = true;
     Task.Run(() =>
     {
         WriterManager.Write(filename, index, table.Rows, columns, (InlineString.Render)table.InlineStringRenderMode);
     }).ContinueWith(worker =>
     {
         if (worker.IsFaulted)
         {
             InvokeThrowTaskException(worker);
         }
         Busy = false;
     }, Scheduler);
 }
Ejemplo n.º 3
0
        public static void Main(string[] args)
        {
            AddinManager.Initialize(".");
            AddinManager.Registry.Update(null);

            Console.WriteLine("Normal writers:");
            WriterManager manager = new WriterManager(new string[0]);

            foreach (IWriter w in manager.GetWriters())
            {
                Console.WriteLine(w.Write());
            }

            Console.WriteLine("Including debug writers:");
            WriterManager debugManager = new WriterManager(new string[] { "debug" });

            foreach (IWriter w in debugManager.GetWriters())
            {
                Console.WriteLine(w.Write());
            }
        }