/// <summary> /// //////////////////////////////////////////////////////////////////////////// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void m_boutonDropList_Click(object sender, System.EventArgs e) { Rectangle rect = m_panelComboChamp.RectangleToScreen(new Rectangle(0, m_panelComboChamp.Height, m_panelComboChamp.Width, 230)); bool bCancel = false; CDefinitionProprieteDynamique champ = CFormSelectChampPopup.SelectDefinitionChamp(rect, m_filtre.TypeElements, new CFournisseurProprietesForFiltreDynamique(), ref bCancel, null, m_definitionRacineDeChampsFiltres); if (!bCancel) { m_champ = champ; m_labelChamp.Text = m_champ == null?I.T("[UNDEFINED]|30013") : m_champ.Nom; } }
public void SetGameControlMode() { if (!Game.GameControlMode) { //Game.RenderingFactory.FullScreen = true; RenderTarget.Focus(); Cursor.Clip = RenderTarget.RectangleToScreen(RenderTarget.ClientRectangle); //Game.RenderingFactory.Mouse.ShowCursor(false); //Game.CurrentGameCommand = EnumSkill.None; Game.GameControlMode = true; } }
public Bitmap GetCapturedImage(Panel panel, string filePath, Boolean firstTime) { Rectangle rectangle; Bitmap bitmap = null; ArrayList controls = null; try { rectangle = panel.RectangleToScreen(panel.Bounds); bitmap = new Bitmap(rectangle.Width, rectangle.Height, PixelFormat.Format32bppArgb); if (firstTime) { panel.DrawToBitmap(bitmap, panel.Bounds); // 再帰的にコンテナ及びコントロールをキャプチャ controls = GetAllControls(panel); controls.Reverse(); // 背面から foreach (Control c in controls) { Rectangle rectangle2 = c.Bounds; Control control = c; while (control.Bounds.Location != panel.Bounds.Location) { rectangle2.X += control.Parent.Bounds.Location.X; rectangle2.Y += control.Parent.Bounds.Location.Y; control = control.Parent; } c.DrawToBitmap(bitmap, rectangle2); } } else { CaptureControls(panel, ref bitmap); } bitmap.Save(filePath, ImageFormat.Bmp); // 保存する場合 } catch (SystemException ex) { Console.WriteLine(ex.Message); } return bitmap; }
/// <summary> /// //////////////////////////////////////////////////////////////////////////// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void m_boutonChampValeurDropList_Click(object sender, System.EventArgs e) { Rectangle rect = m_panelComboChampValeur.RectangleToScreen(new Rectangle(0, m_panelComboChampValeur.Height, m_panelComboChampValeur.Width, 230)); bool bCancel = false; if (m_sousFiltre.TypeElements == null) { CFormAlerte.Afficher(I.T("Select a sub filter type before|20087"), EFormAlerteBoutons.Ok, EFormAlerteType.Exclamation ); return; } CDefinitionProprieteDynamique champ = CFormSelectChampPopup.SelectDefinitionChamp(rect, m_sousFiltre.TypeElements, new CFournisseurProprietesForFiltreDynamique(), ref bCancel, null, m_definitionRacineDeChampsFiltres); if (!bCancel) { m_champRetourneParRequete = champ; m_labelChampValeur.Text = m_champRetourneParRequete == null?I.T("[UNDEFINED]|30013") : m_champRetourneParRequete.Nom; } }