Exemplo n.º 1
0
        private static void DisplayOptions()
        {
            UcOptions ucOptions = new UcOptions();

            using (CommonForm fm = new CommonForm())
            {
                fm.AddControlForDialog(ucOptions, "Preferences");
                fm.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void ShowAbout()
        {
            UCAbout ucAbout = new UCAbout();

            ucAbout.SetDeviceId("Device ID: " + Settings.Default.DeviceAddress);
            ucAbout.SetAboutInfo(aboutInfo);
            using (CommonForm fm = new CommonForm())
            {
                fm.AddControlForDialog(ucAbout, "About");
                fm.ShowDialog();
            }
        }
Exemplo n.º 3
0
 private static string ObtainPassword()
 {
     if (Settings.Default.RememberPassword)
     {
         return(Settings.Default.Password);
     }
     else
     {
         UCPassword ucPassword = new UCPassword();
         using (CommonForm fm = new CommonForm())
         {
             fm.AddControlForDialog(ucPassword, "Password");
             if (fm.ShowDialog() == DialogResult.OK)
             {
                 return(ucPassword.Password);
             }
             else
             {
                 return(null);
             }
         }
     }
 }