public SaveLocalPage(ExportWizard wiz) : base() { Build(); wiz.Close += delegate(object sender, EventArgs e) { ExportFormat format = ExportFormat.SVG; string filename = this.entry1.Text; format = (ExportFormat)Enum.Parse(typeof(ExportFormat), combobox1.ActiveText.Substring(0,3)); wiz.ShapeManager.Export(this.entry1.Text, format); //TODO: Add credits to PNG and PDF as well if(format == ExportFormat.SVG) { System.IO.StreamWriter writer = new System.IO.StreamWriter(filename, true); writer.Write("<!-- created with the MeeGen avatar-designer (http://meego.com) -->"); writer.Close(); } wiz.Destroy(); }; }
public ExportIntroPage(ExportWizard a) : base() { this.Homogeneous = true; this.Name = "Intro_VBox"; this.a = a; exportLocal = new Button(); //exportLocal.Label = "Save as image"; exportLocal.CanFocus = false; Alignment w1 = new Alignment (0.5f, 0.5f, 0f, 0f); HBox w2 = new HBox (); w2.Spacing = 2; Image w3 = new Gtk.Image (); w3.Pixbuf = Gdk.Pixbuf.LoadFromResource("MeeGen.Resources.Wizard.save.png"); w2.Add (w3); Gtk.Label w5 = new Gtk.Label (); w5.LabelProp = "Save as local file"; w5.UseUnderline = true; w2.Add (w5); w1.Add (w2); this.exportLocal.Add (w1); this.Add(exportLocal); BoxChild w = (BoxChild)this[exportLocal]; w.Position = 0; w.Expand = false; exportWeb = new Button(); exportWeb.CanFocus = false; w1 = new Alignment (0.5f, 0.5f, 0f, 0f); w2 = new HBox (); w2.Spacing = 2; w3 = new Gtk.Image (); w3.Pixbuf = Gdk.Pixbuf.LoadFromResource("MeeGen.Resources.Wizard.web.png"); w2.Add (w3); w5 = new Gtk.Label (); w5.LabelProp = "Export to a webservice"; w5.UseUnderline = true; w2.Add (w5); w1.Add (w2); this.exportWeb.Add(w1); this.Add(exportWeb); w = (BoxChild)this[exportWeb]; w.Position = 1; w.Expand = false; this.exportLocal.Clicked += ExportLocalClicked; this.exportWeb.Clicked += ExportWebClicked; WidgetHelper.SetButtonRelief(this, ReliefStyle.None); }
public ExportWebServicePage(ExportWizard wiz) { this.wiz = wiz; this.Build(); }
public ExportMeeGoForumPage(ExportWizard wiz) { this.Build(); this.ShowAll(); wiz.Close += delegate(object sender, EventArgs e) { //TODO implement MessageBox.ShowInfo("Sorry, but this feature isn't implemeted yet."); wiz.Destroy(); }; }