コード例 #1
0
        public void init_config(bool _bDisplayProgressBar = true)
        {
            softAPSettingInit.m_bEnableSoftAp = false; // disable
            softAPSettingInit.m_ssid          = "";
            softAPSettingInit.m_pwd           = "";

            SoftApRecord m_rec  = null;
            AsyncWorker  worker = new AsyncWorker(Application.Current.MainWindow);

            if (_bDisplayProgressBar)
            {
                worker.InvokeMethod <SoftApRecord>(((MainWindow)App.Current.MainWindow).statusPanelPage.m_selectedPrinter, ref m_rec, DllMethodType.GetSoftAp, this);
            }
            else
            {
                m_rec = worker.GetSoftAp(((MainWindow)App.Current.MainWindow).statusPanelPage.m_selectedPrinter);
            }

            if (null != m_rec && m_rec.CmdResult == EnumCmdResult._ACK)
            {
                softAPSetting.m_ssid              = softAPSettingInit.m_ssid = m_rec.SSID;
                softAPSetting.m_pwd               = softAPSettingInit.m_pwd = m_rec.PWD;
                softAPSetting.m_bEnableSoftAp     = softAPSettingInit.m_bEnableSoftAp = m_rec.WifiEnable;
                VOP.MainWindow.m_byWifiInitStatus = 0x01;
            }

            tbSSID.Text = softAPSettingInit.m_ssid;
            tbPWD.Text  = softAPSettingInit.m_pwd;
            chkbtn_wifi_enable.IsChecked = softAPSettingInit.m_bEnableSoftAp;
        }