Exemplo n.º 1
0
        public IActionResult GetData(string txt)
        {
            dynamic dt = JObject.Parse(txt);

            if (dt["type"] == "Unicode")
            {
                return(Json(data.SinhalaTxt = UniConverter.Convert(data.SinglishTxt = dt["SinglishTxt"])));
            }
            else
            {
                return(Json(data.SinhalaTxt = FontConverter.Convert(data.SinglishTxt = dt["SinglishTxt"])));
            }
        }
Exemplo n.º 2
0
 private void FontMakerButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var path      = System.IO.Path.Combine(Workspace, "Graphics");
         var converter = new FontConverter(path);
         converter.Convert(System.IO.Path.Combine(path, "font.bmp"));
         (sender as Button).Content = "Converted";
     }
     catch
     {
         MessageBox.Show("An error has occured, make sure the Workspace is set correctly and that assets have been dumped using the ManifestViewer.");
     }
 }
        void RunFontConverter(string path, RefPrim <Boolean> success)
        {
            success.Value = false;
            var converter   = new FontConverter(path);
            var destination = System.IO.Path.Combine(path, "font.bmp");

            try
            {
                converter.Convert(destination);
                Installation.FileChanged(destination, FileChange.ADD);
                success.Value = true;
            }
            catch (Exception e)
            {
                Installation.PushError(e.Message);
                success.Value = false;
            }
        }