Exemplo n.º 1
0
 public MainWin()
 {
     InitializeComponent();
     try
     {
         FigWin = new ChartWin(this);
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString());
     }
     ParseInst = new DataParse();
     fonts     = new InstalledFontCollection();
     foreach (FontFamily family in fonts.Families)
     {
         comboSingleXFont.Items.Add(family.Name);
         comboSingleYFont.Items.Add(family.Name);
         comboCurveTextFont.Items.Add(family.Name);
     }
     // Load default parameters from profile
     Directory.SetCurrentDirectory(appPath);
     setParametersFormProfile(defaultProfilename);
     lastValidXFontSize        = textXFontSize.Text.Trim();
     lastValidYFontSize        = textYFontSize.Text.Trim();
     lastValidCurveFontSize    = textCurveTextFontSize.Text.Trim();
     lastValidCutOffPercentage = textCutOff.Text.Trim();
 }
Exemplo n.º 2
0
 public Form1()
 {
     try
     {
         matFig = new MatFigure();
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString());
     }
     try
     {
         matExportor = new FigFormatExportor();
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString());
     }
     InitializeComponent();
     ParseInst = new DataParse();
     fonts     = new InstalledFontCollection();
     foreach (FontFamily family in fonts.Families)
     {
         comboSingleXFont.Items.Add(family.Name);
         comboSingleYFont.Items.Add(family.Name);
         comboCurveTextFont.Items.Add(family.Name);
     }
     // Create matlab figure handle
     matFig.createFigHandle();
     // Load default parameters from profile
     Directory.SetCurrentDirectory(appPath);
     setParametersFormProfile(defaultProfilename);
     lastValidXFontSize        = textXFontSize.Text.Trim();
     lastValidYFontSize        = textYFontSize.Text.Trim();
     lastValidCurveFontSize    = textCurveTextFontSize.Text.Trim();
     lastValidCutOffPercentage = textCutOff.Text.Trim();
 }