private void EditTreeNode() { TreeNode node = this.treeViewCriteria.SelectedNode; if (null == node) { MessageBox.Show("please select the node which you want to edit. ", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } MatchField f = node.Tag as MatchField; if (f != null) { FConfigCriteria frm = new FConfigCriteria(); frm.SaveCriteria += new SaveCondidtionEventHandler(EditCriteria); frm.ShowDialog(this, f); return; } FConfigJoinNode frmNode = new FConfigJoinNode(); frmNode.SaveNode += new SaveNodeEventHandler(EditJoinNode); frmNode.ShowDialog(this, node.Tag as MatchFieldNode); }
private MatchField GetCriteria() { MatchField mf = new MatchField(); mf.LogicOperator = (LogicOperator)Enum.Parse(typeof(LogicOperator), comboBoxLogicOperator.Text); mf.TableName = comboBoxOutTable.Text; mf.FieldName = comboBoxOutField.Text; mf.FixValue = GetCriteriaValue(); return(mf); }
private void LoadCriteria(MatchField criteria) { GWDataDBField[] fields = GWDataDBField.GetFields((GWDataDBTable)Enum.Parse(typeof(GWDataDBTable), criteria.TableName)); this.comboBoxOutField.Items.Clear(); foreach (GWDataDBField field in fields) { this.comboBoxOutField.Items.Add(field.FieldName); } this.comboBoxOutTable.Text = criteria.TableName; this.comboBoxOutField.Text = criteria.FieldName; this.comboBoxLogicOperator.Text = criteria.LogicOperator.ToString(); if (criteria.FixValue.ValueType == FieldValueType.FixValue) { this.textBoxFixValue.Text = criteria.FixValue.Value; this.radioButtonFixValue.Checked = true; this.radioButtonInboundField.Checked = false; textBoxFixValue.Enabled = true; comboBoxInTable.Enabled = false; comboBoxInField.Enabled = false; } else { fields = GWDataDBField.GetFields((GWDataDBTable)Enum.Parse(typeof(GWDataDBTable), criteria.FixValue.InboundTableName)); this.comboBoxInField.Items.Clear(); foreach (GWDataDBField field in fields) { this.comboBoxInField.Items.Add(field.FieldName); } this.comboBoxInTable.Text = criteria.FixValue.InboundTableName; this.comboBoxInField.Text = criteria.FixValue.InboundFieldName; this.radioButtonFixValue.Checked = false; this.radioButtonInboundField.Checked = true; textBoxFixValue.Enabled = false; comboBoxInTable.Enabled = true; comboBoxInField.Enabled = true;; } }
private void SaveMatchFieldNode(MatchFieldNode parentMFNode, TreeNode node) { MatchField mf = node.Tag as MatchField; if (null != mf) { parentMFNode.MatchFields.Add(mf); return; } MatchFieldNode mfNode = new MatchFieldNode(); MatchFieldNode mfNodeOld = node.Tag as MatchFieldNode; mfNode.JoinOperator = mfNodeOld.JoinOperator; foreach (TreeNode childNode in node.Nodes) { SaveMatchFieldNode(mfNode, childNode); } parentMFNode.ChildNodes.Add(mfNode); }
public void ShowDialog(IWin32Window owner, MatchField criteria) { _isNew = false; LoadCriteria(criteria); this.ShowDialog(owner); }
public IEnumerator CreateMap(int level) { //加载当前地图 Fight.LevelProfile.NewCurrentLevelProfile = Fight.Level.AllLevels[level]; //保存地图数据 _currentLevelProfile = Fight.LevelProfile.NewCurrentLevelProfile; field = new MatchField(_currentLevelProfile.Width, _currentLevelProfile.Height); field.chipCount = _currentLevelProfile.CardCount; //生成底图 yield return(FightMgr.Instance.StartCoroutine(GenerateSlots())); //生成障碍物 yield return(FightMgr.Instance.StartCoroutine(GenerateBlocks())); InitializeSlot(); yield return(FightMgr.Instance.StartCoroutine(GenerateWalls())); SlotGravity.Reshading(); //yield return StartCoroutine(GenerateJelly()); yield return(FightMgr.Instance.StartCoroutine(GenerateChips())); yield return(FightMgr.Instance.StartCoroutine(GeneratePowerups())); yield return(FightMgr.Instance.StartCoroutine(GenerateBoss())); #if FightTest //可以开始 for (int i = 0; i < MyBossRoot.childCount; i++) { MyBossRoot.GetChild(i).gameObject.SetActive(true); } for (int i = 0; i < EnemyRoot.childCount; i++) { EnemyRoot.GetChild(i).gameObject.SetActive(true); } yield return(new WaitForSeconds(1f)); FightMgr.Instance.isPlaying = true; #else //UIMatching._instance.ShowEffect(0); yield return(new WaitForSeconds(0.3f)); EventDispatcher.TriggerEvent <int>(UIFight.BossCreateEvent, 0); // yield return new WaitForSeconds(1f); //UIMgr.Instance.DestroyUI(E_UIType.UIMainPanel); EventDispatcher.TriggerEvent(UIFight.BeginStartTime); MusicManager.Instance.PlaySoundEff("Music/readyGo"); // FightMgr.Instance.RefreshEnergy(0f); FightMgr.Instance.isPlaying = true; FightMgr.Instance.IsFighting = true; #endif EventDispatcher.TriggerEvent(FightDefine.Event_LevelLoadOver); //新生成的 if (FightMgr.Instance.ListNewPowerUp.Count > 0) { EventDispatcher.TriggerEvent <Slot, E_CardType>(FightDefine.Event_HasNewBomb, FightMgr.Instance.ListNewPowerUp[0].Slot, FightMgr.Instance.ListNewPowerUp[0].CardType); FightMgr.Instance.ListNewPowerUp.Clear(); } }