コード例 #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
コード例 #2
0
        } // cmdStartBaseApp_Click

        // User clicked [Stop Base App] button
        private void cmdStopBaseApp_Click(object sender, EventArgs e)
        {
            if (BaseApplication.Stop())
            {
                cmdInitBaseApp.Enabled  = true;
                cmdStartBaseApp.Enabled = false;
                cmdStopBaseApp.Enabled  = false;
                MessageSuccess("Success stopping Base App.");
            }
            else
            {
                MessageFailure("Failure stopping Base App.");
            }
        } // cmdStopBaseApp_Click
コード例 #3
0
        } // cmdStartBaseApp_Click

        // User clicked [Stop Base App] button
        private void cmdStopBaseApp_Click(object sender, EventArgs e)
        {
            if (BaseApplication.Stop())
            {
                groupPortSettings.Enabled    = true;
                cmdInitBaseApp.Enabled       = true;
                cmdStartBaseApp.Enabled      = false;
                cmdStopBaseApp.Enabled       = false;
                groupCloudRoute.Enabled      = true;
                groupWebMeshSettings.Enabled = true;
                MessageSuccess("Success stopping Base App.");
            }
            else
            {
                MessageFailure("Failure stopping Base App.");
            }
        } // cmdStopBaseApp_Click
コード例 #4
0
        } // cmdInitBaseApp_Click

        // User clicked [Start Base App] button
        private void cmdStartBaseApp_Click(object sender, EventArgs e)
        {
            if (BaseApplication.Start())
            {
                MessageSuccess("Success starting Base App. Click URL to launch browser.");
                textScopeID.Enabled       = false;
                cmdStartBaseApp.Enabled   = false;
                cmdStopBaseApp.Enabled    = true;
                groupPortSettings.Enabled = false;

                linkOpenBrowser.Text = BaseApplication.FetchUrl();
            }
            else
            {
                MessageFailure("Failure starting Base App.");
            }
        } // cmdStartBaseApp_Click
コード例 #5
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