private void RefreshFrame() { tar = -1; rightSelectTar = -1; leftSelectTar = -1; tooltip.Hide(this); myCursor.ChangeCursor("default"); isDirty = true; Invalidate(new Rectangle(6, 36, 324, 324)); }
private void MainForm_Load(object sender, EventArgs e) { string version = FileVersionInfo.GetVersionInfo(Application.ExecutablePath).FileVersion; Text = string.Format("风月传说 v{0}", version); try { ConfigData.LoadData(); SystemMenuManager.Load(tabPageGame.Width, tabPageGame.Height); MainTipManager.Init(tabPageGame.Height); PanelManager.Init(tabPageGame.Width, tabPageGame.Height); DbSerializer.Init(); } catch (Exception ex) { NLog.Warn(ex); Close(); } tabPageLogin.BackgroundImage = PicLoader.Read("System", "logback.jpg"); passport = WorldInfoManager.LastAccountName; labelAccount.Text = string.Format("账户 {0}", passport); ChangePage(0); myCursor.ChangeCursor("default"); workThread = new Thread(TimeGo); workThread.IsBackground = true; workThread.Start(); }
private void CreatePlayerForm_Load(object sender, EventArgs e) { headId = 1; pictureBoxHead.Image = PicLoader.Read("Player", "1.PNG"); constellation = MathTool.GetRandom(12); type = MathTool.GetRandom(7); bldType = MathTool.GetRandom(4); myCursor.ChangeCursor("default"); }
private void CheckCursor() { string cursorname = "default"; magicRegion.Active = false; if (leftSelectCard != null) { if (leftSelectCard.CardType == CardTypes.Monster) { if (BattleLocationManager.IsPlaceCanSummon(leftSelectCard.CardId, mouseX, mouseY, true)) { cursorname = "summon"; magicRegion.Active = true; } else { var placeMon = BattleLocationManager.GetPlaceMonster(mouseX, mouseY); if (placeMon != null && placeMon.IsLeft && !placeMon.Avatar.MonsterConfig.IsBuilding) { if (MonsterBook.HasTag(leftSelectCard.CardId, "sidekicker") || MonsterBook.HasTag(placeMon.CardId, "sidekickee") || BattleManager.Instance.PlayerManager.LeftPlayer.SpikeManager.HasSpike("sidekickall")) { cursorname = "sidekick"; } } } } else if (leftSelectCard.CardType == CardTypes.Weapon) { LiveMonster lm = BattleLocationManager.GetPlaceMonster(mouseX, mouseY); if (lm != null && lm.CanAddWeapon() && lm.IsLeft) { cursorname = "equip"; } } else if (leftSelectCard.CardType == CardTypes.Spell) { if (mouseX > 0) { SpellConfig spellConfig = ConfigData.GetSpellConfig(leftSelectCard.CardId); if (BattleLocationManager.IsPlaceCanCast(mouseX, mouseY, spellConfig.Target)) { magicRegion.Active = true; cursorname = "cast"; } else { cursorname = "nocast"; } } } } myCursor.ChangeCursor(cursorname); }
} //只有某一子类别的道具可以进入这个背包 public void Init() { show = true; myCursor.ChangeCursor("default"); this.bitmapButtonLeft.ImageNormal = PicLoader.Read("ButtonBitmap", "PreButton.JPG"); bitmapButtonLeft.NoUseDrawNine = true; this.bitmapButtonRight.ImageNormal = PicLoader.Read("ButtonBitmap", "NextButton.JPG"); bitmapButtonRight.NoUseDrawNine = true; items = new MiniItemViewItem[cellCount]; for (int i = 0; i < cellCount; i++) { items[i] = new MiniItemViewItem(i + 1, 30 * (i % 2), i / 2 * 35); } cds = new int[cdCount]; for (int i = 0; i < cellCount; i++) { cds[i] = 0; } RefreshList(); }
private void CreatePlayerForm_Load(object sender, EventArgs e) { headId = 1; pictureBoxHead.Image = PicLoader.Read("Player", "1.png"); for (int i = 0; i < 6; i++) { SetDnaState(MathTool.GetRandom(1 + i * 2, 3 + i * 2), true); } SetDnaState(MathTool.GetRandom(13, 16), true); SetDnaState(MathTool.GetRandom(16, 19), true); SetDnaState(MathTool.GetRandom(19, 23), true); string[] nameHead = { "伟大的", "神秘的", "威猛的", "快乐的", "神奇的", "灵活的" }; string[] nameMiddle = { "火", "水", "蓝", "绿", "雷", "黑" }; string[] nameEnd = { "德", "斯", "卡", "隆", "里", "拉" }; textBoxName.Text = nameHead[MathTool.GetRandom(nameHead.Length)] + nameMiddle[MathTool.GetRandom(nameMiddle.Length)] + nameEnd[MathTool.GetRandom(nameEnd.Length)]; myCursor.ChangeCursor("default"); }
private void MazeWindow_MouseMove(object sender, MouseEventArgs e) { if (e.X > 8 && e.Y > 35 && e.X < 388 && e.Y < 415) { int cellx = (e.X - 8) / 38; int celly = (e.Y - 35) / 38; if (mazeState[cellx + wx, celly + wy] == 1) { myCursor.ChangeCursor("default"); } else if (mazeState[cellx + wx, celly + wy] == 4)//使用过 { myCursor.ChangeCursor("move"); } else { string type = maze.GetItemType(cellx + wx, celly + wy); if (type == "item" || type == "gold" || type == "resource") { myCursor.ChangeCursor("equip"); } else if (type == "mon") { myCursor.ChangeCursor("fight"); } else { myCursor.ChangeCursor("move"); } } } else { myCursor.ChangeCursor("default"); } }
private void WorldMapViewForm_MouseUp(object sender, MouseEventArgs e) { mouseHold = false; myCursor.ChangeCursor("default"); }
private void ChangeAccountForm_Load(object sender, EventArgs e) { textBoxName.Text = Passort; myCursor.ChangeCursor("default"); }