Ejemplo n.º 1
0
        private void DatabaseBackup()
        {
            if (UIMessageDialog.ShowAskDialog(this, "Are you sure to backup DB?", this.Style) != true)
            {
                return;
            }
            if (SqlCon.State == System.Data.ConnectionState.Closed)
            {
                SqlCon.Open();
            }

            string strSectionName = "MainFrame";
            string strMsg, strCaption;

            strCaption = LocalizationRecourceManager.GetString(strSectionName, "BackupDBCaption");
            if (OVRDataBaseUtils.BackupDB(SqlCon))
            {
                strMsg = LocalizationRecourceManager.GetString(strSectionName, "BackupDBSuccessMsg");
            }
            else
            {
                strMsg = LocalizationRecourceManager.GetString(strSectionName, "BackupDBFailMsg");
            }

            UIMessageDialog.ShowMessageDialog(strMsg, strCaption, false, this.Style);
        }
Ejemplo n.º 2
0
        public void OnMsgFlushSelMatch(Int32 iWndMode, Int32 iMatchID)
        {
            // Is Running
            if (m_bIsRunning)
            {
                MessageBox.Show(LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "mbRunningMatch"), GFCommon.g_strSectionName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            // Not valid MatchID
            if (iMatchID <= 0)
            {
                MessageBox.Show(LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "mbChooseMatch"));
                return;
            }

            m_iCurMatchID     = iMatchID;
            m_iWndMode        = iWndMode;
            m_iCurTeamMatchID = GFCommon.g_ManageDB.GetCurTeamMatchID(m_iCurMatchID);

            GFCommon.g_GFPlugin.SetReportContext("MatchID", m_iCurMatchID.ToString());
            m_bIsRunning = true;

            // Intial Basic Info
            EnableControlButton(true, false);
            GFCommon.g_ManageDB.GetActiveSportInfo();

            InitMatchInfo();
            InitMatchResult();
            return;
        }
        private void Localization()
        {
            this.Text                     = LocalizationRecourceManager.GetString(m_strSectionName, "frmMatchCompetitionPositionInfo");
            this.lbLanguage.Text          = LocalizationRecourceManager.GetString(m_strSectionName, "lbLanguage");
            this.lbMatchName.Text         = LocalizationRecourceManager.GetString(m_strSectionName, "lbMatchName");
            this.lbPositionDes1.Text      = LocalizationRecourceManager.GetString(m_strSectionName, "lbPositionDes1");
            this.lbPositionDes2.Text      = LocalizationRecourceManager.GetString(m_strSectionName, "lbPositionDes2");
            this.lbCompetitorName.Text    = LocalizationRecourceManager.GetString(m_strSectionName, "lbCompetitorName");
            this.LbPositionSourceDes.Text = LocalizationRecourceManager.GetString(m_strSectionName, "LbPositionSourceDes");
            this.lbStartPhase.Text        = LocalizationRecourceManager.GetString(m_strSectionName, "lbStartPhase");
            this.lbPhasePosition.Text     = LocalizationRecourceManager.GetString(m_strSectionName, "lbPhasePosition");

            this.RadioFromPhasePosition.Text = LocalizationRecourceManager.GetString(m_strSectionName, "RadioFromPhasePosition");
            this.RadioFromPhaseRank.Text     = LocalizationRecourceManager.GetString(m_strSectionName, "RadioFromPhaseRank");
            this.RadioFromMatchRank.Text     = LocalizationRecourceManager.GetString(m_strSectionName, "RadioFromMatchRank");
            this.RadioFromMatchHistory.Text  = LocalizationRecourceManager.GetString(m_strSectionName, "RadioFromMatchHistory");

            this.lblSourcePhase.Text               = LocalizationRecourceManager.GetString(m_strSectionName, "lbSourcePhase");
            this.lbPhaseRank.Text                  = LocalizationRecourceManager.GetString(m_strSectionName, "lbPhaseRank");
            this.lblSourcePhaseforMatch.Text       = LocalizationRecourceManager.GetString(m_strSectionName, "lbSourcePhaseforMatch");
            this.lbSourceMatch.Text                = LocalizationRecourceManager.GetString(m_strSectionName, "lbSourceMatch");
            this.lbMatchRank.Text                  = LocalizationRecourceManager.GetString(m_strSectionName, "lbMatchRank");
            this.lbSourcePhaseforHistoryMatch.Text = LocalizationRecourceManager.GetString(m_strSectionName, "lbSourcePhaseforHistoryMatch");
            this.lbHistoryMatch.Text               = LocalizationRecourceManager.GetString(m_strSectionName, "lbHistoryMatch");
            this.lbHistoryMatchRank.Text           = LocalizationRecourceManager.GetString(m_strSectionName, "lbHistoryMatchRank");
            this.lbHistoryLevel.Text               = LocalizationRecourceManager.GetString(m_strSectionName, "lbHistoryLevel");

            this.lbSourceProgress.Text = LocalizationRecourceManager.GetString(m_strSectionName, "lbSourceProgress");
            this.lbProgress.Text       = LocalizationRecourceManager.GetString(m_strSectionName, "lbProgress");
        }
Ejemplo n.º 4
0
        private void btnNonActive_Click(object sender, EventArgs e)
        {
            int    iSelRowsCount = dgvFederation.SelectedRows.Count;
            string strPromotion;

            if (iSelRowsCount <= 0)
            {
                strPromotion = LocalizationRecourceManager.GetString(this.Name, "Operation_Msg");
                DevComponents.DotNetBar.MessageBoxEx.Show(strPromotion);
                return;
            }

            m_arySelIndex.Clear();
            for (int nIndex = 0; nIndex < iSelRowsCount; nIndex++)
            {
                int    iRowIndex  = dgvFederation.SelectedRows[nIndex].Index;
                string strGroupID = dgvFederation.Rows[iRowIndex].Cells["ID"].Value.ToString();

                int iInputKey = 0;
                UpdateFedarationActive(strGroupID, m_iActiveDisciplineID, iInputKey);

                m_arySelIndex.Add(iRowIndex);
            }
            m_iCurSelIdex        = dgvFederation.SelectedRows[0].Index;
            m_bFederationActived = true;
            ResetFederationList(m_iActiveDisciplineID, m_strActiveLanguageCode, m_iGroupType);
        }
Ejemplo n.º 5
0
        private void btnx_Exit_Click(object sender, EventArgs e)
        {
            if (!m_bIsRunning)
            {
                return;
            }

            if (MessageBox.Show(LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "mbExitMatch"), GFCommon.g_strSectionName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                m_bIsRunning = false;
                EnableControlButton(false, true);

                dgvHolePar.Rows.Clear();
                dgvHolePar.Columns.Clear();
                dgvPlayer.Rows.Clear();
                dgvPlayer.Columns.Clear();
                dgvTeam.Rows.Clear();
                dgvTeam.Columns.Clear();

                dgvPlayOffGold.Rows.Clear();
                dgvPlayOffGold.Columns.Clear();
                dgvPlayOffSilver.Rows.Clear();
                dgvPlayOffSilver.Columns.Clear();
                dgvPlayOffBronze.Rows.Clear();
                dgvPlayOffBronze.Columns.Clear();
            }
        }
Ejemplo n.º 6
0
 private void Localization()
 {
     //this.Text = LocalizationRecourceManager.GetString(this.Name, "InfoListFrm");
     this.lbLanguage.Text = LocalizationRecourceManager.GetString(this.Name, "lbLanguage");
     strInfoValue         = LocalizationRecourceManager.GetString("OVRRegister", "lbListInfo_MF");
     this.Text            = strInfoValue;
 }
Ejemplo n.º 7
0
 private void Localization()
 {
     this.Text           = LocalizationRecourceManager.GetString(this.Name, "RegisterDisplayFrm");
     this.lbSex.Text     = LocalizationRecourceManager.GetString(this.Name, "lbSex");
     this.lbEvent.Text   = LocalizationRecourceManager.GetString(this.Name, "lbEvent");
     this.lbRegType.Text = LocalizationRecourceManager.GetString(this.Name, "lbRegType");
 }
Ejemplo n.º 8
0
        void ExportAthleteXml()
        {
            String strExportPath = tbExportPath.Text;

            if (!Directory.Exists(strExportPath))
            {
                MessageBox.Show(LocalizationRecourceManager.GetString(strSectionName, "msgExportPath"));
                return;
            }

            String strExportFile = strExportPath.TrimEnd('\\') + "\\" + BDCommon.g_strExAthleteFileName + ".xml";

            string strXml = BDCommon.g_ManageDB.ExportAthleteXml(strExportFile);

            if (strXml == "")
            {
                DevComponents.DotNetBar.MessageBoxEx.Show("Export athlete xml file failed!The data returned by db is empty.");
            }
            else if (strXml == null)
            {
                DevComponents.DotNetBar.MessageBoxEx.Show("An exception occured during exporting athlete xml file!");
            }
            else
            {
                try
                {
                    File.WriteAllText(strExportFile, strXml, System.Text.Encoding.UTF8);
                    DevComponents.DotNetBar.MessageBoxEx.Show("Export athlete xml file succeed!");
                }
                catch (System.Exception e)
                {
                    DevComponents.DotNetBar.MessageBoxEx.Show(e.ToString());
                }
            }
        }
Ejemplo n.º 9
0
        private void InitControlData()
        {
            GetActiveInfo(ref m_iActiveSportID, ref m_iActiveDisciplineID, ref m_strActiveLanguageCode, ref m_iGroupType);

            if (m_iGroupType == 1)
            {
                this.lbFederation.Text = LocalizationRecourceManager.GetString("OVRRegisterInfo", "lbFederation");
            }
            else if (m_iGroupType == 2)
            {
                this.lbFederation.Text = LocalizationRecourceManager.GetString("OVRRegisterInfo", "lbNOC");
            }
            else if (m_iGroupType == 3)
            {
                this.lbFederation.Text = LocalizationRecourceManager.GetString("OVRRegisterInfo", "lbClub");
            }
            else if (m_iGroupType == 4)
            {
                this.lbFederation.Text = LocalizationRecourceManager.GetString("OVRRegisterInfo", "lbDelegation");
            }
            FillSexCombo();
            FillEventCombo();
            FillRegTypeCombo();
            FillFederationCombo();

            ResetRegisterGrid(false);
        }
Ejemplo n.º 10
0
        bool InitSubMatchSplits()
        {
            Int32 nGamesCount = 0, nTeamSplitCount = 0;

            // Check validation of the match splits count in database, according to the match rule
            if (BDCommon.g_ManageDB.GetMatchSplitCount(m_nCurMatchID, m_nCurMatchType, ref nGamesCount, ref nTeamSplitCount))
            {
                if (m_nGamesCount == nGamesCount && m_nGamesCount != 0)
                {
                    return(true);
                }
            }

            // Create new match splits
            if (1 != BDCommon.g_ManageDB.CreateMatchSplit(m_nCurMatchID, m_nCurMatchType, m_nGamesCount, m_nTeamSplitCount))
            {
                MessageBox.Show(LocalizationRecourceManager.GetString(strSectionName, "mbCreateSplit"));
                EnableMatchInfo(false, false);
                EnableMatchCtrlBtn(false);
                return(false);
            }

            BDCommon.g_BDPlugin.DataChangedNotify(OVRDataChangedType.emSplitAdd, -1, -1, -1, m_nCurMatchID, m_nCurMatchID, null);


            return(true);
        }
Ejemplo n.º 11
0
        bool ChangeTeamSplit(Int32 nSplit)
        {
            // Get Current Split ID
            m_nCurTeamSplitID = (Int32)m_naTeamSplitIDs[nSplit];

            LoadGameSplitIDs(m_nCurTeamSplitID);

            if (!InitPlayerInfo())
            {
                EnableSplitInfo(false, true);
                EnableGameDetail(false, true);
                CheckedTeamSplitRbtn(0);

                MessageBox.Show(LocalizationRecourceManager.GetString(strSectionName, "mbSetTeamPlayers"));
                return(false);
            }

            GetAllGamesResultFromDB();

            // Select 1st Game
            CheckedTeamSplitRbtn(nSplit + 1);
            EnableGameDetail(true, false);

            rad_Game1.Checked = true;
            m_nCurGameOffset  = 0;
            m_nCurGameID      = (Int32)m_naGameIDs[0];
            UpdateAllMatchSplitStatus(BDCommon.STATUS_RUNNING);
            return(true);
        }
Ejemplo n.º 12
0
        private void btnX_Del_Click(object sender, EventArgs e)
        {
            if (DevComponents.DotNetBar.MessageBoxEx.Show(
                    LocalizationRecourceManager.GetString(OVRMatchScheduleModule.GetSectionName(),
                                                          "OVRMatchSchedule_DateFrom_DelTip"),
                    "", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return;
            }

            DataGridViewSelectedRowCollection l_Rows = this.dgv_Date.SelectedRows;

            foreach (DataGridViewRow r in l_Rows)
            {
                int nRow    = r.Index;
                int nReturn = this.DelDate(this.dgv_Date.Rows[nRow].Cells["F_DisciplineDateID"].Value.ToString());
                if (nReturn == 0)
                {
                    string strSectionName = OVRMatchScheduleModule.GetSectionName();
                    string strText        = LocalizationRecourceManager.GetString(strSectionName, "OVRMatchSchedule_DateFrom_DelFailed");
                    DevComponents.DotNetBar.MessageBoxEx.Show(strText, null, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else if (nReturn == -2)
                {
                    string strSectionName = OVRMatchScheduleModule.GetSectionName();
                    string strText        = LocalizationRecourceManager.GetString(strSectionName, "OVRMatchSchedule_DateFrom_DelFailed_F2");
                    DevComponents.DotNetBar.MessageBoxEx.Show(strText, null, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            this.Update_DateGrid();
        }
Ejemplo n.º 13
0
        private void btnX_Add_Click(object sender, EventArgs e)
        {
            string strDate = dateTimeInput1.Value.ToString("yyyy-MM-dd");

            if (strDate == "0001-01-01")
            {
                strDate = "";
            }

            if (strDate.Length == 0)
            {
                return;
            }

            int nReturn = this.AddDate(strDate);

            if (nReturn == 0)
            {
                string strSectionName = OVRMatchScheduleModule.GetSectionName();
                string strText        = LocalizationRecourceManager.GetString(strSectionName, "OVRMatchSchedule_DateFrom_AddFailed");
                DevComponents.DotNetBar.MessageBoxEx.Show(strText, null, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else if (nReturn == -1)
            {
                string strSectionName = OVRMatchScheduleModule.GetSectionName();
                string strText        = LocalizationRecourceManager.GetString(strSectionName, "OVRMatchSchedule_DateFrom_AddFailed_F1");
                DevComponents.DotNetBar.MessageBoxEx.Show(strText, null, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            this.Update_DateGrid();
        }
Ejemplo n.º 14
0
        private bool TestConnection()
        {
            string strPassword = txtPassword.Text;

            _ConnectionString = String.Format(@"Data Source={0};User ID={1};Password={2};Initial Catalog={3};Persist Security Info={4}"
                                              , txtServer.Text, txtUser.Text, strPassword, cmbDatabase.Text, "TRUE");

            using (SqlConnection sqlCon = new SqlConnection(_ConnectionString))
            {
                try
                {
                    sqlCon.Open();
                    sqlCon.Close();
                }
                catch (SqlException ex)
                {
                    string strMsg = "";
                    for (int i = 0; i < ex.Errors.Count; i++)
                    {
                        string strTemp = String.Format("Index #{0}\nErrorNumber: {1}\nMessage: {2}\nLineNumber: {3}\n",
                                                       i, ex.Errors[i].Number, ex.Errors[i].Message, ex.Errors[i].LineNumber);
                        strTemp += "Source: " + ex.Errors[i].Source + "\n" + "Procedure: " + ex.Errors[i].Procedure + "\n";

                        strMsg += strTemp;
                    }
                    string strCaption = LocalizationRecourceManager.GetString("OVRLogin", "DBConnectingError");
                    DevComponents.DotNetBar.MessageBoxEx.Show(strMsg, strCaption, MessageBoxButtons.OK);
                    return(false);
                }
                return(true);
            }
        }
Ejemplo n.º 15
0
 private void Localization()
 {
     this.Text             = LocalizationRecourceManager.GetString(this.Name, "OVRMatchSchedule_OrderInSessionForm");
     labX_StartNumber.Text = LocalizationRecourceManager.GetString(this.Name, "OVRMatchSchedule_OrderInSessionForm_labXStartNumber");
     labX_Step.Text        = LocalizationRecourceManager.GetString(this.Name, "OVRMatchSchedule_OrderInSessionForm_labXStep");
     labX_CodeLength.Text  = LocalizationRecourceManager.GetString(this.Name, "OVRMatchSchedule_OrderInSessionForm_labXCodeLength");
 }
Ejemplo n.º 16
0
 private void Localization()
 {
     this.Text = LocalizationRecourceManager.GetString(this.Name, "frmOVRDisciplineVenueEdit");
     this.lbDiscipline.Text         = LocalizationRecourceManager.GetString(this.Name, "lbDiscipline");
     this.btnAddDisVenue.Tooltip    = LocalizationRecourceManager.GetString(this.Name, "btnAddDisVenue");
     this.btnRemoveDisVenue.Tooltip = LocalizationRecourceManager.GetString(this.Name, "btnRemoveDisVenue");
 }
Ejemplo n.º 17
0
        private void Localization()
        {
            String strSectionName = GVWL.g_WLPlugin.GetSectionName();

            this.Text            = LocalizationRecourceManager.GetString(strSectionName, "OVRWLPlugin_OVRWLDataEntryForm_frmEntryOfficialGroup");
            lbAvailOfficial.Text = LocalizationRecourceManager.GetString(strSectionName, "OVRWLPlugin_OVRWLDataEntryForm_labX_AvailableOfficial");
        }
Ejemplo n.º 18
0
 private void Localization()
 {
     this.Text             = LocalizationRecourceManager.GetString(m_strSectionName, "frmDrawModel");
     this.btnPrevious.Text = LocalizationRecourceManager.GetString(m_strSectionName, "btnPrevious");
     this.btnNext.Text     = LocalizationRecourceManager.GetString(m_strSectionName, "btnNext");
     this.btnCancel.Text   = LocalizationRecourceManager.GetString(m_strSectionName, "btnCancel");
 }
Ejemplo n.º 19
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            if (dgvInfo.SelectedRows.Count < 1)
            {
                return;
            }

            int nRowIdx = dgvInfo.SelectedRows[0].Index;

            string strMsgBox = LocalizationRecourceManager.GetString("OVRRegisterInfo", "DelInfoMsgBox");

            if (DevComponents.DotNetBar.MessageBoxEx.Show(strMsgBox, "", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return;
            }

            int iInfoID = 0;

            iInfoID = Convert.ToInt32(dgvInfo.Rows[nRowIdx].Cells["ID"].Value);

            if (nRowIdx == dgvInfo.Rows.Count - 1)
            {
                m_iSelRowIdx = nRowIdx - 1;
            }
            else
            {
                m_iSelRowIdx = nRowIdx;
            }

            DelInfo(iInfoID);
            FillInfoGrid();
        }
Ejemplo n.º 20
0
        private void Localization()
        {
            String strSectionName = SQCommon.m_strSectionName;

            this.Text    = LocalizationRecourceManager.GetString(strSectionName, "frmModifyTime");
            lb_Regu.Text = LocalizationRecourceManager.GetString(strSectionName, "lbRegu");
        }
Ejemplo n.º 21
0
        private void OVRRegisterDisplayForm_VisibleChanged(object sender, EventArgs e)
        {
            if (dgvRegister.Visible == false)
            {
                return;
            }

            GetActiveInfo(ref m_iActiveSportID, ref m_iActiveDisciplineID, ref m_strActiveLanguageCode, ref m_iGroupType);

            if (m_iGroupType == 1)
            {
                this.lbFederation.Text = LocalizationRecourceManager.GetString(this.Name, "lbFederation");
            }
            else if (m_iGroupType == 2)
            {
                this.lbFederation.Text = LocalizationRecourceManager.GetString(this.Name, "lbNOC");
            }
            else if (m_iGroupType == 3)
            {
                this.lbFederation.Text = LocalizationRecourceManager.GetString(this.Name, "lbClub");
            }
            else if (m_iGroupType == 4)
            {
                this.lbFederation.Text = LocalizationRecourceManager.GetString(this.Name, "lbDelegation");
            }
            FillSexCombo();
            FillEventCombo();
            FillRegTypeCombo();
            FillFederationCombo();

            ResetRegisterGrid(false);
        }
Ejemplo n.º 22
0
        private void InitCtrlStyleContent()
        {
            for (Int32 nCyc = 3; nCyc <= 16; nCyc++)
            {
                this.cbGroupSize.Items.Add(nCyc);
            }

            for (int nCyc = 1; nCyc <= 8; nCyc++)
            {
                this.cbGroupQual.Items.Add(nCyc);
            }

            for (int nCyc = 2; nCyc <= 64; nCyc++)
            {
                this.cbGroupCount.Items.Add(nCyc);
            }

            this.tbStageTitle.Text          = LocalizationRecourceManager.GetString(m_strSectionName, "cbTypeRoundRobin");
            this.tbGroupName.Text           = LocalizationRecourceManager.GetString(m_strSectionName, "KOGroupGroup");
            this.cbGroupSize.SelectedIndex  = 1;
            this.cbGroupQual.SelectedIndex  = 1;
            this.cbGroupCount.SelectedIndex = 2;

            this.radLetter.Checked = true;

            UpdateUI_GroupName();
            UpdateUI_PlayerInfo();
        }
Ejemplo n.º 23
0
        private void Localization()
        {
            //this.Text = LocalizationRecourceManager.GetString(this.Name, "InfoListFrm");
            this.lbLanguage.Text = LocalizationRecourceManager.GetString(this.Name, "lbLanguage");
            this.btnAdd.Tooltip  = LocalizationRecourceManager.GetString(this.Name, "btnAddInfo");
            this.btnDel.Tooltip  = LocalizationRecourceManager.GetString(this.Name, "btnDelInfo");
            this.btnEdit.Tooltip = LocalizationRecourceManager.GetString(this.Name, "btnEditInfo");

            switch (Convert.ToInt32(m_emInfoType))
            {
            case 0:
                strInfoValue = LocalizationRecourceManager.GetString(this.Name, "lbListInfo_Nation");
                break;

            case 1:
                strInfoValue = LocalizationRecourceManager.GetString(this.Name, "lbListInfo_Club");
                break;

            case 2:
                strInfoValue = LocalizationRecourceManager.GetString(this.Name, "lbListInfo_Color");
                break;

            case 4:
                strInfoValue = LocalizationRecourceManager.GetString(this.Name, "lbListInfo_NOC");
                break;
            }
            this.Text = strInfoValue;
        }
Ejemplo n.º 24
0
        private bool StartListen()
        {
            if (m_iServerPort == 0)
            {
                return(false);
            }

            string strSectionName = "OVRNetworkManager";

            m_IsServerRunning = m_server.StartListen(m_strServerEndAddr, m_iServerPort);
            if (m_IsServerRunning)
            {
                this.btnStartListen.Text  = LocalizationRecourceManager.GetString(strSectionName, "btnStopListen");
                pbListenStatus.Image      = global::AutoSports.OVRManagerApp.Properties.Resources.Connected;
                this.tbListenPort.Enabled = false;
            }
            else
            {
                this.btnStartListen.Text  = LocalizationRecourceManager.GetString(strSectionName, "btnStartListen");
                pbListenStatus.Image      = global::AutoSports.OVRManagerApp.Properties.Resources.DisConnected;
                this.tbListenPort.Enabled = true;
            }

            if (EventNetworkStatus != null)
            {
                EventNetworkStatus(m_IsServerRunning);
            }

            return(m_IsServerRunning);
        }
Ejemplo n.º 25
0
        private void Localization()
        {
            this.lb_Sport.Text         = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "lbSportName");
            this.lb_Date.Text          = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "lbDate");
            this.lb_EagleBetter.Text   = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "lbEagleBetter");
            this.lb_Birdie.Text        = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "lbBirdie");
            this.lb_Par.Text           = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "lbPar");
            this.lb_Bogey.Text         = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "lbBogey");
            this.lb_DBgeyWorse.Text    = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "lbDBgeyWorse");
            this.btnx_Schedule.Text    = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxSchedule");
            this.btnx_StartList.Text   = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxStartList");
            this.btnx_Running.Text     = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxRunning");
            this.btnx_Suspend.Text     = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxSuspend");
            this.btnx_Unofficial.Text  = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxUnofficial");
            this.btnx_Official.Text    = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxOfficial");
            this.btnx_Revision.Text    = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxRevision");
            this.btnx_Canceled.Text    = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxCanceled");
            this.btnx_CreateGroup.Text = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxCreateGroup");
            this.btnx_SetTee.Text      = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxSetTee");
            this.btnx_ModifyGroup.Text = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxModifyGroup");
            this.btnx_Course.Text      = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxCourse");
            this.btnx_Exit.Text        = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxExit");
            this.btnx_Draw.Text        = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxDraw");
            this.lb_IP.Text            = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "lbServerIP");
            this.lb_Port.Text          = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "lbServerPort");
            this.btnx_Start.Text       = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxStart");

            this.tbIP.Value = "192.168.1.102";
        }
Ejemplo n.º 26
0
        private void btnConnectServer_Click(object sender, EventArgs e)
        {
            if (m_IsServer || m_client == null)
            {
                return;
            }

            if (m_IsClientRunning)
            {
                string strSectionName = "OVRNetworkManager";
                string strMsgTile     = LocalizationRecourceManager.GetString(strSectionName, "ClientStoppedMsgTitle");
                string strMsgInfo     = LocalizationRecourceManager.GetString(strSectionName, "ClientStoppedMsgInfo");
                if (DevComponents.DotNetBar.MessageBoxEx.Show(this, strMsgInfo, strMsgTile, MessageBoxButtons.YesNo) == DialogResult.No)
                {
                    return;
                }

                m_client.Stop();

                this.btnConnectServer.Text = LocalizationRecourceManager.GetString(strSectionName, "btnConnectServer");
                pbConnectedStatus.Image    = global::AutoSports.OVRManagerApp.Properties.Resources.DisConnected;
                m_IsClientRunning          = false;
            }
            else
            {
                Connect();
            }
        }
Ejemplo n.º 27
0
        public void TimeElapsed(object source, System.Timers.ElapsedEventArgs e)
        {
            if (m_client != null && m_bStartClient)
            {
                string str     = "OnLive";
                byte[] buf     = System.Text.Encoding.GetEncoding("gb2312").GetBytes(str);
                int    nReturn = 0;
                try
                {
                    nReturn = m_client.Client.Send(buf);
                }
                catch (Exception ex)
                {
                    m_bStartClient = false;
                    m_client.Close();
                    this.btnx_Start.Text = LocalizationRecourceManager.GetString(GFCommon.g_strSectionName, "btnxStart");
                    pb_Connect.Image     = global::AutoSports.OVRGFPlugin.Properties.Resources.DisConnected;
                    this.tbIP.Enabled    = true;
                    this.tbPort.Enabled  = true;

                    string strNetErr = "OnLive...Network disconnected...";
                    DevComponents.DotNetBar.MessageBoxEx.Show(strNetErr);
                }
            }
        }
Ejemplo n.º 28
0
        private void btnStartListen_Click(object sender, EventArgs e)
        {
            if (!m_IsServer || m_server == null)
            {
                return;
            }

            if (m_IsServerRunning)
            {
                string strSectionName = "OVRNetworkManager";
                string strMsgTile     = LocalizationRecourceManager.GetString(strSectionName, "ServerStoppedMsgTitle");
                string strMsgInfo     = LocalizationRecourceManager.GetString(strSectionName, "ServerStoppedMsgInfo");
                if (DevComponents.DotNetBar.MessageBoxEx.Show(this, strMsgInfo, strMsgTile, MessageBoxButtons.YesNo) == DialogResult.No)
                {
                    return;
                }

                m_server.StopListen();

                this.tbListenPort.Enabled = true;
                pbListenStatus.Image      = global::AutoSports.OVRManagerApp.Properties.Resources.DisConnected;
                this.btnStartListen.Text  = LocalizationRecourceManager.GetString(strSectionName, "btnStartListen");

                m_IsServerRunning = false;

                if (EventNetworkStatus != null)
                {
                    EventNetworkStatus(m_IsServerRunning);
                }
            }
            else
            {
                StartListen();
            }
        }
Ejemplo n.º 29
0
        private void Localization()
        {
            this.Text        = LocalizationRecourceManager.GetString(this.Name, "frmOVRBasicItemEdit");
            lbLanguage.Text  = LocalizationRecourceManager.GetString(this.Name, "lbLanguage");
            lbLongName.Text  = LocalizationRecourceManager.GetString(this.Name, "lbLongName");
            lbShortName.Text = LocalizationRecourceManager.GetString(this.Name, "lbShortName");
            lbRegCode.Text   = LocalizationRecourceManager.GetString(this.Name, "lbRegCode");
            lbStartDate.Text = LocalizationRecourceManager.GetString(this.Name, "lbStartDate");
            lbEndDate.Text   = LocalizationRecourceManager.GetString(this.Name, "lbEndDate");
            lbSex.Text       = LocalizationRecourceManager.GetString(this.Name, "lbSex");
            lbComment.Text   = LocalizationRecourceManager.GetString(this.Name, "lbComment");

            lbCompetitionType.Text = LocalizationRecourceManager.GetString(this.Name, "lbCompetitionType");
            if (m_emItemType == EItemype.emFunction)
            {
                lbRegType.Text = LocalizationRecourceManager.GetString(this.Name, "lbFunctionCategoryCode");
            }
            else
            {
                lbRegType.Text = LocalizationRecourceManager.GetString(this.Name, "lbType");
            }
            lbOrder.Text = LocalizationRecourceManager.GetString(this.Name, "lbOrder");
            lbGroup.Text = LocalizationRecourceManager.GetString(this.Name, "lbGroup");
            this.cmbGroup.Items.Add(LocalizationRecourceManager.GetString(this.Name, "cmb_Federation"));
            this.cmbGroup.Items.Add(LocalizationRecourceManager.GetString(this.Name, "cmb_NOC"));
            this.cmbGroup.Items.Add(LocalizationRecourceManager.GetString(this.Name, "cmb_Club"));
            this.cmbGroup.Items.Add(LocalizationRecourceManager.GetString(this.Name, "cmb_Delegation"));
            btnOK.Tooltip     = LocalizationRecourceManager.GetString(this.Name, "btnOK");
            btnCancel.Tooltip = LocalizationRecourceManager.GetString(this.Name, "btnCancel");
        }
Ejemplo n.º 30
0
        private void InitCtrlStyleContent()
        {
            for (Int32 nCyc = 1; nCyc <= 7; nCyc++)
            {
                Int32 nSize = (Int32)Math.Pow(2, nCyc);
                this.cbGroupSize.Items.Add(nSize);
            }

            for (int nCyc = 1; nCyc <= 8; nCyc++)
            {
                this.cbGroupQual.Items.Add(nCyc);
            }

            for (int nCyc = 2; nCyc <= 8; nCyc++)
            {
                this.cbGroupCount.Items.Add(nCyc);
            }

            this.tbStageTitle.Text          = LocalizationRecourceManager.GetString(m_strSectionName, "KOStageQual");
            this.tbGroupName.Text           = LocalizationRecourceManager.GetString(m_strSectionName, "KOGroupKnock");
            this.cbGroupSize.SelectedIndex  = 2;
            this.cbGroupCount.SelectedIndex = 2;
            this.cbGroupQual.SelectedIndex  = 1;

            this.radLetter.Checked = true;

            UpdateUI_GroupName();
            UpdateUI_PlayerInfo();
        }