コード例 #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //判断权限
            AuthUserOperationPermission(Permission.Edit);
            GameProperty property = new GameProperty
            {
                ID   = IntParam,
                Name = CtrlHelper.GetText(txtName),
                // ExchangeGoldRatio = CtrlHelper.GetInt(txtExchangeGoldRaito, 0),
                ExchangeRatio   = CtrlHelper.GetInt(txtExchangeDiamondRaito, 0),
                UseResultsGold  = CtrlHelper.GetInt(txtUseResultsGold, 0),
                SortID          = CtrlHelper.GetInt(txtSortID, 0),
                BuyResultsGold  = CtrlHelper.GetInt(txtBuyResultsGold, 0),
                RegulationsInfo = CtrlHelper.GetText(txtRegulationsInfo),
                Nullity         = (byte)(ckbNullity.Checked ? 0 : 1),
                Recommend       = (byte)(ckbRecommend.Checked ? 1 : 0)
            };

            try
            {
                FacadeManage.aidePlatformFacade.UpdatePropertyInfo(property);
                ShowInfo("更新成功");
            }
            catch
            {
                ShowInfo("更新失败");
            }
        }
コード例 #2
0
ファイル: Map.cs プロジェクト: n7software/MRobot.Civilization
        internal Map(string name, GameProperty <MapSize> mapSize = null, IEnumerable <GameProperty> mapProperties = null, SaveString saveName = null, Expansion.Expansion requirement = null, IDictionary <MapSize, SaveString> sizedMaps = null)
        {
            Name        = name;
            Path        = saveName;
            Requirement = requirement;
            if (mapProperties != null)
            {
                _MapProperties = new List <GameProperty>(mapProperties);
            }
            else
            {
                _MapProperties = new List <GameProperty>();
            }

            if (mapSize == null)
            {
                mapSize = MapPropertyLib.MapSizeProp;
            }

            if (sizedMaps != null)
            {
                SizedMaps = new Dictionary <MapSize, SaveString>(sizedMaps);
            }

            NumberOfCityStates = new SaveNumber(12, 0, MaxCityStates);
            this._Size         = mapSize;
            AdjustMapSizeSideEffects(mapSize.Value);
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: webdes27/game-updater
        public bool CheckInstalled(bool btm)
        {
            GameProperty p   = RConfig.Instance.getGameProperty(RConfig.Instance.ActiveGame);
            bool         can = p.Installed && p.isEnable();

            if (!p.isEnable())
            {
                UpdateStatusLabel(WordEnum.GAME_IS_DISABLED);
            }

            else if (!p.Installed)
            {
                UpdateStatusLabel(WordEnum.NOT_INSTALLED);
            }

            if (btm)
            {
                _startButton.Enabled = can;
                _fullCheck.Enabled   = can;
            }

            if (can)
            {
                UpdateStatusLabel("");
            }

            return(can);
        }
コード例 #4
0
        private void BindData( )
        {
            if (IntParam <= 0)
            {
                return;
            }

            GameProperty property = FacadeManage.aidePlatformFacade.GetPropertyInfo(IntParam);

            if (property == null)
            {
                return;
            }

            CtrlHelper.SetText(txtName, property.Name);
            // CtrlHelper.SetText(txtExchangeGoldRaito, property.ExchangeGoldRatio.ToString());
            CtrlHelper.SetText(txtExchangeDiamondRaito, property.ExchangeRatio.ToString());
            CtrlHelper.SetText(txtBuyResultsGold, property.BuyResultsGold.ToString());
            CtrlHelper.SetText(txtUseResultsGold, property.UseResultsGold.ToString());
            CtrlHelper.SetText(txtRegulationsInfo, property.RegulationsInfo);
            CtrlHelper.SetText(txtSortID, property.SortID.ToString());
            ckbNullity.Checked   = property.Nullity == 0;
            ckbRecommend.Checked = property.Recommend == 1;

            //禁止用户操作
            NulityInput(property.Kind);
        }
コード例 #5
0
        public static GameSession ParseFromBufferedGameSession(Com.Amazon.Whitewater.Auxproxy.Pbuffer.GameSession gameSession)
        {
            var translation = new GameSession();

            translation.Name                      = gameSession.Name;
            translation.FleetId                   = gameSession.FleetId;
            translation.GameSessionId             = gameSession.GameSessionId;
            translation.MaximumPlayerSessionCount = gameSession.MaxPlayers;
            translation.Port                      = gameSession.Port;
            translation.IpAddress                 = gameSession.IpAddress;
            translation.GameSessionData           = gameSession.GameSessionData;
            translation.MatchmakerData            = gameSession.MatchmakerData;
            translation.DnsName                   = gameSession.DnsName;

            foreach (var gameProperty in gameSession.GameProperties)
            {
                var translatedGameProperty = new GameProperty();

                translatedGameProperty.Key   = gameProperty.Key;
                translatedGameProperty.Value = gameProperty.Value;

                translation.GameProperties.Add(translatedGameProperty);
            }

            return(translation);
        }
コード例 #6
0
ファイル: MainForm.cs プロジェクト: webdes27/game-updater
        private void _fullCheck_Click(object sender, EventArgs e)
        {
            switch (FormState)
            {
            case MainFormState.CHECKING:
                TaskManager.Instance.Close(false);
                break;

            case MainFormState.NONE:
                GameProperty p = RConfig.Instance.getGameProperty(RConfig.Instance.ActiveGame);

                if (!CheckInstalled(true))
                {
                    return;
                }

                if (!p.ListLoader.IsValid)
                {
                    TaskManager.Instance.AddTask(p.ListLoader);
                }

                TaskManager.Instance.AddTask(new AnalyzerTask(p, ListFileType.NORMAL));
                break;
            }
        }
コード例 #7
0
ファイル: MainForm.cs プロジェクト: webdes27/game-updater
        private void MainForm_Shown(object sender, EventArgs e)
        {
            ShowAllItems(true, true, false);

            UpdateAllRSS();

            UpdateStatusLabel("");

            ShowAllItems(false, false, true);

            CheckInstalled(true);

            if (RConfig.Instance.CheckVersionOnStart)
            {
                TaskManager.Instance.AddTask(AssemblyPage.Instance().ListLoader);
            }

            if (RConfig.Instance.CheckCriticalOnStart)
            {
                GameProperty p = RConfig.Instance.getGameProperty(RConfig.Instance.ActiveGame);

                if (!CheckInstalled(false))
                {
                    return;
                }

                if (!p.ListLoader.IsValid)
                {
                    TaskManager.Instance.AddTask(p.ListLoader);
                }

                TaskManager.Instance.AddTask(new AnalyzerTask(p, ListFileType.CRITICAL));
            }
        }
コード例 #8
0
ファイル: Game4.cs プロジェクト: miyu8/Task8_3
 public Game4(GameProperty gameproperty, Grass2Property grass2property, Herbivorous1Property herbivorous1property)
 {
     Type                 = 4;
     gameProperty         = gameproperty;
     grass2Property       = grass2property;
     herbivorous1Property = herbivorous1property;
 }
コード例 #9
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //判断权限
            if (!AuthUserOperationPermission(Permission.Edit))
            {
                return;
            }
            GameProperty property = new GameProperty();

            property.ID              = IntParam;
            property.ExchangeType    = (byte)GameRequest.GetQueryInt("type", 0);
            property.BuyResultsGold  = CtrlHelper.GetInt(txtBuyResultsGold, 0);
            property.ExchangeRatio   = CtrlHelper.GetInt(txtPrice, 0);
            property.Name            = CtrlHelper.GetText(txtName);
            property.Nullity         = Convert.ToByte(ddlSate.SelectedValue);
            property.RegulationsInfo = CtrlHelper.GetText(txtRegulationsInfo);
            property.SortID          = CtrlHelper.GetInt(txtSortID, 0);
            property.UseResultsGold  = CtrlHelper.GetInt(txtUseResultsGold, 0);
            property.BuyResultsGold  = CtrlHelper.GetInt(txtBuyResultsGold, 0);

            int result = FacadeManage.aidePlatformFacade.UpdatePropertyInfo(property);

            if (result > 0)
            {
                ShowInfo("更新成功", "PropertyConfigList.aspx", 500);
            }
            else
            {
                ShowError("更新失败");
            }
        }
コード例 #10
0
        public SimpleGamePanel(GameProperty prop)
        {
            _property       = prop;
            _property.Panel = this;

            InitializeComponent();
        }
コード例 #11
0
        private void BindData( )
        {
            int typeid = GameRequest.GetQueryInt("type", 0);

            if (IntParam <= 0)
            {
                return;
            }

            GameProperty property = FacadeManage.aidePlatformFacade.GetPropertyInfo(IntParam, typeid);

            if (property == null)
            {
                return;
            }

            CtrlHelper.SetText(txtName, property.Name);
            CtrlHelper.SetText(txtBuyResultsGold, property.BuyResultsGold.ToString());
            CtrlHelper.SetText(txtUseResultsGold, property.UseResultsGold.ToString());
            CtrlHelper.SetText(txtRegulationsInfo, property.RegulationsInfo);
            CtrlHelper.SetText(txtSortID, property.SortID.ToString());
            CtrlHelper.SetText(txtPrice, property.ExchangeRatio.ToString());
            ddlType.SelectedValue = property.ExchangeType.ToString();
            ddlType.Enabled       = false;
            ddlSate.SelectedValue = property.Nullity.ToString();

            //禁止用户操作
            NulityInput(property.Kind);
        }
コード例 #12
0
        /// <summary>
        /// 更新道具
        /// </summary>
        /// <param name="property"></param>
        public void UpdateGameProperty(GameProperty property)
        {
            StringBuilder sqlQuery = new StringBuilder( );

            sqlQuery.Append("UPDATE GameProperty SET ")
            .Append("Name=@Name ,")
            .Append("Cash=@Cash,")
            .Append("Gold=@Gold,")
            .Append("Discount=@Discount,")
            .Append("IssueArea=@IssueArea,")
            .Append("ServiceArea=@ServiceArea,")
            .Append("SendLoveLiness=@SendLoveLiness,")
            .Append("RecvLoveLiness=@RecvLoveLiness,")
            .Append("RegulationsInfo=@RegulationsInfo,")
            .Append("Nullity=@Nullity ")
            .Append("WHERE ID= @ID");
            var prams = new List <DbParameter>( );

            prams.Add(Database.MakeInParam("ID", property.ID));
            prams.Add(Database.MakeInParam("Name", property.Name));
            prams.Add(Database.MakeInParam("Cash", property.Cash));
            prams.Add(Database.MakeInParam("Gold", property.Gold));
            prams.Add(Database.MakeInParam("Discount", property.Discount));
            prams.Add(Database.MakeInParam("IssueArea", property.IssueArea));
            prams.Add(Database.MakeInParam("ServiceArea", property.ServiceArea));
            prams.Add(Database.MakeInParam("SendLoveLiness", property.SendLoveLiness));
            prams.Add(Database.MakeInParam("RecvLoveLiness", property.RecvLoveLiness));
            prams.Add(Database.MakeInParam("RegulationsInfo", property.RegulationsInfo));
            prams.Add(Database.MakeInParam("Nullity", property.Nullity));

            Database.ExecuteNonQuery(CommandType.Text, sqlQuery.ToString( ), prams.ToArray( ));
        }
コード例 #13
0
        /// <summary>
        /// 获取道具实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public GameProperty GetGamePropertyInfo(int id)
        {
            string       sqlQuery = string.Format("(NOLOCK) WHERE ID= {0}", id);
            GameProperty property = aideGamePropertyProvider.GetObject <GameProperty>(sqlQuery);

            return(property);
        }
コード例 #14
0
        private void BindData()
        {
            if (StrCmd == "add")
            {
                litInfo.Text = "新增";
            }
            else
            {
                litInfo.Text = "更新";
            }

            if (IntParam <= 0)
            {
                return;
            }

            GameProperty property = FacadeManage.aidePlatformFacade.GetGamePropertyInfo(IntParam);

            if (property == null)
            {
                return;
            }

            //发行范围
            int intIssueArea = property.UseArea;

            if (ckbIssueArea.Items.Count > 0)
            {
                foreach (ListItem item in ckbIssueArea.Items)
                {
                    item.Selected = int.Parse(item.Value) == (intIssueArea & int.Parse(item.Value));
                }
            }
            //使用范围
            int intServiceArea = property.ServiceArea;

            if (ckbServiceArea.Items.Count > 0)
            {
                foreach (ListItem item in ckbServiceArea.Items)
                {
                    item.Selected = int.Parse(item.Value) == (intServiceArea & int.Parse(item.Value));
                }
            }
            CtrlHelper.SetText(txtName, property.Name.ToString());
            CtrlHelper.SetText(txtCash, property.Cash.ToString());
            CtrlHelper.SetText(txtGold, property.Gold.ToString());
            CtrlHelper.SetText(txtUserMedal, property.UserMedal.ToString());
            CtrlHelper.SetText(txtLoveLiness, property.LoveLiness.ToString());

            CtrlHelper.SetText(txtSendLoveLiness, property.SendLoveLiness.ToString());
            CtrlHelper.SetText(txtRecvLoveLiness, property.RecvLoveLiness.ToString());
            CtrlHelper.SetText(txtRegulationsInfo, property.RegulationsInfo);
            CtrlHelper.SetText(txtUseResultsGold, property.UseResultsGold.ToString());
            CtrlHelper.SetText(txtSortID, property.SortID.ToString());
            CtrlHelper.SetText(txtUseResultsValidTime, property.UseResultsValidTime.ToString());
            CtrlHelper.SetText(txtUseResultsValidTimeScoreMultiple, property.UseResultsValidTimeScoreMultiple.ToString());
            ckbNullity.Checked   = property.Nullity == 0;
            ckbRecommend.Checked = property.Recommend == 1;
        }
コード例 #15
0
 /// <summary>
 /// Recycles the specified instance using resource pooling.
 /// </summary>
 /// <remarks>
 /// This method returns the instance to a resource pool from which it can later be obtained
 /// again using <see cref="Create"/>.
 /// </remarks>
 internal void Recycle()
 {
     Property     = new GameProperty <T>();
     OldValue     = default(T);
     NewValue     = default(T);
     CoercedValue = default(T);
     Pool.Recycle(this);
 }
コード例 #16
0
    public void DisplaySelectGameSessionPanel()
    {
        if (myGameLiftClient.gameSessionlist == null)
        {
            return;
        }

        if (myGameLiftClient.gameSessionlist.GameSessions.Count == 0)
        {
            return;
        }

        SelectGameSessionPanel.SetActive(true);

        Transform MyImageTransform = SelectGameSessionPanel.transform.GetChild(0);

        foreach (Transform child in MyImageTransform)
        {
            GameObject.Destroy(child.gameObject);
        }



        int count = 0;

        foreach (GameSession GS in myGameLiftClient.gameSessionlist.GameSessions)
        {
            //TODO: Make this actually dictate what mode the server starts in
            string       boltMode = "";
            GameProperty GP       = GS.GameProperties.Find(x => x.Key == "BoltPro");
            if (GP == null)
            {
                Debug.LogError("Missing Game Property");
            }
            else if (GP.Value == "true")
            {
                boltMode = "Bolt Pro";
            }
            else if (GP.Value == "false")
            {
                boltMode = "Bolt Free";
            }
            else
            {
                Debug.LogError("Missing Game Property Key");
            }

            GameObject button = GameObject.Instantiate(SelectGameSessionButton, MyImageTransform);
            button.GetComponent <RectTransform>().localPosition    += new Vector3(0, (count * -40f), 0);
            button.transform.GetChild(0).GetComponent <Text>().text = "Name: " + GS.Name
                                                                      + " Players: " + +GS.CurrentPlayerSessionCount + "/" + GS.MaximumPlayerSessionCount
                                                                      + " Port: " + GS.Port + " Status: " + GS.Status.ToString() + " GameSessionData: " + GS.GameSessionData
                                                                      + " " + boltMode;

            button.GetComponent <GameLiftSessionButtonController>().GameSessionId = GS.GameSessionId;
            count++;
        }
    }
コード例 #17
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //判断权限
            AuthUserOperationPermission(Permission.Edit);
            string       cash     = CtrlHelper.GetText(txtCash);
            GameProperty property = aideTreasureFacade.GetGamePropertyInfo(IntParam);

            if (property == null)
            {
                return;
            }
            property.Name     = CtrlHelper.GetText(txtName);
            property.Cash     = decimal.Parse(string.IsNullOrEmpty(cash) ? "0" : cash);
            property.Gold     = CtrlHelper.GetInt(txtGold, 0);
            property.Discount = short.Parse(CtrlHelper.GetText(txtDiscount));
            //发行范围
            int intIssueArea = 0;

            if (ckbIssueArea.Items.Count > 0)
            {
                foreach (ListItem item in ckbIssueArea.Items)
                {
                    if (item.Selected)
                    {
                        intIssueArea |= int.Parse(item.Value);
                    }
                }
            }
            //使用范围
            int intServiceArea = 0;

            if (ckbServiceArea.Items.Count > 0)
            {
                foreach (ListItem item in ckbServiceArea.Items)
                {
                    if (item.Selected)
                    {
                        intServiceArea |= int.Parse(item.Value);
                    }
                }
            }
            property.IssueArea       = ( short )intIssueArea;
            property.ServiceArea     = ( short )intServiceArea;
            property.SendLoveLiness  = CtrlHelper.GetInt(txtSendLoveLiness, 0);
            property.RecvLoveLiness  = CtrlHelper.GetInt(txtRecvLoveLiness, 0);
            property.RegulationsInfo = CtrlHelper.GetText(txtRegulationsInfo);
            property.Nullity         = ( byte )(ckbNullity.Checked ? 0 : 1);
            try
            {
                aideTreasureFacade.UpdateGameProperty(property);
                ShowInfo("更新成功");
            }
            catch
            {
                ShowInfo("更新失败");
            }
        }
コード例 #18
0
        /// <summary>
        /// 获取道具名称
        /// </summary>
        /// <param name="propId"></param>
        /// <returns></returns>
        public string GetPropertyName(int propId)
        {
            GameProperty property = FacadeManage.aidePlatformFacade.GetGamePropertyInfo(propId);

            if (property != null)
            {
                return(property.Name);
            }
            return("");
        }
コード例 #19
0
        protected string GetGamePropertyName(int id)
        {
            GameProperty property = FacadeManage.aidePlatformFacade.GetGamePropertyInfo(id);

            if (property != null)
            {
                return(property.Name);
            }
            return("");
        }
コード例 #20
0
    void CreateGameSession(object myCreateGameSessionData)
    {
        LogToMyConsoleMainThread("CreateGameSession");

        CreateGameSessionData CGSD = (CreateGameSessionData)myCreateGameSessionData;



        GameProperty GP0 = new GameProperty();

        GP0.Key = "BoltPro";
#if !BOLT_CLOUD
        GP0.Value = "true";
#endif

#if BOLT_CLOUD
        GP0.Value = "false";
#endif
        List <GameProperty> GPL = new List <GameProperty>();
        GPL.Add(GP0);


        //Request must contain either GameSessionID or FleetID, but not both
        var request = new CreateGameSessionRequest()
        {
            FleetId = staticData.myFleetID,
            MaximumPlayerSessionCount = CGSD.maxPlayers,
            CreatorId       = UniqueID,
            GameSessionData = CGSD.GameSessionData,
            GameProperties  = GPL,
            Name            = "Test" + randomNumber



                              //GameSessionId = "gsess-abc"
        };

        CreateGameSessionResponse CGSR = null;
        try
        {
            CGSR = m_Client.CreateGameSession(request);
        }
        catch (Exception ex)
        {
            Handler(ex);
        }
        if (CGSR == null)
        {
            LogToMyConsoleMainThread("Can't create game session");
        }
        else
        {
            LogToMyConsoleMainThread("Game Session Created: " + CGSR.GameSession.GameSessionId);
        }
    }
コード例 #21
0
        /// <summary>
        /// Creates a new instance using resource pooling.
        /// </summary>
        /// <param name="property">The property.</param>
        /// <param name="oldValue">The old value.</param>
        /// <param name="newValue">The new value.</param>
        /// <returns>
        /// An <see cref="GamePropertyEventArgs{T}"/> instance.
        /// </returns>
        /// <remarks>
        /// This method tries to obtain a free instance from a resource pool. If no instance is
        /// available, a new instance is allocated on the heap. The caller of this method should call
        /// <see cref="Recycle"/> when the instance is no longer needed.
        /// </remarks>
        internal static GamePropertyEventArgs <T> Create(GameProperty <T> property, T oldValue, T newValue)
        {
            var args = Pool.Obtain();

            args.Property = property;
            args.OldValue = oldValue;
            args.NewValue = newValue;

            // Coerced value is initially equal to the new value.
            args.CoercedValue = newValue;
            return(args);
        }
コード例 #22
0
        public ListLoaderTask(GameProperty p)
        {
            _property = p;

            Status = Status.FREE;

            _list.Add(ListFileType.CRITICAL, new LinkedList <ListFile>());
            _list.Add(ListFileType.NORMAL, new LinkedList <ListFile>());
            _list.Add(ListFileType.DELETE, new LinkedList <ListFile>());

            _webClient.DownloadDataCompleted   += client_DownloadDataCompleted;
            _webClient.DownloadProgressChanged += _webClient_DownloadProgressChanged;
        }
コード例 #23
0
    public static CharacterProperty Create(string folder)
    {
        // ScriptableObject.CreateInstance()でインスタンスを生成
        // この時点ではアセット化はされていない
        var asset = CreateInstance <CharacterProperty>();
        // アセット化するにはAssetDatabase.CreateAsset()
        // 拡張子は必ず.assetとする
        GameProperty game = Resources.Load("GameProperty") as GameProperty;

        game.characterProperties.Add(asset);
        AssetDatabase.SaveAssets();
        AssetDatabase.CreateAsset(asset, folder);
        AssetDatabase.Refresh();
        return(asset);
    }
コード例 #24
0
ファイル: PlatformFacade.cs プロジェクト: yuk320/WHJHWeb
        /// <summary>
        /// 编辑道具
        /// </summary>
        /// <param name="gameProperty"></param>
        public void UpdatePropertyInfo(GameProperty gameProperty)
        {
            string sql = " SET " +
                         $" [ExchangeRatio] = {gameProperty.ExchangeRatio}," +
                         //  $" [ExchangeGoldRatio] = {gameProperty.ExchangeGoldRatio}, " +
                         $" [BuyResultsGold] = {gameProperty.BuyResultsGold}, " +
                         $" [UseResultsGold] = {gameProperty.UseResultsGold}, " +
                         $" [RegulationsInfo] = N'{gameProperty.RegulationsInfo}', " +
                         $" [Recommend] = {gameProperty.Recommend}, " +
                         $" [SortID] = {gameProperty.SortID}, " +
                         $" [Nullity] = {gameProperty.Nullity} " +
                         $" WHERE ID={gameProperty.ID} ";

            _aidePlatformData.SetProperty(sql);
        }
コード例 #25
0
ファイル: MainForm.cs プロジェクト: webdes27/game-updater
        public MainForm()
        {
            InitializeComponent();
            //SetStyle(ControlStyles.UserPaint, false);
            SetStyle(ControlStyles.FixedWidth, true);

            ChangeLanguage(true);

            Opacity = 0F;
            _startButton.Enabled = false;
            _fullCheck.Enabled   = false;

            SetVersionTypeUnsafe("0.0.0.0", VersionType.UNKNOWN);

            Shown           += MainForm_Shown;
            _closeBtn.Click += _closeBtn_Click;
            MouseDown       += JPanelTab_MouseDown;
            MouseUp         += JPanelTab_MouseUp;
            MouseMove       += JPanelTab_MouseMove;
            _tabbedPane.ChangeSelectedTabEvent += jTabbedPane1_ChangeSelectedTabEvent;

            EventHandlers.Register(_homePage);
            EventHandlers.Register(_versionInfo);
            EventHandlers.Register(_faqLabel);
            EventHandlers.Register(_forumLabel);
            EventHandlers.Register(_joinNowLabel);
            EventHandlers.Register(_rulesLabel);

            //добавляем все игры в вкладки);
            foreach (object enu in Enum.GetValues(typeof(Game)))
            {
                var          game = (Game)enu;
                GameProperty prop = RConfig.Instance.getGameProperty(game);
                var          pane =
                    (JPanelTab)
                    ((EnumPane)
                     game.GetType().GetField(game.ToString()).GetCustomAttributes(typeof(EnumPane), false).GetValue(0))
                    .Type.InvokeMember(null, BindingFlags.CreateInstance, null, null, new Object[] { prop });

                _tabbedPane.addTab(pane);

                if (game == RConfig.Instance.ActiveGame)
                {
                    _tabbedPane.SelectedTab = pane;
                }
            }
        }
コード例 #26
0
        private void BindData( )
        {
            if (IntParam <= 0)
            {
                return;
            }

            GameProperty property = aideTreasureFacade.GetGamePropertyInfo(IntParam);

            if (property == null)
            {
                return;
            }

            //发行范围
            int intIssueArea = property.IssueArea;

            if (ckbIssueArea.Items.Count > 0)
            {
                foreach (ListItem item in ckbIssueArea.Items)
                {
                    item.Selected = int.Parse(item.Value) == (intIssueArea & int.Parse(item.Value));
                }
            }
            //使用范围
            int intServiceArea = property.ServiceArea;

            if (ckbServiceArea.Items.Count > 0)
            {
                foreach (ListItem item in ckbServiceArea.Items)
                {
                    item.Selected = int.Parse(item.Value) == (intServiceArea & int.Parse(item.Value));
                }
            }
            CtrlHelper.SetText(txtName, property.Name.ToString( ));
            CtrlHelper.SetText(txtCash, property.Cash.ToString( ));
            CtrlHelper.SetText(txtGold, property.Gold.ToString( ));

            CtrlHelper.SetText(txtDiscount, property.Discount.ToString( ));
            CtrlHelper.SetText(txtSendLoveLiness, property.SendLoveLiness.ToString( ));
            CtrlHelper.SetText(txtRecvLoveLiness, property.RecvLoveLiness.ToString( ));
            CtrlHelper.SetText(txtRegulationsInfo, property.RegulationsInfo);
            ckbNullity.Checked = property.Nullity == 0;
        }
コード例 #27
0
ファイル: Map.cs プロジェクト: n7software/MRobot.Civilization
        internal Map(string name, GameProperty<MapSize> mapSize = null, IEnumerable<GameProperty> mapProperties = null, SaveString saveName = null, Expansion.Expansion requirement = null, IDictionary<MapSize, SaveString> sizedMaps = null)
        {
            Name = name;
            Path = saveName;
            Requirement = requirement;
            if (mapProperties != null)
                _MapProperties = new List<GameProperty>(mapProperties);
            else _MapProperties = new List<GameProperty>();

            if (mapSize == null)
                mapSize = MapPropertyLib.MapSizeProp;

            if (sizedMaps != null)
                SizedMaps = new Dictionary<MapSize, SaveString>(sizedMaps);

            NumberOfCityStates = new SaveNumber(12, 0, MaxCityStates);
            this._Size = mapSize;
            AdjustMapSizeSideEffects(mapSize.Value);
        }
コード例 #28
0
        /// <summary>
        /// 获取手机端登录数据
        /// </summary>
        private static void GetMobileLoginData()
        {
            ConfigInfo webConfig       = Fetch.GetWebSiteConfig();
            string     imageServerHost = webConfig.Field2;
            //获取登录数据
            DataSet ds = FacadeManage.aideNativeWebFacade.GetMobileLoginInfo();
            //获取系统配置信息
            MobileSystemConfig config = GetMobileSystemConfig(ds.Tables[0]);
            //大喇叭道具信息由道具表提供
            GameProperty prop = FacadeManage.aidePlatformFacade.GetGameProperty(306);

            config.DiamondBuyPropCount = prop.ExchangeRatio;
            config.GoldBuyPropCount    = 0;
            //获取客服界面配置
            MobileCustomerService mcs = DataHelper.ConvertRowToObject <MobileCustomerService>(ds.Tables[1].Rows[0]);
            //获取系统公告配置
            IList <NoticeMobile> noticelist = DataHelper.ConvertDataTableToObjects <NoticeMobile>(ds.Tables[2]);
            //获取手机广告图
            IList <AdsMobile> plate = DataHelper.ConvertDataTableToObjects <AdsMobile>(ds.Tables[3]);
            IList <AdsMobile> alert = DataHelper.ConvertDataTableToObjects <AdsMobile>(ds.Tables[4]);

            foreach (AdsMobile ads in plate)
            {
                ads.ResourceURL = ads.ResourceURL.IndexOf("http://", StringComparison.Ordinal) < 0
                    ? imageServerHost + ads.ResourceURL
                    : ads.ResourceURL;
            }
            foreach (AdsMobile ads in alert)
            {
                ads.ResourceURL = ads.ResourceURL.IndexOf("http://", StringComparison.Ordinal) < 0
                    ? imageServerHost + ads.ResourceURL
                    : ads.ResourceURL;
            }
            //输出数据
            _ajv.SetValidDataValue(true);
            _ajv.SetDataItem("systemConfig", config);
            _ajv.SetDataItem("customerService", mcs);
            _ajv.SetDataItem("systemNotice", noticelist);
            _ajv.SetDataItem("adsList", plate);
            _ajv.SetDataItem("adsAlertList", alert);
        }
コード例 #29
0
ファイル: MainForm.cs プロジェクト: webdes27/game-updater
        private void _startButton_Click(object sender, EventArgs e)
        {
            if (FormState != MainFormState.NONE)
            {
                return;
            }

            GameProperty p = RConfig.Instance.getGameProperty(RConfig.Instance.ActiveGame);

            if (!CheckInstalled(true))
            {
                return;
            }

            if (!p.ListLoader.IsValid)
            {
                TaskManager.Instance.AddTask(p.ListLoader);
            }

            TaskManager.Instance.AddTask(new AnalyzerTask(p, ListFileType.CRITICAL));
            TaskManager.Instance.AddTask(new GameStartTask(p));
        }
コード例 #30
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Game != 0)
            {
                hash ^= Game.GetHashCode();
            }
            if (Channel.Length != 0)
            {
                hash ^= Channel.GetHashCode();
            }
            if (ChannelInfo.Length != 0)
            {
                hash ^= ChannelInfo.GetHashCode();
            }
            if (Version != 0)
            {
                hash ^= Version.GetHashCode();
            }
            if (GameProperty != 0)
            {
                hash ^= GameProperty.GetHashCode();
            }
            if (Language != 0)
            {
                hash ^= Language.GetHashCode();
            }
            if (Idfa.Length != 0)
            {
                hash ^= Idfa.GetHashCode();
            }
            if (Ext.Length != 0)
            {
                hash ^= Ext.GetHashCode();
            }
            return(hash);
        }
コード例 #31
0
 set => SetValue(GameProperty, value);