Esempio n. 1
0
        public override void Buscar()
        {
            try
            {
                base.Buscar();

                var usuarios = from a in Conexao.Banco.TB_DIV_STATUS
                               where a.SIGLA_STATUS == (status.SIGLA_STATUS.HasValue() ? status.SIGLA_STATUS : a.SIGLA_STATUS)
                               select a;

                if (Quantidade > 0)
                {
                    usuarios = usuarios.Take(Quantidade);
                }

                gc_Status.DataSource = usuarios.Select(a => new E_STATUS(a)).ToList();
                gv_Status.BestFitColumns();

                status = new E_STATUS();
            }
            catch (Exception excessao)
            {
                Mensagens.Alerta(excessao.Tratar());
            }
        }
Esempio n. 2
0
    private void ChangeStatus(E_STATUS changeStatus)
    {
        // 終了処理
        switch (changeStatus)
        {
        case E_STATUS.START:
            StartFinalize();
            break;

        case E_STATUS.GAME:
            GameFinalize();
            break;

        case E_STATUS.END:
            EndFinalize();
            break;
        }

        eStatus = changeStatus;

        switch (changeStatus)
        {
        case E_STATUS.START:
            StartInitialize();
            break;

        case E_STATUS.GAME:
            GameInitialize();
            break;

        case E_STATUS.END:
            EndInitialize();
            break;
        }
    }
Esempio n. 3
0
        public override void Alterar()
        {
            try
            {
                base.Alterar();

                if (gv_Status.GetSelectedRows().Count() == 0)
                {
                    throw Excessoes.AlterandoSemRegistro();
                }

                using (var forma = new FStatus_Cadastro {
                    Operacao = Operacao.Alterar, status = gv_Status.GetSelectedRow <E_STATUS>()
                })
                {
                    if (forma.ShowDialog() == DialogResult.OK)
                    {
                        status = forma.status;
                        Buscar();
                    }
                }
            }
            catch (Exception excessao)
            {
                Mensagens.Alerta(excessao.Tratar());
            }
        }
Esempio n. 4
0
    // Update is called once per frame
    void Update()
    {
        moveVec = forwardVec * Time.deltaTime * moveSpeed;

        switch (eStatus)
        {
        case E_STATUS.FORWARD:
            this.transform.Translate(moveVec, Space.Self);

            if (Vector3.Distance(this.transform.parent.transform.position, this.transform.position) > maxMove)
            {
                eStatus = E_STATUS.BACK;
            }

            break;

        case E_STATUS.BACK:
            this.transform.Translate(-moveVec, Space.Self);

            if (Vector3.Distance(this.transform.parent.transform.position, this.transform.position) < 10)
            {
                this.transform.parent.SendMessage("DestroyAttackObj");
            }

            break;
        }
    }
Esempio n. 5
0
        public static bool Salvar(E_STATUS status, ref int transacao)
        {
            try
            {
                Conexao.Iniciar(ref transacao);

                Conexao.Banco.CAD_DIV_STATUS(status.OPERACAO.Value(),
                                             status.SIGLA_STATUS,
                                             status.DS_STATUS,
                                             status.ST_TEMPORIZAR ? "S" : "N",
                                             status.ST_AUTORIZAR ? "S" : "N",
                                             status.ST_INICIAR ? "S" : "N",
                                             status.ST_FINALIZAR ? "S" : "N",
                                             status.ST_REGISTRO,
                                             status.ST_INTERNO ? "S" : "N",
                                             status.ST_SOLICITANTE ? "S" : "N");

                Conexao.Enviar();
            }
            catch (Exception excessao)
            {
                Conexao.Voltar(ref transacao);
                throw excessao;
            }

            Conexao.Finalizar(ref transacao);

            return(true);
        }
Esempio n. 6
0
    private void ChangeStatus(E_STATUS changeStatus)
    {
        // 各状態の終了処理
        switch (eStatus)
        {
        case E_STATUS.CREATE:
            CreateFinalize();
            break;

        case E_STATUS.MOVE:
            MoveFinalize();
            break;
        }

        // 初期化処理
        eStatus = changeStatus;
        switch (eStatus)
        {
        case E_STATUS.CREATE:
            CreateInitialize();
            break;

        case E_STATUS.MOVE:
            MoveInitialize();
            break;

        case E_STATUS.OUT:
            OutInitialize();
            break;
        }
    }
Esempio n. 7
0
        public override void Salvar()
        {
            try
            {
                cpc_DadosGerais.Controls.Validate();

                status = new E_STATUS
                {
                    OPERACAO       = Operacao,
                    SIGLA_STATUS   = cte_SiglaStatus.Text.Treat(),
                    DS_STATUS      = cte_Descricao.Text.Treat(),
                    ST_TEMPORIZAR  = cce_Temporizar.Checked,
                    ST_AUTORIZAR   = cce_Autorizar.Checked,
                    ST_INICIAR     = cce_Iniciar.Checked,
                    ST_FINALIZAR   = cce_Finalizar.Checked,
                    ST_INTERNO     = cce_Interno.Checked,
                    ST_SOLICITANTE = cce_Solicitante.Checked,
                    ST_REGISTRO    = cce_Ativo.Checked ? "A" : "C"
                };

                var transacao = 0;

                if (C_STATUS.Salvar(status, ref transacao))
                {
                    Finalizar();
                }
            }
            catch (Exception excessao)
            {
                Mensagens.Alerta(excessao.Tratar());
            }
        }
Esempio n. 8
0
        public Event(int ch, E_STATUS type, params int[] value)
        {
            Tick  = 0;
            Track = 0;
            switch (value.Length)
            {
            case 1:
                Data = new byte[] {
                    (byte)((byte)type | ch),
                    (byte)value[0]
                };
                break;

            case 2:
                Data = new byte[] {
                    (byte)((byte)type | ch),
                    (byte)value[0],
                    (byte)value[1]
                };
                break;

            default:
                Data = new byte[] {
                    (byte)((byte)type | ch)
                };
                break;
            }
        }
    public void AddScene(string sAddScene, SceneAdditiveContext.onSceneLoaded loaded = null)
    {
        //Debug.Log("@@@@@@@@@@@@@++++++AddScene: "+sAddScene);
        mAddLevelNameList.Add(sAddScene);
        SceneAdditiveContext ctx = new SceneAdditiveContext(sAddScene, loaded);

        mAddLevelList.Add(ctx);
        if (meStatus == E_STATUS.E_IDOL)
        {
            meStatus = E_STATUS.E_START_LOADADD;
        }
    }
    public void ChangeScene(string sNextScene)
    {
        if (meStatus != E_STATUS.E_IDOL)
        {
            Debug.LogWarning("You can't load two scene sync");
            return;
        }
        mAddLevelList.Clear();
        mAddLevelNameList.Clear();
        msPreSceneName = msNextLevel;
        msNextLevel    = sNextScene;
        meStatus       = E_STATUS.E_START_LOAD;

        OnPreSceneSwitch();

        //mAsyncOP = Application.LoadLevelAsync(sNextScene);
        //Debug.Log ("Start Load Level " + sNextScene);
    }
Esempio n. 11
0
        public override void Adicionar()
        {
            try
            {
                base.Adicionar();

                using (var forma = new FStatus_Cadastro {
                    Operacao = Operacao.Cadastrar
                })
                {
                    if (forma.ShowDialog() == DialogResult.OK)
                    {
                        status = forma.status;
                        Buscar();
                    }
                }
            }
            catch (Exception excessao)
            {
                Mensagens.Alerta(excessao.Tratar());
            }
        }
Esempio n. 12
0
    private void ChangeStatus(E_STATUS changeStatus)
    {
        // 終了処理
        switch (eStatus)
        {
        case E_STATUS.ACTIVE:
            ActiveFinalize();
            break;

        case E_STATUS.DAMAGE:
            DamageFinalize();
            break;

        case E_STATUS.CRASH:
            CrashFinalize();
            break;
        }

        eStatus = changeStatus;

        // 初期化処理
        switch (eStatus)
        {
        case E_STATUS.ACTIVE:
            ActiveInitialize();
            break;

        case E_STATUS.DAMAGE:
            DamageInitialize();
            break;

        case E_STATUS.CRASH:
            CrashInitilize();
            break;
        }
    }
 public void AddScene(string sAddScene, SceneAdditiveContext.onSceneLoaded loaded = null)
 {
     //Debug.Log("@@@@@@@@@@@@@++++++AddScene: "+sAddScene);
     mAddLevelNameList.Add (sAddScene);
     SceneAdditiveContext ctx = new SceneAdditiveContext (sAddScene, loaded);
     mAddLevelList.Add (ctx);
     if (meStatus == E_STATUS.E_IDOL) {
         meStatus = E_STATUS.E_START_LOADADD;
     }
 }
Esempio n. 14
0
 /// <summary>
 /// 子供を奪われた時の処理
 /// </summary>
 public void RobbedChildren()
 {
     eStatus = E_STATUS.CRASH;
 }
    // Update is called once per frame
    void Update()
    {
        switch (meStatus)
        {
        case E_STATUS.E_IDOL:
            if (mAddLevelList.Count > 0)
            {
                meStatus = E_STATUS.E_START_LOADADD;
            }
            break;

        case E_STATUS.E_START_LOAD:
            //meStatus = E_STATUS.E_LOADING;
        {
            (Singlton.getInstance("NvSoundController") as NvSoundController).StopBgm();
            FadeTo(gameObject, "OnFadeEnd", 0.9f, 0.5f);
            m_UIMgr.ShowLoadingIndicatorWithProgress(true);
            m_UIMgr.SetLoadingProgressAlpha(1);
            m_UIMgr.SetLoadingProgress(0);
            iTween.ValueTo(gameObject, iTween.Hash("name", "LoadingPgBar", "from", 0, "to", 1, "time", 5, "easetype", iTween.EaseType.linear,
                                                   "onupdate", "SetPg" /*, "oncompletetarget", gameObject, "oncomplete", "LoadingProgressEnd"*/));
            //m_UIMgr.SetLoadingProgress( mAsyncOP.progress );
            meStatus        = E_STATUS.E_START_LOAD_FADE;
            m_StartFadeTime = 0;
        }
        break;

        case E_STATUS.E_START_LOAD_FADE:
            m_StartFadeTime += Time.deltaTime;
            if (m_StartFadeTime > m_MaxFadeTime)
            {
                Debug.LogWarning("YYYYYYYYYYYYYY Start Load" + msNextLevel);
                mAsyncOP = Application.LoadLevelAsync(msNextLevel);
                meStatus = E_STATUS.E_LOADING;
            }
            //GUITexture tx = m_GuiTexture.GetComponent (typeof(GUITexture)) as GUITexture;
            //Debug.Log (" Fade is " + tx.color.a);
            //GUITexture tx = m_GuiTexture.GetComponent (typeof(GUITexture)) as GUITexture;
            //if (tx.color.a > 0.9f) {
            //	mAsyncOP = Application.LoadLevelAsync (msNextLevel);
            //	meStatus = E_STATUS.E_LOADING;
            //}

            break;

        case E_STATUS.E_START_LOADADD:
            msCurrentLoadingLevel = mAddLevelList [0].GetSceneName();
            mAsyncOP = Application.LoadLevelAdditiveAsync(msCurrentLoadingLevel);
            //Debug.Log ("Start Load Additive Level " + msCurrentLoadingLevel);
            meStatus = E_STATUS.E_LOADINGADD;
            break;

        case E_STATUS.E_LOADING:
            if (mAsyncOP != null && mAsyncOP.isDone)
            {
                meStatus = E_STATUS.E_END_LOAD;
                OnSceneSwitch();
            }
            break;

        case E_STATUS.E_LOADINGADD:
            if (mAsyncOP != null && mAsyncOP.isDone)
            {
                FinishAddScene(msCurrentLoadingLevel);
                msCurrentLoadingLevel = null;
                meStatus = E_STATUS.E_END_LOADADD;
            }
            break;

        case E_STATUS.E_END_LOADADD:
        {
            mAsyncOP = null;
            meStatus = E_STATUS.E_IDOL;
        }
        break;

        case E_STATUS.E_END_LOAD:
        {
            mAsyncOP = null;
            m_UIMgr.SetLoadingProgress(1);
            m_UIMgr.EnableCLRCam(false);
            iTween.StopByName(gameObject, "LoadingPgBar");
            //m_UIMgr.ShowLoadingIndicatorWithProgress(false);

            iTween.ValueTo(gameObject, iTween.Hash("name", "FadePgBar", "from", 1, "to", 0, "time", 1, "easetype", iTween.EaseType.linear,
                                                   "onupdate", "FadePgBar", "oncompletetarget", gameObject, "oncomplete", "PgBarFadeEnd"));

            FadeTo(gameObject, "OnFadeInEnd", 0.01f, 1);
            meStatus = E_STATUS.E_IDOL;
        }
        break;

        default:
            break;
        }
    }
    public void ChangeScene(string sNextScene)
    {
        if (meStatus != E_STATUS.E_IDOL) {
            Debug.LogWarning ("You can't load two scene sync");
            return;
        }
        mAddLevelList.Clear ();
        mAddLevelNameList.Clear ();
        msPreSceneName = msNextLevel;
        msNextLevel = sNextScene;
        meStatus = E_STATUS.E_START_LOAD;

        OnPreSceneSwitch();

        //mAsyncOP = Application.LoadLevelAsync(sNextScene);
        //Debug.Log ("Start Load Level " + sNextScene);
    }
 void Awake()
 {
     meStatus = E_STATUS.E_IDOL;
 }
 public void OnFadeEnd()
 {
     //Debug.LogWarning("XXXXXXXXXXXXXXXX Start Load" + msNextLevel );
     mAsyncOP = Application.LoadLevelAsync (msNextLevel);
     meStatus = E_STATUS.E_LOADING;
 }
 public void OnFadeEnd()
 {
     //Debug.LogWarning("XXXXXXXXXXXXXXXX Start Load" + msNextLevel );
     mAsyncOP = Application.LoadLevelAsync(msNextLevel);
     meStatus = E_STATUS.E_LOADING;
 }
    // Update is called once per frame
    void Update()
    {
        switch (meStatus) {
            case E_STATUS.E_IDOL:
                if (mAddLevelList.Count > 0) {
                    meStatus = E_STATUS.E_START_LOADADD;
                }
                break;

            case E_STATUS.E_START_LOAD:
            //meStatus = E_STATUS.E_LOADING;
            {
                (Singlton.getInstance ("NvSoundController") as NvSoundController).StopBgm ();
                FadeTo(gameObject, "OnFadeEnd",  0.9f, 0.5f);
                m_UIMgr.ShowLoadingIndicatorWithProgress(true);
                m_UIMgr.SetLoadingProgressAlpha(1);
                m_UIMgr.SetLoadingProgress(0);
                iTween.ValueTo(gameObject, iTween.Hash("name", "LoadingPgBar","from", 0, "to", 1, "time", 5, "easetype", iTween.EaseType.linear,
                "onupdate", "SetPg"/*, "oncompletetarget", gameObject, "oncomplete", "LoadingProgressEnd"*/));
                //m_UIMgr.SetLoadingProgress( mAsyncOP.progress );
                meStatus = E_STATUS.E_START_LOAD_FADE;
                m_StartFadeTime = 0;
            }
                break;

            case E_STATUS.E_START_LOAD_FADE:
                m_StartFadeTime += Time.deltaTime;
                if (m_StartFadeTime > m_MaxFadeTime ){
                    Debug.LogWarning("YYYYYYYYYYYYYY Start Load" + msNextLevel );
                    mAsyncOP = Application.LoadLevelAsync (msNextLevel);
                    meStatus = E_STATUS.E_LOADING;
                }
                //GUITexture tx = m_GuiTexture.GetComponent (typeof(GUITexture)) as GUITexture;
                //Debug.Log (" Fade is " + tx.color.a);
            //GUITexture tx = m_GuiTexture.GetComponent (typeof(GUITexture)) as GUITexture;
            //if (tx.color.a > 0.9f) {
            //	mAsyncOP = Application.LoadLevelAsync (msNextLevel);
            //	meStatus = E_STATUS.E_LOADING;
            //}

                break;

            case E_STATUS.E_START_LOADADD:
                msCurrentLoadingLevel = mAddLevelList [0].GetSceneName ();
                mAsyncOP = Application.LoadLevelAdditiveAsync (msCurrentLoadingLevel);
                //Debug.Log ("Start Load Additive Level " + msCurrentLoadingLevel);
                meStatus = E_STATUS.E_LOADINGADD;
                break;

            case E_STATUS.E_LOADING:
                if (mAsyncOP != null && mAsyncOP.isDone) {
                    meStatus = E_STATUS.E_END_LOAD;
                    OnSceneSwitch ();
                }
                break;

            case E_STATUS.E_LOADINGADD:
                if (mAsyncOP != null && mAsyncOP.isDone) {
                    FinishAddScene (msCurrentLoadingLevel);
                    msCurrentLoadingLevel = null;
                    meStatus = E_STATUS.E_END_LOADADD;
                }
                break;

            case E_STATUS.E_END_LOADADD:
                {
                    mAsyncOP = null;
                    meStatus = E_STATUS.E_IDOL;
                }
                break;

            case E_STATUS.E_END_LOAD:
                {
                    mAsyncOP = null;
                    m_UIMgr.SetLoadingProgress( 1 );
                    m_UIMgr.EnableCLRCam(false);
                    iTween.StopByName(gameObject, "LoadingPgBar");
                    //m_UIMgr.ShowLoadingIndicatorWithProgress(false);

                    iTween.ValueTo(gameObject, iTween.Hash("name", "FadePgBar", "from", 1, "to", 0, "time", 1, "easetype", iTween.EaseType.linear,
                "onupdate", "FadePgBar", "oncompletetarget", gameObject, "oncomplete", "PgBarFadeEnd"));

                    FadeTo(gameObject, "OnFadeInEnd", 0.01f, 1 );
                    meStatus = E_STATUS.E_IDOL;
                }
                break;

            default:
                break;
        }
    }
 void Awake()
 {
     meStatus = E_STATUS.E_IDOL;
 }