示例#1
0
    public T Open <T>(EView view, bool isCloseOther = true) where T : BaseView
    {
        if (isCloseOther)
        {
            CloseAll();
        }
        switch (view)
        {
        case EView.Start:
            _startView.Open();
            object obj = _startView;
            return((T)obj);

        case EView.End:
            _endView.Open();
            obj = _endView;
            return((T)obj);

        case EView.HUD:
            _hudView.Open();
            obj = _hudView;
            return((T)obj);

        case EView.Win:
            _winView.Open();
            obj = _winView;
            return((T)obj);

        case EView.Plot:
            _plotView.Open();
            obj = _plotView;
            return((T)obj);

        case EView.Popup:
            _popupView.Open();
            obj = _popupView;
            return((T)obj);

        case EView.Message:
            _msgView.Open();
            obj = _msgView;
            return((T)obj);
        }
        return(default(T));
    }