Esempio n. 1
0
        private void cbClosePwd_Click(object sender, RoutedEventArgs e)
        {
            PasswordWnd wnd = new PasswordWnd("666");

            wnd.ShowDialog();
            if (wnd.isOK)
            {
                if (cbClosePwd.IsChecked == true)
                {
                    cbClosePwd.IsChecked = true;
                }
                else
                {
                    cbClosePwd.IsChecked = false;
                }
            }
            else
            {
                if (cbClosePwd.IsChecked == true)
                {
                    cbClosePwd.IsChecked = false;
                }
                else
                {
                    cbClosePwd.IsChecked = true;
                }
            }
        }
Esempio n. 2
0
 public void UpdateEepromWnd()
 {
     if (MainWindow.m_statusBarInfo.IsOnline)
     {
         if (isSetPassword)
         {
             if (SelectCANWnd.m_IsClosePwd)
             {
                 btnLoadPara.IsEnabled = true;
                 btnSavePara.IsEnabled = true;
                 btnReadPara.IsEnabled = true;
             }
             else
             {
                 PasswordWnd wnd = new PasswordWnd("666");
                 wnd.ShowDialog();
                 if (wnd.isOK)
                 {
                     btnLoadPara.IsEnabled = true;
                     btnSavePara.IsEnabled = true;
                     btnReadPara.IsEnabled = true;
                 }
                 else
                 {
                     btnLoadPara.IsEnabled  = false;
                     btnSavePara.IsEnabled  = false;
                     btnReadPara.IsEnabled  = false;
                     btnWritePara.IsEnabled = false;
                 }
             }
         }
         else
         {
             btnLoadPara.IsEnabled = true;
             btnSavePara.IsEnabled = true;
             btnReadPara.IsEnabled = true;
         }
     }
     else
     {
         btnLoadPara.IsEnabled  = false;
         btnSavePara.IsEnabled  = false;
         btnReadPara.IsEnabled  = false;
         btnWritePara.IsEnabled = false;
     }
 }