Esempio n. 1
0
 private void codepageImportButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (importCodePageFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             CodePageTable.FromFile(importCodePageFileDialog.FileName).ApplyToFont(CurrentFont);
             Master.RefreshStuff();
         }
     }
     catch (Exception x)
     {
         MessageBox.Show("Error in import: " + x.ToString(), "Error in Import", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 2
0
 private void loadCpButton_Click(object sender, EventArgs e)
 {
     if (loadCodepageDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         try
         {
             ImportedFont = CurrentFont.MakeMfeFont(
                 CodePageTable.FromFile(loadCodepageDialog.FileName)
                 );
             destCharPreviewer.Char = ImportedFont[(int)destSelectUpDown.Value];
             Master.Chart.RefreshData();
         }
         catch (Exception f)
         {
             MessageBox.Show("Error: " + f.ToString(), "Error Loading Codepage File", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }