public Graphic(IntPtr display, TInt screenNumber, X11Graphic.StockIcon stock, X11Graphic image) { Display = display; ScreenNumber = screenNumber; Stock = stock; Image = image; }
// ############################################################################### // ### M E T H O D S // ############################################################################### #region Methods public static X11Graphic GetGraphic(IntPtr display, TInt screenNumber, X11Graphic.StockIcon stock) { if (Graphics == null) { Graphics = new GraphicList(); } return(Graphics.Graphic(display, screenNumber, stock)); }
// ############################################################################### // ### C O N S T R U C T I O N A N D I N I T I A L I Z A T I O N // ############################################################################### #region Construction /// <summary> Initializing constructor. </summary> /// <param name="parent"> The parent (associated top-level) shell (an override shell can't be a top-level shell. <see cref="IntPtr"/> </param> /// <param name="message"> The message to display. <see cref="System.String"/> </param> /// <param name="title"> The title to display. <see cref="System.String"/> </param> /// <param name="icon"> The icon to display. <see cref="XrwBitmap.Icon"/> </param> public XrwMessageBox(XrwApplicationShell parent, string message, string title, X11Graphic.StockIcon icon) : base(parent) { _message = message; _title = title; _image = icon; _appModal = true; InitializeMessageBoxResources(); }
// --------------------------------------------------------------------------- // --- M E T H O D S // --------------------------------------------------------------------------- #region Methods public X11Graphic Graphic(IntPtr display, TInt screenNumber, X11Graphic.StockIcon stock) { for (int count = 0; count < this.Count; count++) { Graphic gr1 = this[count]; if (gr1.Stock == stock && gr1.Display == display && gr1.ScreenNumber == screenNumber) { return(gr1.Image); } } X11Graphic image = new X11Graphic(display, screenNumber, stock); if (image == null) { return(null); } Graphic gr2 = new Graphic(display, screenNumber, stock, image); this.Add(gr2); return(image); }