Make DataFormatOptionsDialog engine-agnostic
This commit is contained in:
parent
397c61c33f
commit
b2a003afbb
@ -244,10 +244,4 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs
|
||||
return DialogResult.None;
|
||||
}
|
||||
}
|
||||
|
||||
public enum DataFormatOptionsDialogType
|
||||
{
|
||||
Import,
|
||||
Export
|
||||
}
|
||||
}
|
||||
|
||||
@ -1276,7 +1276,10 @@ namespace UniversalEditor.UserInterface.WindowsForms
|
||||
*/
|
||||
|
||||
DataFormat df = dfr.Create();
|
||||
DataFormatOptionsDialog.ShowDialog(ref df, DataFormatOptionsDialogType.Export);
|
||||
if (!Engine.CurrentEngine.ShowDataFormatOptionsDialog(ref df, DataFormatOptionsDialogType.Export))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#region Save Code
|
||||
NotifySaving(doc);
|
||||
|
||||
@ -364,7 +364,7 @@ namespace UniversalEditor.UserInterface.WindowsForms.Pages
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Dialogs.DataFormatOptionsDialog.ShowDialog(ref fmt, Dialogs.DataFormatOptionsDialogType.Import) == DialogResult.Cancel) return;
|
||||
if (!Engine.CurrentEngine.ShowDataFormatOptionsDialog(ref fmt, DataFormatOptionsDialogType.Import)) return;
|
||||
|
||||
Document document = new UniversalEditor.Document(objm, fmt, new FileAccessor(FileName));
|
||||
document.InputAccessor.Open();
|
||||
|
||||
@ -401,5 +401,14 @@ namespace UniversalEditor.UserInterface.WindowsForms
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
public override bool ShowDataFormatOptionsDialog(ref DataFormat df, DataFormatOptionsDialogType type)
|
||||
{
|
||||
if (DataFormatOptionsDialog.ShowDialog(ref df, type) == DialogResult.OK)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace UniversalEditor.UserInterface
|
||||
{
|
||||
public enum DataFormatOptionsDialogType
|
||||
{
|
||||
Import,
|
||||
Export
|
||||
}
|
||||
}
|
||||
@ -988,5 +988,7 @@ namespace UniversalEditor.UserInterface
|
||||
protected virtual void StopApplicationInternal()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract bool ShowDataFormatOptionsDialog(ref DataFormat df, DataFormatOptionsDialogType dataFormatOptionsDialogType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,6 +59,7 @@
|
||||
<Compile Include="CommandShortcutKey.cs" />
|
||||
<Compile Include="Common\Reflection.cs" />
|
||||
<Compile Include="ConfigurationManager.cs" />
|
||||
<Compile Include="DataFormatOptionsDialogType.cs" />
|
||||
<Compile Include="Engine.cs" />
|
||||
<Compile Include="HostApplication.cs" />
|
||||
<Compile Include="HostApplicationMessage.cs" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user