Beispiel #1
0
        private bool SetBuildControl(bool enabled)
        {
            // Note: Can't be used to change tye type of the build control.

            if (enabled)
            {
                if (mBuildCon != null)
                {
                    return(true);
                }

                IBuildControl con;

                if (mContext.Build.BuildData.IsTiled)
                {
                    con = new MultiTileBuildControl();
                }
                else
                {
                    con = new SingleTileBuildControl();
                }

                if (con.Enter(mContext, mDebugContext))
                {
                    mBuildCon = con;
                    return(true);
                }

                return(false);
            }

            if (mBuildCon != null)
            {
                mBuildCon.Exit();
                mBuildCon = null;
            }

            return(true);
        }
Beispiel #2
0
        private bool SetBuildControl(bool enabled)
        {
            // Note: Can't be used to change tye type of the build control.

            if (enabled)
            {
                if (mBuildCon != null)
                    return true;

                IBuildControl con;

                if (mContext.Build.BuildData.IsTiled)
                    con = new MultiTileBuildControl();
                else
                    con = new SingleTileBuildControl();

                if (con.Enter(mContext, mDebugContext))
                {
                    mBuildCon = con;
                    return true;
                }

                return false;
            }

            if (mBuildCon != null)
            {
                mBuildCon.Exit();
                mBuildCon = null;
            }

            return true;
        }