diff --git a/CSharp/Engines/GTK/UniversalEditor.Engines.GTK/Dialogs/DataFormatOptionsDialog.cs b/CSharp/Engines/GTK/UniversalEditor.Engines.GTK/Dialogs/DataFormatOptionsDialog.cs index 4dfeeb85..7c15d6ef 100644 --- a/CSharp/Engines/GTK/UniversalEditor.Engines.GTK/Dialogs/DataFormatOptionsDialog.cs +++ b/CSharp/Engines/GTK/UniversalEditor.Engines.GTK/Dialogs/DataFormatOptionsDialog.cs @@ -19,7 +19,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . using System; -namespace UniversalEditor.Engines.GTK +using UniversalEditor.UserInterface; + +namespace UniversalEditor.Engines.GTK.Dialogs { public partial class DataFormatOptionsDialog : Gtk.Dialog { @@ -27,6 +29,45 @@ namespace UniversalEditor.Engines.GTK { this.Build(); } + + public static bool ShowDialog(ref DataFormat df, DataFormatOptionsDialogType type) + { + DataFormatReference dfr = df.MakeReference(); + switch (type) + { + case DataFormatOptionsDialogType.Export: + { + if (dfr.ExportOptions.Count > 0) + { + DataFormatOptionsDialog dlg = new DataFormatOptionsDialog(); + switch ((Gtk.ResponseType)dlg.Run()) + { + case Gtk.ResponseType.Cancel: + { + return false; + } + } + } + break; + } + case DataFormatOptionsDialogType.Import: + { + if (dfr.ImportOptions.Count > 0) + { + DataFormatOptionsDialog dlg = new DataFormatOptionsDialog(); + switch ((Gtk.ResponseType)dlg.Run()) + { + case Gtk.ResponseType.Cancel: + { + return false; + } + } + } + break; + } + } + return true; + } } }