private void onTypeSelected(object sender, EventArgs e) { guiAmountTxt.Enabled = false; guiCodeTxt.Enabled = false; guiCodeSearchBtn.Enabled = false; RewardType rewardType = (RewardType)guiTypeCbo.SelectedItem; switch (rewardType) { case RewardType.Credits: case RewardType.Explore_XP: case RewardType.Combat_XP: case RewardType.Trade_XP: guiAmountTxt.Enabled = true; break; case RewardType.Award_Skill: guiCodeTxt.Enabled = true; guiCodeSearchBtn.Enabled = true; m_codeSearch.setDataType(DataConfiguration.DataType.skill); break; case RewardType.Faction: guiCodeTxt.Enabled = true; guiCodeSearchBtn.Enabled = true; guiAmountTxt.Enabled = true; m_codeSearch.setDataType(DataConfiguration.DataType.faction); break; case RewardType.Item_ID: guiCodeTxt.Enabled = true; guiCodeSearchBtn.Enabled = true; m_codeSearch.setDataType(DataConfiguration.DataType.item); break; case RewardType.Hull_Upgrade: guiAmountTxt.Enabled = true; break; case RewardType.Advance_Mission: guiCodeTxt.Enabled = true; guiCodeSearchBtn.Enabled = true; m_codeSearch.setDataType(DataConfiguration.DataType.mission); break; case RewardType.Run_Script: guiAmountTxt.Enabled = true; break; } }
public void editCondition(Condition condition) { m_condition = condition; guiTypeCbo.SelectedItem = m_condition.getConditionType(); switch (m_condition.getConditionType()) { case CommonTools.ConditionType.Overall_Level: case CommonTools.ConditionType.Combat_Level: case CommonTools.ConditionType.Explore_Level: case CommonTools.ConditionType.Trade_Level: case CommonTools.ConditionType.Hull_Level: guiAmountTxt.Text = m_condition.getValue(); break; case CommonTools.ConditionType.Faction_Required: guiCodeTxt.Text = m_condition.getValue(); guiAmountTxt.Text = m_condition.getFlag(); m_codeSearch.setDataType(DataConfiguration.DataType.faction); break; case CommonTools.ConditionType.Item_Required: guiCodeTxt.Text = m_condition.getValue(); guiAmountTxt.Text = m_condition.getFlag(); m_codeSearch.setDataType(DataConfiguration.DataType.item); break; case CommonTools.ConditionType.Profession: Professions profession = (Professions)Int32.Parse(m_condition.getValue()); guiValueCbo.SelectedItem = profession; break; case CommonTools.ConditionType.Race: Races race = (Races)Int32.Parse(m_condition.getValue()); guiValueCbo.SelectedItem = race; break; } }