private void FrmProcess_Load(object sender, EventArgs e) { this.Icon = ComLib.GetIcon(Properties.Resources.Program); _ProcessList = Process.GetProcesses(); listViewProcess.View = View.Details; listViewProcess.Columns.Add("PID"); listViewProcess.Columns.Add("进程名", 180); listViewProcess.FullRowSelect = true; for (int i = 0; i < _ProcessList.Length; i++) { ListViewItem item = new ListViewItem(_ProcessList[i].Id.ToString()); item.SubItems.Add(_ProcessList[i].ProcessName); listViewProcess.Items.Add(item); } for (int i = 0; i < listViewProcess.Items.Count; i++) { if (listViewProcess.Items[i].SubItems[1].Text.ToUpper() == "FDPS") { listViewProcess.Items[i].Selected = true; listViewProcess.EnsureVisible(i); break; } if (listViewProcess.Items[i].SubItems[1].Text.ToUpper() == "DOSBOX") { listViewProcess.Items[i].Selected = true; listViewProcess.EnsureVisible(i); break; } } }
private void FrmMain_Load(object sender, EventArgs e) { this.Icon = ComLib.GetIcon(Properties.Resources.Main); toolStripStatusLabLocation.Alignment = ToolStripItemAlignment.Right; toolStripStatusLabelLocationValue.Alignment = ToolStripItemAlignment.Right; GlobalSpecs.MainForm = this; GlobalSpecs.Initialize(); //DeveloperMode(); }
private void frmRoleInfo_Load(object sender, EventArgs e) { this.Icon = ComLib.GetIcon(Properties.Resources.Role); this.TopMost = GlobalSpecs.TopMost; _RoleInfo.FillData(); LoadBigFace(RoleLib.GetFace(_RoleInfo.M08_人物肖像职业)); LoadMiniFace(RoleLib.GetMiniFace(_RoleInfo.M08_人物肖像职业, _RoleInfo.M04_人物方向)); SetFormValue(); }
private void FrmItemSelect_Load(object sender, EventArgs e) { this.Icon = ComLib.GetIcon(Properties.Resources.Item); List <string> Category = new List <string>(); Category.Add("全部"); foreach (var item in SettingsLib.ItemInfoList) { if (!Category.Contains(item.Category)) { Category.Add(item.Category); } } comBoxCategory.Items.AddRange(Category.ToArray()); comBoxCategory.SelectedIndex = 0; }
private void FrmMagicSelect_Load(object sender, EventArgs e) { this.Icon = ComLib.GetIcon(Properties.Resources.Magic); #region Maigc List listBoxMagic1.Items.Clear(); listBoxMagic2.Items.Clear(); listBoxMagic3.Items.Clear(); listBoxMagic4.Items.Clear(); listBoxMagic5.Items.Clear(); var list1 = MagicLib.MagicList1.Where(item => item.Column == "1").Select(item => new { item.Column, item.Code, item.Name }); listBoxMagic1.DataSource = list1.ToList(); listBoxMagic1.SelectedItem = null; var list2 = MagicLib.MagicList2.Where(item => item.Column == "2").Select(item => new { item.Column, item.Code, item.Name }); listBoxMagic2.DataSource = list2.ToList(); listBoxMagic2.SelectedItem = null; var list3 = MagicLib.MagicList3.Where(item => item.Column == "3").Select(item => new { item.Column, item.Code, item.Name }); listBoxMagic3.DataSource = list3.ToList(); listBoxMagic3.SelectedItem = null; var list4 = MagicLib.MagicList4.Where(item => item.Column == "4").Select(item => new { item.Column, item.Code, item.Name }); listBoxMagic4.DataSource = list4.ToList(); listBoxMagic4.SelectedItem = null; var list5 = MagicLib.MagicList5.Where(item => item.Column == "5").Select(item => new { item.Column, item.Code, item.Name }); listBoxMagic5.DataSource = list5.ToList(); listBoxMagic5.SelectedItem = null; #endregion #region Magic And Job listBoxMagicRole.Items.Clear(); var roleLIst = SettingsLib.MagicAndJobInfoList.Where(item => item.Role != "").Select(item => new { item.Role }); comBoxRole.DataSource = roleLIst.ToList(); #endregion if (_ExistMagicList != null) { foreach (var magic in _ExistMagicList) { SetExistMagic(magic); } } }
private void SetFormValue() { #region title Info txtX.Text = _RoleInfo.M01_X.Value; txtY.Text = _RoleInfo.M02_Y.Value; labJob.Text = RoleLib.GetJob(_RoleInfo.M33_职业).Name; labRace.Text = RoleLib.GetRace(_RoleInfo.M32_人种).Name; RoleNameInfo roleName = RoleLib.GetRoleName(_RoleInfo.M08_人物肖像职业); labName.Text = roleName == null? _RoleInfo.M08_人物肖像职业.HexVal: roleName.Name; labRoleJob.Text = roleName == null ? _RoleInfo.M08_人物肖像职业.Value : roleName.Job; switch (RoleLib.GetCamp(_RoleInfo.M07_人物阵营)) { case RoleCamp.Enemy: labCamp.Text = "(敌人)"; break; case RoleCamp.NPC: labCamp.Text = "(NPC)"; break; case RoleCamp.Ally: labCamp.Text = "(己方)"; break; default: break; } //txtM03.Text = _RoleInfo.M03_人物图形.Value; //txtM04.Text = _RoleInfo.M04_人物方向.Value; //txtM07.Text = _RoleInfo.M07_人物阵营.Value; //txtM08.Text = _RoleInfo.M08_人物肖像职业.Value; //txtM09.Text = _RoleInfo.M09_人物名字.Value; #endregion #region basic info SetOneTxtItem(txtNowHP, _RoleInfo.M47_HP); SetOneTxtItem(txtMaxHP, _RoleInfo.M48_MaxHP); SetOneTxtItem(txtNowMP, _RoleInfo.M49_MP); SetOneTxtItem(txtMaxMP, _RoleInfo.M50_MaxMp); SetOneTxtItem(txtLV, _RoleInfo.M34_等级); SetOneTxtItem(txtMV, _RoleInfo.M44_移动); SetOneTxtItem(txtEx, _RoleInfo.M45_经验); SetOneTxtItem(txtBaseAP, _RoleInfo.M42_基本AP); SetOneTxtItem(txtBaseDP, _RoleInfo.M43_基本DP); SetOneTxtItem(txtDx, _RoleInfo.M46_DX); SetOneTxtItem(txtEv, _RoleInfo.M54_EV); SetOneTxtItem(txtAP, _RoleInfo.M51_AP); SetOneTxtItem(txtHit, _RoleInfo.M53_HIT); SetOneTxtItem(txtDP, _RoleInfo.M52_DP); txtPoison.Text = _RoleInfo.M38_中毒.IntVal == 0 ? "" : _RoleInfo.M38_中毒.Value; txtParalysis.Text = _RoleInfo.M39_麻痹.IntVal == 0 ? "" : _RoleInfo.M39_麻痹.Value; txtCurse.Text = _RoleInfo.M40_禁咒.IntVal == 0 ? "" : _RoleInfo.M40_禁咒.Value; chkAction.Checked = ComLib.GetAction(int.Parse(_RoleInfo.M06_是否可动.Value)); #endregion #region Items SetItem(chkItem1, txtItem1, _RoleInfo.M11_物品1状态, _RoleInfo.M12_物品1); SetItem(chkItem2, txtItem2, _RoleInfo.M13_物品2状态, _RoleInfo.M14_物品2); SetItem(chkItem3, txtItem3, _RoleInfo.M15_物品3状态, _RoleInfo.M16_物品3); SetItem(chkItem4, txtItem4, _RoleInfo.M17_物品4状态, _RoleInfo.M18_物品4); SetItem(chkItem5, txtItem5, _RoleInfo.M19_物品5状态, _RoleInfo.M20_物品5); SetItem(chkItem6, txtItem6, _RoleInfo.M21_物品6状态, _RoleInfo.M22_物品6); SetItem(chkItem7, txtItem7, _RoleInfo.M23_物品7状态, _RoleInfo.M24_物品7); SetItem(chkItem8, txtItem8, _RoleInfo.M25_物品8状态, _RoleInfo.M26_物品8); #endregion #region Magic List <string> tMagicList; int[] pMagicCode = { _RoleInfo.M27_法术1.IntVal, _RoleInfo.M28_法术2.IntVal, _RoleInfo.M29_法术3.IntVal, _RoleInfo.M30_法术4.IntVal, _RoleInfo.M31_法术5.IntVal }; tMagicList = MagicLib.GetMagicName(pMagicCode); listBoxMagic.DataSource = tMagicList.Select(item => new { Name = item }).ToList(); #endregion }
private void FrmAutoSerachQuestion_Load(object sender, EventArgs e) { this.Icon = ComLib.GetIcon(Properties.Resources.Question); }