예제 #1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public FrmOpenC()
 {
     InitializeComponent();
     this.Text = "打开查询库";
     this.Name = "frmOpenC";
     InitGridListBind();
     this.DoubleBuffered = true;
     waitingPanel        = new WaitingPanel(this);
 }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="oilInfoBEntity"></param>
        public FrmOilDataC(int OilInfoID)
        {
            InitializeComponent();

            this._oilInfoID = OilInfoID;
            this.tabControl1.SelectedTab = this.tabPage1;
            this._selectGridView         = this.dataGridView1;
            oilEdit = new GridOilDataEdit(this._oilInfoID);
            initDataGridView();
            waitingPanel = new WaitingPanel(this);
        }
예제 #3
0
    public void DisableAllPanels()
    {
        LoadingPanel.SetActive(false);

        AccountPanel.SetActive(false);
        ProcessPanel.SetActive(false);

        LobbyPanel.SetActive(false);
        CharacterSelectPanel.SetActive(false);
        ProfilePanel.SetActive(false);
        ShopPanel.SetActive(false);
        FriendsPanel.SetActive(false);
        GameModePanel.SetActive(false);
        SettingsPanel.SetActive(false);
        AboutPanel.SetActive(false);
        WaitingPanel.SetActive(false);
    }
예제 #4
0
 private void WaitingRoom(int maxPlayers)
 {
     playersFoundText.text = PhotonNetwork.PlayerList.Length + "/" + maxPlayers + " Players";
     if (PhotonNetwork.PlayerList.Length == maxPlayers && PhotonNetwork.IsMasterClient)
     {
         Waiting = false;
         WaitingPanel.SetActive(false);
         if (maxPlayers == 1)
         {
             LoadArena("TrainingLevel");
         }
         else if (maxPlayers == 2)
         {
             LoadArena("SoloLevel");
         }
         else
         {
             LoadArena("QuadLevel");
         }
     }
 }
예제 #5
0
 private void CheckTurn()
 {
     if (!this.InvokeRequired)
     {
         if (isMyTurn && isFinished == false)
         {
             WaitingPanel.Hide();
             SetEnabled(true);
         }
         else
         {
             WaitingPanel.Show();
             SetEnabled(false);
             GetDataFromOthers();
         }
         ReSetBoard();
     }
     else
     {
         this.Invoke((MethodInvoker) delegate { CheckTurn(); });
     }
 }
예제 #6
0
    public void OnClick_ReadyUp()
    {
        LobbyPanel.SetActive(false);
        WaitingPanel.SetActive(true);

        if (gameModeText.text == "Solo")
        {
            PlayerPrefs.SetString("MatchLength", "180");
            playersFoundText.text = "0/2 Players";
            PhotonNetwork.JoinRandomRoom(null, 2, MatchmakingMode.FillRoom, null, null);
        }
        else if (gameModeText.text == "Quad")
        {
            PlayerPrefs.SetString("MatchLength", "300");
            playersFoundText.text = "0/4 Players";
            PhotonNetwork.JoinRandomRoom(null, 4, MatchmakingMode.FillRoom, null, null);
        }
        else if (gameModeText.text == "Training")
        {
            PlayerPrefs.SetString("MatchLength", "480");
            playersFoundText.text = "0/1 Players";
            CreateCustomRoom(1);
        }
    }
예제 #7
0
 /// <summary>
 ///
 /// </summary>
 public FrmOilDataC()
 {
     InitializeComponent();
     waitingPanel = new WaitingPanel(this);
 }
예제 #8
0
 public WaitingPanelMediator(WaitingPanel lobbyPanel) : base(NAME)
 {
     m_viewComponent = lobbyPanel;
 }
예제 #9
0
 private void CheckBoard()
 {
     if (!this.InvokeRequired)
     {
         // V Check
         if (board[0][0] != 0 && board[0][1] != 0 && board[0][1] != 0 && board[0][0] == board[0][1] && board[0][1] == board[0][2] && board[0][0] == board[0][2])
         {
             // V0
             isFinished = true;
             if ((isServer && board[0][0] == 1) || (!isServer && board[0][0] == 2))
             {
                 isWinner = true;
             }
         }
         else if (board[1][0] != 0 && board[1][1] != 0 && board[1][1] != 0 && board[1][0] == board[1][1] && board[1][1] == board[1][2] && board[1][0] == board[1][2])
         {
             // V1
             isFinished = true;
             if ((isServer && board[1][0] == 1) || (!isServer && board[1][0] == 2))
             {
                 isWinner = true;
             }
         }
         else if (board[2][0] != 0 && board[2][1] != 0 && board[2][1] != 0 && board[2][0] == board[2][1] && board[2][1] == board[2][2] && board[2][0] == board[2][2])
         {
             // V2
             isFinished = true;
             if ((isServer && board[2][0] == 1) || (!isServer && board[2][0] == 2))
             {
                 isWinner = true;
             }
         }
         // H Check
         else if (board[0][0] != 0 && board[1][0] != 0 && board[2][0] != 0 && board[0][0] == board[1][0] && board[1][0] == board[2][0] && board[0][0] == board[2][0])
         {
             // H0
             isFinished = true;
             if ((isServer && board[0][0] == 1) || (!isServer && board[0][0] == 2))
             {
                 isWinner = true;
             }
         }
         else if (board[0][1] != 0 && board[1][1] != 0 && board[2][1] != 0 && board[0][1] == board[1][1] && board[1][1] == board[2][1] && board[0][1] == board[2][1])
         {
             // H1
             isFinished = true;
             if ((isServer && board[0][1] == 1) || (!isServer && board[0][1] == 2))
             {
                 isWinner = true;
             }
         }
         else if (board[0][2] != 0 && board[1][2] != 0 && board[2][2] != 0 && board[0][2] == board[1][2] && board[1][2] == board[2][2] && board[0][2] == board[2][2])
         {
             // H2
             isFinished = true;
             if ((isServer && board[0][2] == 1) || (!isServer && board[0][2] == 2))
             {
                 isWinner = true;
             }
         }
         // D Check
         else if (board[0][0] != 0 && board[1][1] != 0 && board[2][2] != 0 && board[0][0] == board[1][1] && board[1][1] == board[2][2] && board[0][0] == board[2][2])
         {
             // D->
             isFinished = true;
             if ((isServer && board[0][0] == 1) || (!isServer && board[0][0] == 2))
             {
                 isWinner = true;
             }
         }
         else if (board[0][2] != 0 && board[1][1] != 0 && board[2][0] != 0 && board[2][0] == board[1][1] && board[1][1] == board[0][2] && board[2][0] == board[0][2])
         {
             // D<-
             isFinished = true;
             if ((isServer && board[1][1] == 1) || (!isServer && board[1][1] == 2))
             {
                 isWinner = true;
             }
         }
         if (isFinished)
         {
             SetEnabled(true);
             isMyTurn = false;
             ReSetBoard();
             WaitingPanel.Hide();
             if (isWinner)
             {
                 MessageBox.Show(null, "You Win!!", "Result Screen", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             else
             {
                 MessageBox.Show(null, "You Lose!!", "Result Screen", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             Environment.Exit(0);
         }
     }
     else
     {
         this.Invoke((MethodInvoker) delegate { CheckBoard(); });
     }
 }
예제 #10
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            bSearch = GetTemplateChild("bSearch") as Button;
            _tKeyword = GetTemplateChild("tKeyword") as TextBox;

            PCGrid = GetTemplateChild("userGrid") as DataGrid;
            _pager = GetTemplateChild("pager") as DataPager;

            _rbPC = GetTemplateChild("rbPC") as RadioButton;
            _rbDomain = GetTemplateChild("rbDomain") as RadioButton;

            _waiting = GetTemplateChild("waiting") as WaitingPanel;

            BeginDownload();
        }