public FontChooserDialog(int x, int y, int width, FontEventHandler onFontChange, Dictionary <String, Font> FontStore, HFontPicker father) : base(Gtk.WindowType.Popup) { this.father = father; this.FontStore = FontStore; this.OnFontChange = onFontChange; this.Move(x, y); this.Resize(width, 200); this.Build(); //grab dialog GrabUtil.GrabWindow(this); instance = this; TvFonts.GrabFocus(); while (Gtk.Application.EventsPending()) { Gtk.Application.RunIteration(); } Thread t = new Thread(new ThreadStart(AddFontsToList)); t.Start(); }
public FontChooserDialog( int x, int y, int width, FontEventHandler onFontChange, Dictionary<String, Font> FontStore, HFontPicker father ) : base(Gtk.WindowType.Popup) { this.father = father; this.FontStore = FontStore; this.OnFontChange = onFontChange; this.Move( x, y ); this.Resize(width, 200); this.Build(); //grab dialog GrabUtil.GrabWindow(this); instance = this; TvFonts.GrabFocus(); while( Gtk.Application.EventsPending() ) Gtk.Application.RunIteration(); Thread t = new Thread( new ThreadStart( AddFontsToList ) ); t.Start(); }
public static void ShowMe( int x, int y, int width, FontEventHandler OnFontChange, Dictionary<String, Font> FontStore, String font_name, HFontPicker father) { if( instance == null ) new FontChooserDialog( x, y, width, OnFontChange, FontStore, father); else ShowInstance(x, y, width, OnFontChange, FontStore, font_name, father ); }
private static void ShowInstance(int x, int y, int width, FontEventHandler OnFontChange, Dictionary<String, Font> FontStore, String SelectedFont, HFontPicker father ) { instance.FontStore = FontStore; instance.Move( x,y ); instance.Resize(width, instance.Allocation.Height); instance.OnFontChange = null; instance.OnFontChange += OnFontChange; instance.Show(); instance.QueueResize(); instance.SizeRequest(); instance.TreeviewFonts.GrabFocus(); //selecteaza fontul ales instance.SelectedFont = SelectedFont; GrabUtil.GrabWindow(instance); }
public static void ShowMe(int x, int y, int width, FontEventHandler OnFontChange, Dictionary <String, Font> FontStore, String font_name, HFontPicker father) { if (instance == null) { new FontChooserDialog(x, y, width, OnFontChange, FontStore, father); } else { ShowInstance(x, y, width, OnFontChange, FontStore, font_name, father); } }
private static void ShowInstance(int x, int y, int width, FontEventHandler OnFontChange, Dictionary <String, Font> FontStore, String SelectedFont, HFontPicker father) { instance.FontStore = FontStore; instance.Move(x, y); instance.Resize(width, instance.Allocation.Height); instance.OnFontChange = null; instance.OnFontChange += OnFontChange; instance.Show(); instance.QueueResize(); instance.SizeRequest(); instance.TreeviewFonts.GrabFocus(); //selecteaza fontul ales instance.SelectedFont = SelectedFont; GrabUtil.GrabWindow(instance); }