private void RbLatin_CheckedChanged(object sender, EventArgs e) { if (RbLatin.Checked) { RichTextBox1.Text = ClassUMT.CyrlToLatn(orignalText); string ppp = string.Empty; } }
private void DashboardForm_Load(object sender, EventArgs e) { try { if (File.Exists("Address.xml")) { dsTest1.ReadXml("Address.xml"); foreach (var red in dsTest1.dtAddresssBook) { ListaAdresa.Add(red.MapirajMe <dsTest.dtAddresssBookRow, ClassAddress>()); } dataGrid1.DataSource = ListaAdresa; } else { ListaAdresa.Add(new ClassAddress { Id = 1, Firstname = "Sima", Surname = "Strahota", Address = "Puste barake 1", Birthday = new DateTime(1976, 10, 8), Phone = "064/789" }); ListaAdresa.Add(new ClassAddress { Id = 2, Firstname = "Pera", Surname = "Detlic", Address = "Shumatovacka bb", Birthday = new DateTime(1969, 12, 3), Phone = "065/789" }); ListaAdresa.Add(new ClassAddress { Id = 3, Firstname = "Dusko", Surname = "Dugousko", Address = "Rupcine 123", Birthday = new DateTime(1967, 2, 20), Phone = "066/789" }); foreach (var red in ListaAdresa) { dsTest1.dtAddresssBook.Rows.Add(ClassUMT.PocoToDtoData(dsTest1.dtAddresssBook.NewRow(), red)); } dsTest1.AcceptChanges(); dataGrid1.DataSource = dsTest1.dtAddresssBook; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BtnChoose_Click(object sender, EventArgs e) { try { var ofd = new OpenFileDialog(); if (ofd.ShowDialog() == DialogResult.OK) { var ds = new DataSet(); ds.ReadXml(ofd.FileName); rtbPoco.Text = ClassUMT.DtoToPoco(ds); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }