Beispiel #1
0
        // User clicked [Init Base App] button
        private void cmdInitBaseApp_Click(object sender, EventArgs e)
        {
            string strScopeID = textScopeID.Text;
            string strAppID   = m_SDKAppID;

            if (m_StrGuid.Contains("XXXX-XXXX"))
            {
                MessageSuccess("GUID not initialized. Run GuidGen and copy new Guid into code.");
                return;
            }

            BaseApplication.strScopeID = textScopeID.Text;
            bool bEnableRest         = checkEnableREST.Checked;
            bool bEnableMeshRequest  = checkEnableMeshRequest.Checked;
            bool bEnableMeshResponse = checkEnableMeshResponse.Checked;

            ushort usPort   = (radioPort8720.Checked) ? (ushort)8720 : (radioPort8730.Checked ? (ushort)8730 : (ushort)8740);
            string strRoute = (checkNoCloudServiceRoute.Checked ? "" : textCloudServiceRoute.Text);

            if (BaseApplication.Init(m_StrGuid, strScopeID, strAppID, usPort, strRoute, bEnableRest, bEnableMeshRequest, bEnableMeshResponse))
            {
                textScopeID.Text = BaseApplication.strScopeID;
                MessageSuccess("Success initializing Base App.");
                cmdInitBaseApp.Enabled       = false;
                cmdStartBaseApp.Enabled      = true;
                groupCloudRoute.Enabled      = false;
                groupWebMeshSettings.Enabled = false;
            }
            else
            {
                MessageFailure("Failure initializing Base App.");
            }
        } // cmdInitBaseApp_Click
Beispiel #2
0
        // User clicked [Init Base App] button
        private void cmdInitBaseApp_Click(object sender, EventArgs e)
        {
            string strScopeID = textScopeID.Text;
            string strAppID   = m_SDKAppID;

            if (BaseApplication.Init(m_StrGuid, strScopeID, strAppID))
            {
                textScopeID.Text = BaseApplication.strScopeID;
                MessageSuccess("Success initializing Base App.");
                cmdInitBaseApp.Enabled  = false;
                cmdStartBaseApp.Enabled = true;
            }
            else
            {
                MessageFailure("Failure initializing Base App.");
            }
        } // cmdInitBaseApp_Click