public string DeImageToText(string path, string password, out bool verification) { ToText t = new ToText(); Bitmap image = new Bitmap(path); return(t.imageToText(image, password, out verification)); }
private void button2_Click(object sender, EventArgs e) { ToText t = new ToText(); Bitmap image = new Bitmap(txtPath.Text); bool verification; txtText.Text = t.imageToText(image, "", out verification); }
public void Be_Creatable(IconChar iconChar) { var markupExtension = new ToText(iconChar); markupExtension.Should().NotBeNull(); var serviceProvider = Substitute.For <IServiceProvider>(); var text = markupExtension.ProvideValue(serviceProvider) as string; text.Single().Should().Be(iconChar.ToChar()); }
internal Image DeImageToImage(string path1, string details, out bool verification) { Bitmap image = new Bitmap(path1); ToText t = new ToText(); //Hide Image Behind Image Image finalImage = t.imageFromImage(image, details, out verification); return(finalImage); }
private void ReadBoxProblem() { Domain d = Parser.ParseDomain(m_DomainPath, m_AgentCallsign); Problem p = Parser.ParseProblem(m_ProblemPath, d); ToText tt = new ToText(); string drawing = tt.PrintProblem(d, p); rtxtDrawing.Text = drawing; }
public void SetUp() { _database = GetSampleDb(); var defItem = _database.GetItem(TestingConstants.ToText.DefinitionId); _log = new DefaultLogger(); _sut = new ToText(defItem, _log); _dataMap = Substitute.For <IDataMap>(); }
public void TestMethodAltitude() { double altitude = 90.9; string result = ToText.ConvertDouble(altitude, Categories.altitude, Formats.DegreesMinutesDecimal, 1); Assert.AreEqual("90°54.0'", result); double heading = 0.0; string resultHeading = ToText.ConvertDouble(heading, Categories.azimuth); Assert.AreEqual("000.0", resultHeading); heading = 345.65; resultHeading = ToText.ConvertDouble(heading, Categories.azimuth); Assert.AreEqual("345.6", resultHeading); }
static void Main(string[] args) { string _nomeArquivo; string _nomeTabela; string camposTabelas; string values; int linha = 0; int i = 0; int c = 0; try { foreach (string filePath in Directory.GetFiles(@"E:\310", "*.xml", SearchOption.AllDirectories)) { camposTabelas = ""; Console.WriteLine("Ciando arquivo SQL de " + filePath); XmlDocument _doc = new XmlDocument(); _doc.Load(filePath); _nomeArquivo = filePath.Replace(".xml", ".sql"); if (File.Exists(_nomeArquivo)) { File.Delete(_nomeArquivo); } _nomeTabela = filePath.Replace(@"E:\310\", "").Replace(".xml", ""); i = 0; linha = 0; using (StreamWriter _ws = new StreamWriter(_nomeArquivo, true, Encoding.Unicode)) { foreach (XmlNode _linha in _doc.SelectNodes("CLIENTES/CLIENTE")) { //foreach (XmlNode _linha in _doc.SelectNodes("anotacoes/anotacao")) { if (linha == 0) { _ws.WriteLine("CREATE TABLE " + _nomeTabela + " ("); foreach (XmlNode _campo in _linha) { if (_linha.LastChild.Name == _campo.Name) { _ws.WriteLine(ToText.RemoveAcentos(ToText.RemoveCaracteresEspeciais(_campo.Name, false)) + " ntext"); camposTabelas += ToText.RemoveAcentos(ToText.RemoveCaracteresEspeciais(_campo.Name, false)) + ""; } else { _ws.WriteLine(ToText.RemoveAcentos(ToText.RemoveCaracteresEspeciais(_campo.Name, false)) + " ntext,"); camposTabelas += ToText.RemoveAcentos(ToText.RemoveCaracteresEspeciais(_campo.Name, false)) + ","; } i++; } _ws.WriteLine(")"); _ws.WriteLine(""); _ws.WriteLine(""); linha++; } values = ""; for (c = 0; c < i; c++) { if (c == i - 1) { values += "'" + _linha.ChildNodes[c].InnerText.Replace("'", "") + "'"; } else { values += "'" + _linha.ChildNodes[c].InnerText.Replace("'", "") + "', "; } } _ws.WriteLine("INSERT INTO " + _nomeTabela + "(" + camposTabelas + ") VALUES (" + values + ");"); } } } Console.WriteLine(""); Console.WriteLine("Conversão executada com sucesso! Pressione qualquer tecla para sair..."); Console.ReadKey(); } catch (Exception e) { throw e; } }