예제 #1
0
 // Called after InitializeComponent() by the constructor to check
 // for saved settings
 private void InitializeMyComponents()
 {
     heightBoxUnits.Items.AddRange(new object[] { units.pts, units.cm, units.inches });
     widthBoxUnits.Items.AddRange(new object[] { units.pts, units.cm, units.inches });
     dHeightBoxUnits.Items.AddRange(new object[] { units.pts, units.cm, units.inches });
     dWidthBoxUnits.Items.AddRange(new object[] { units.pts, units.cm, units.inches });
     showPDFCheckBox.Enabled = false; //only enabled if user has compileWithPDF set to true
     if (Application.UserAppDataRegistry.GetValue("xmlname") != null && File.Exists((string)Application.UserAppDataRegistry.GetValue("xmlname")))
     {
         if (nameChange != null)
         {
             nameChange(new object(), (string)Application.UserAppDataRegistry.GetValue("xmlname"));
         }
     }
     if (Application.UserAppDataRegistry.GetValue("compileWithPdflatex") != null)
     {
         string compile = (string)Application.UserAppDataRegistry.GetValue("compileWithPdflatex");
         if (compile.Equals("True"))
         {
             CompileCheckBox.Checked = true;
         }
         else
         {
             CompileCheckBox.Checked = false;
         }
     }
     heightUnitsChange += new unitsChangeHandler(heightUnitsChanged); // Used to change the corresponding value
     widthUnitsChange  += new unitsChangeHandler(widthUnitsChanged);
 }
예제 #2
0
 // Called after InitializeComponent() by the constructor to check
 // for saved settings
 private void InitializeMyComponents()
 {
     heightBoxUnits.Items.AddRange(new object[] { units.pts, units.cm, units.inches });
     widthBoxUnits.Items.AddRange(new object[] { units.pts, units.cm, units.inches });
     dHeightBoxUnits.Items.AddRange(new object[] { units.pts, units.cm, units.inches });
     dWidthBoxUnits.Items.AddRange(new object[] { units.pts, units.cm, units.inches });
     showPDFCheckBox.Enabled = false; //only enabled if user has compileWithPDF set to true
     if (Application.UserAppDataRegistry.GetValue("xmlname") != null && File.Exists((string)Application.UserAppDataRegistry.GetValue("xmlname")))
     {
         if (nameChange != null)
         {
             nameChange(new object(), (string)Application.UserAppDataRegistry.GetValue("xmlname"));
         }
     }
     if (Application.UserAppDataRegistry.GetValue("compileWithPdflatex") != null)
     {
         string compile = (string)Application.UserAppDataRegistry.GetValue("compileWithPdflatex");
         if (compile.Equals("True"))
             CompileCheckBox.Checked = true;
         else
             CompileCheckBox.Checked = false;
     }
     heightUnitsChange += new unitsChangeHandler(heightUnitsChanged); // Used to change the corresponding value
     widthUnitsChange += new unitsChangeHandler(widthUnitsChanged);
 }