private void selectPanel_SelectedIndexChanged() { if (selectPanel.SelectIndex < 0) { return; } var questConfig = ConfigData.GetQuestConfig(questIds[selectPanel.SelectIndex]); if (!UserProfile.InfoQuest.IsQuestFinish(questConfig.Id)) { return; } colorWord.UpdateText(questConfig.Descript); virtualRegion.SetRegionKey(1,0); virtualRegion.SetRegionKey(2, 0); virtualRegion.SetRegionKey(3, 0); if (!string.IsNullOrEmpty(questConfig.Quest1)) virtualRegion.SetRegionKey(1, SceneBook.GetSceneQuestByName(questConfig.Quest1)); if (!string.IsNullOrEmpty(questConfig.Quest2)) virtualRegion.SetRegionKey(2, SceneBook.GetSceneQuestByName(questConfig.Quest2)); if (!string.IsNullOrEmpty(questConfig.Quest3)) virtualRegion.SetRegionKey(3, SceneBook.GetSceneQuestByName(questConfig.Quest3)); Invalidate(); }
private void selectPanel_SelectedIndexChanged() { selectJobId = jobIdList[baseid + selectPanel.SelectIndex]; JobConfig jobConfig = ConfigData.GetJobConfig(selectJobId); jobDes.UpdateText(jobConfig.Des); virtualRegion.SetRegionKey(1, jobConfig.SkillId); for (int i = 2; i < 5; i++)//把后面的物件都清除下 { virtualRegion.SetRegionKey(i, 0); } cellTypeList.Clear(); if (!UserProfile.Profile.InfoRecord.CheckFlag((uint)MemPlayerFlagTypes.SelectJob)) { #region 显示第一次选职业的奖励 int imgIndex = 2; if (jobConfig.InitialCards != null)//初始卡牌 { foreach (var cardId in jobConfig.InitialCards) { if (cardId > 0) { virtualRegion.SetRegionType(imgIndex, PictureRegionCellType.Card); virtualRegion.SetRegionKey(imgIndex++, cardId); cellTypeList.Add(PictureRegionCellType.Card); } } } if (jobConfig.InitialEquip != null)//初始道具 { foreach (var eid in jobConfig.InitialEquip) { if (eid > 0) { virtualRegion.SetRegionType(imgIndex, PictureRegionCellType.Equip); virtualRegion.SetRegionKey(imgIndex++, eid); cellTypeList.Add(PictureRegionCellType.Equip); } } } if (jobConfig.InitialEquip != null)//初始道具 { foreach (var eid in jobConfig.InitialItem) { if (eid > 0) { virtualRegion.SetRegionType(imgIndex, PictureRegionCellType.Item); virtualRegion.SetRegionKey(imgIndex++, eid); cellTypeList.Add(PictureRegionCellType.Item); } } } #endregion } bitmapButtonSelect.Visible = !jobConfig.InitialLocked || UserProfile.Profile.InfoBasic.AvailJobList.Contains(selectJobId); Invalidate(); }
public void RefreshData(int idx) { id = idx; show = id > 0; if (id > 0) { colorWord.UpdateText(ConfigData.GetLevelInfoConfig(id).Des); } parent.Invalidate(new Rectangle(x, y, width, height)); }
public override void SetScript(string s) { base.SetScript(s); savedStr = Script; Graphics g = parent.CreateGraphics(); colorWord.UpdateText(Script, g); g.Dispose(); }
private void SetupQuestItem() { colorWord.UpdateText(interactBlock.Script); answerList.Clear(); foreach (var sceneQuestBlock in interactBlock.Children) { if (sceneQuestBlock.Disabled) { continue; } answerList.Add(sceneQuestBlock); } }
public ChangeCardForm() { InitializeComponent(); this.bitmapButtonClose.ImageNormal = PicLoader.Read("ButtonBitmap", "CloseButton1.JPG"); bitmapButtonClose.NoUseDrawNine = true; this.bitmapButtonRefresh.ImageNormal = PicLoader.Read("ButtonBitmap", "PlusButton.JPG"); bitmapButtonRefresh.NoUseDrawNine = true; this.bitmapButtonFresh.ImageNormal = PicLoader.Read("ButtonBitmap", "FreshButton.JPG"); bitmapButtonFresh.NoUseDrawNine = true; colorWord = new ColorWordRegion(12, 38, 384, "微软雅黑", 11, Color.White); colorWord.Bold = true; colorWord.UpdateText("|每|Red|24小时||随机更新5条交换公式,交换公式的|Lime|背景颜色||决定交换公式的最高品质。"); }
public override void Init(int width, int height) { base.Init(width, height); Question qes = QuestionBook.GetQuestion(); colorWord.UpdateText(qes.info); radioButton1.Text = qes.GetAns(0); radioButton2.Text = qes.GetAns(1); radioButton3.Text = qes.GetAns(2); radioButton4.Text = qes.GetAns(3); result = qes.GetResult(); guess = qes.GetAns(0); }
public BuyPieceForm() { InitializeComponent(); this.bitmapButtonClose.ImageNormal = PicLoader.Read("ButtonBitmap", "CloseButton1.JPG"); bitmapButtonClose.NoUseDrawNine = true; this.bitmapButtonRefresh.ImageNormal = PicLoader.Read("ButtonBitmap", "PlusButton.JPG"); bitmapButtonRefresh.NoUseDrawNine = true; this.bitmapButtonFresh.ImageNormal = PicLoader.Read("ButtonBitmap", "FreshButton.JPG"); bitmapButtonFresh.NoUseDrawNine = true; this.bitmapButtonDouble.ImageNormal = PicLoader.Read("ButtonBitmap", "MoneyButton.JPG"); bitmapButtonDouble.NoUseDrawNine = true; colorWord = new ColorWordRegion(12, 38, 384, "微软雅黑", 11, Color.White); colorWord.Bold = true; colorWord.UpdateText("|每|Red|6小时||随机更新5条购买素材,素材的|Lime|背景颜色||决定素材的最高品质。"); }
private void SetupQuestItem() { Graphics g = this.CreateGraphics(); colorWord.UpdateText(interactBlock.Script, g); g.Dispose(); answerList.Clear(); foreach (var sceneQuestBlock in interactBlock.Children) { if (sceneQuestBlock.Disabled) { continue; } AddBlockAnswer(sceneQuestBlock); if (sceneQuestBlock.Children != null) { var childScript = sceneQuestBlock.Children[0].Script; if (childScript.StartsWith("fight")) //如果是战斗 { sceneQuestBlock.SetScript(string.Format("|icon.abl1||{0}", sceneQuestBlock.Script)); if (config.CanBribe)//判断战斗贿赂 { int fightLevel = Math.Max(1, eventLevel); var cost = GameResourceBook.OutCarbuncleBribe(UserProfile.InfoBasic.Level, fightLevel); if (UserProfile.InfoBag.HasResource(GameResourceType.Carbuncle, cost)) { var questBlock = SceneQuestBook.GetQuestData(this, EventId, eventLevel, "blockbribe"); questBlock.SetScript(string.Format("|icon.res5||{0}|lime|(消耗{1})", questBlock.Script, cost)); questBlock.Children[0].Children[0].Children[0] = sceneQuestBlock.Children[0].Children[1].Children[0].Children[0];//找到成功的结果 AddBlockAnswer(questBlock); } } } } } }