Ejemplo n.º 1
0
        /// <summary>
        /// 资源计算
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ResCalc_Click(object sender, EventArgs e)
        {
            //计算资源按钮点击
            ResCalc.Text = "计算中...";

            string ResUrl = _UrlResources + "&last1={2}&last2={3}&last4={4}";
            string last1  = ((10 - cmbMetProduction.SelectedIndex) * 10).ToString();
            string last2  = ((10 - cmbKriProduction.SelectedIndex) * 10).ToString();
            string last3  = ((10 - cmbEneProduction.SelectedIndex) * 10).ToString();

            if (_Res.DeuLevel != "0")//如果存在重氢分离器,那么就允许计算产量
            {
                ResUrl += "&last3=" + ((10 - cmbDeuProduction.SelectedIndex) * 10).ToString();
            }
            if (_Res.AtomicLevel != "0")//如果存在核电站,那么就允许计算产量
            {
                ResUrl += "&last12=" + ((10 - cmbAtomicProduction.SelectedIndex) * 10).ToString();
            }
            if (_Res.SatelliteLevel != "0")//如果存在太卫,那么就允许计算产量
            {
                ResUrl += "&last212=" + ((10 - cmbSatelliteProduction.SelectedIndex) * 10).ToString();
            }


            _WebWork  = EWebWork.Resources; //载入资源
            _WebState = EWebState.Loading;  //载入中,不允许界面做修改
            _WB.Navigate(string.Format(ResUrl, new object[] { _Session, _PlanetID, last1, last2, last3 }));
            this.Enabled = false;
        }
Ejemplo n.º 2
0
 private void FleetFlyListTimer_Tick(object sender, EventArgs e)
 {
     if (_WebState == EWebState.Free)
     {
         _WebWork  = EWebWork.Fleet;
         _WebState = EWebState.Loading;
         _WB.Navigate(string.Format(FleetUrl, _OGCOntrolManage._Session));
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 防御面板
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Verteidigung_Enter(object sender, EventArgs e)
 {
     if ((_WB.Url != null) && (ErrorRetLoad == false))
     {
         if (_WB.Url.ToString().IndexOf("mode=Verteidigung") > 0)
         {
             return;
         }
     }
     ErrorRetLoad = false;
     _WB.Stop();
     _WB.Navigate(string.Format(_UrlVerteidigung, _Session, _PlanetID));
     _WebWork     = EWebWork.Verteidigung; //载入资源
     _WebState    = EWebState.Loading;     //载入中,不允许界面做修改
     this.Enabled = false;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 资源面板
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void resources_Enter(object sender, EventArgs e)
 {
     if ((_WB.Url != null) && (ErrorRetLoad == false))
     {
         if (_WB.Url.ToString().IndexOf("resources") > 0)
         {
             return;
         }
     }
     ErrorRetLoad = false;
     ResCalc.Text = "数据更新中...";
     _WB.Stop();
     _WB.Navigate(string.Format(_UrlResources, _Session, _PlanetID));
     _WebWork     = EWebWork.Resources; //载入资源
     _WebState    = EWebState.Loading;  //载入中,不允许界面做修改
     this.Enabled = false;
 }
Ejemplo n.º 5
0
        public OGMilitary()
        {
            InitializeComponent();
            _WB.DocumentCompleted     += new WebBrowserDocumentCompletedEventHandler(_Web_DocumentCompleted);
            _WB.ScriptErrorsSuppressed = true;

            InfoFleet.CN();
            //创建表
            CreatDT();
            //创建飞行列表处理类
            _FleetH = new FleetHelper(this);
            //启动飞行列表显示

            //启动舰队列表
            _WebWork  = EWebWork.Fleet;
            _WebState = EWebState.Free;
            FleetFlyList.DataSource = _DTFleetFly;
        }