Exemple #1
0
 public frmSettings() : base()
 {
     if (m_vb6FormDefInstance == null)
     {
         if (m_InitializingDefInstance)
         {
             m_vb6FormDefInstance = this;
         }
         else
         {
             try
             {
                 //For the start-up form, the first instance created is the default instance.
                 if (System.Reflection.Assembly.GetExecutingAssembly().EntryPoint.DeclaringType == this.GetType())
                 {
                     m_vb6FormDefInstance = this;
                 }
             }
             catch
             {
             }
         }
     }
     //This call is required by the Windows Form Designer.
     InitializeComponent();
 }
Exemple #2
0
 private void  ClearEntries(frmSettings fFrm)
 {
     //UPGRADE_WARNING:Form property frmSettings.Controls has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"'
     foreach (Control oCtrl in fFrm.Controls)
     {
         if (oCtrl is TextBox)
         {
             ((System.Windows.Forms.TextBox)oCtrl).Text = "";
         }
     }
 }
Exemple #3
0
 public void SaveSettings(string sAppName, string sSection, frmSettings fFrm)
 {
     //UPGRADE_WARNING:Form property fFrm.Controls has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"'
     foreach (Control oCtrl in fFrm.Controls)
     {
         if (oCtrl is TextBox)
         {
             Interaction.SaveSetting(sAppName, sSection, oCtrl.Name, ((System.Windows.Forms.TextBox)oCtrl).Text);
         }
     }
 }