Пример #1
0
 void button_Clicked(object obj, EventArgs args)
 {
     Gtk.Window parent = (Gtk.Window)GetAncestor(Gtk.Window.GType);
     using (SelectImageDialog dlg = new SelectImageDialog(parent, project)) {
         dlg.Icon = (ImageInfo)Value;
         if (dlg.Run() == (int)Gtk.ResponseType.Ok)
         {
             Value = dlg.Icon;
         }
     }
 }
Пример #2
0
 protected void OnSelectImage(object s, EventArgs args)
 {
     using (SelectImageDialog dlg = new SelectImageDialog(dialog, project)) {
         if (dlg.Run() == (int)Gtk.ResponseType.Ok)
         {
             singleIcon        = dlg.Icon;
             imageLabel.Text   = singleIcon.Label;
             imageImage.Pixbuf = singleIcon.GetThumbnail(project, 16);
             UpdateButtons();
         }
     }
 }
Пример #3
0
 protected void OnAddSource(object s, EventArgs args)
 {
     using (SelectImageDialog dlg = new SelectImageDialog(dialog, project)) {
         if (dlg.Run() == (int)Gtk.ResponseType.Ok)
         {
             ProjectIconSource src = new ProjectIconSource();
             src.Image         = dlg.Icon;
             src.AllWildcarded = true;
             AddSource(src);
             UpdateButtons();
         }
     }
 }
Пример #4
0
 void button_Clicked(object obj, EventArgs args)
 {
     Gtk.Window parent = (Gtk.Window)GetAncestor (Gtk.Window.GType);
     using (SelectImageDialog dlg = new SelectImageDialog (parent, project)) {
         dlg.Icon = (ImageInfo) Value;
         if (dlg.Run () == (int) Gtk.ResponseType.Ok)
             Value = dlg.Icon;
     }
 }
Пример #5
0
 protected void OnSelectImage(object s, EventArgs args)
 {
     using (SelectImageDialog dlg = new SelectImageDialog (dialog, project)) {
         if (dlg.Run () == (int) Gtk.ResponseType.Ok) {
             singleIcon = dlg.Icon;
             imageLabel.Text = singleIcon.Label;
             imageImage.Pixbuf = singleIcon.GetThumbnail (project, 16);
             UpdateButtons ();
         }
     }
 }
Пример #6
0
 protected void OnAddSource(object s, EventArgs args)
 {
     using (SelectImageDialog dlg = new SelectImageDialog (dialog, project)) {
         if (dlg.Run () == (int) Gtk.ResponseType.Ok) {
             ProjectIconSource src = new ProjectIconSource ();
             src.Image = dlg.Icon;
             src.AllWildcarded = true;
             AddSource (src);
             UpdateButtons ();
         }
     }
 }