public bool CheckClientSize(DmAe dmae) { object width, height; dmae.GetClientSize(BaseData.SystemInfo.GameWindowsHwnd, out width, out height); if (Convert.ToInt32(width) != 1280 || Convert.ToInt32(height) != 720) { return(false); } else { return(true); } }
private void SetColorcs_Load(object sender, EventArgs e) { TabPage tp = tabControl1.TabPages[4]; //在这里先保存,以便以后还要显示 tabControl1.TabPages.Remove(tp); //隐藏(删除) if (dmae.BindWindow() == 0) { MessageBox.Show("绑定窗口错误"); } string directPath = Application.StartupPath + "\\Debug"; //获得文件夹路径 dmae.SetDict(); dmae.SetPath(directPath); object width, height; dmae.GetClientSize(BaseData.SystemInfo.GameWindowsHwnd, out width, out height); label36.Text = "当前游戏分辨率为 " + Convert.ToString(width) + " * " + Convert.ToString(height); if (Convert.ToInt32(width) != 1280 || Convert.ToInt32(height) != 720) { label36.Text = "当前游戏分辨率为 " + Convert.ToString(width) + " * " + Convert.ToString(height); label37.Text = "请注意,在当前分辨率进行颜色校准将会出错"; } else { label36.Text = "当前游戏分辨率为 " + Convert.ToString(width) + " * " + Convert.ToString(height); label37.Text = "请进行颜色校对"; } //模拟器主页闪退设置 //textBox1.Text = Properties.Settings.Default.SimulatorHomeCapX1.ToString(); //textBox7.Text = Properties.Settings.Default.SimulatorHomeCapY1.ToString(); //textBox5.Text = Properties.Settings.Default.SimulatorHomeCapX2.ToString(); //textBox6.Text = Properties.Settings.Default.SimulatorHomeCapY2.ToString(); //textBox8.Text = Properties.Settings.Default.SimulatorHomeCheckX1.ToString(); //textBox3.Text = Properties.Settings.Default.SimulatorHomeCheckY1.ToString(); //textBox4.Text = Properties.Settings.Default.SimulatorHomeCheckX2.ToString(); //textBox2.Text = Properties.Settings.Default.SimulatorHomeCheckY2.ToString(); label59.Text = ((double)((decimal)SystemInfo.BattleMissionSlectStrSim / 100)).ToString(); }