private void btnLoad_Click(object sender, EventArgs e) { list_UI.ForEach(x => this.tabControl1.TabPages[0].Controls.Remove(x)); list_UI.Clear(); SolutionSave so = new SolutionSave(); so.Load(); if (so._ProcessName == string.Empty) { return; } this.txtExeName.Text = so._ProcessName; btnFindForm_Click(null, null); if (processInfo._Handle != IntPtr.Zero) { ChangeFormLocationAndSize(processInfo._Location.X, processInfo._Location.Y, so._Bitmap.Width, so._Bitmap.Height); //double ratioTempX = (double)processInfo._Image._img.Width/ (double)so._Bitmap.Width; //double ratioTempY = (double)processInfo._Image._img.Height / (double)so._Bitmap.Height; //double ratioWidth = chkWidth.Checked ? 1 : ratioTempX; //double ratioHeight = chkHeight.Checked ? 1 : ratioTempY; //double ratioX = chkX.Checked ? 1 : ratioTempX; //double ratioY = chkY.Checked ? 1 : ratioTempY; foreach (UiInfo ui in so._ListUi) { AddNewUI(Common.GetThumbnail(ui._img._img, (ui._img._img.Height), (ui._img._img.Width)), new Point((ui._img._relativeLocal.X), (ui._img._relativeLocal.Y)), new Point((ui._clickLoca.X), (ui._clickLoca.Y)), true ); } } }
/// <summary> /// 保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { SolutionSave so = new SolutionSave(); so.Save(list_UI); }