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;
                }
            }
        }
Exemple #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;
     }
 }