public static void OnSaveCompleted(bool success) { if (!success) { Log.error("{0}", Localizer.Localize("ERROR_SAVE_FAILED")); //LocalizedMessageBox.Show(Localizer.Localize("ERROR_SAVE_FAILED"), Localizer.Localize("ERROR"), Localizer.Localize("Generic", "GENERIC_OK"), null, null, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1); } if (EditorDocument.m_saveCompletedCallback != null) { EditorDocument.m_saveCompletedCallback(success); } }
public static void OnLoadCompleted(bool success) { if (!success) { Log.error("{0}", Localizer.Localize("ERROR_LOAD_FAILED")); //LocalizedMessageBox.Show(Localizer.Localize("ERROR_LOAD_FAILED"), Localizer.Localize("ERROR"), Localizer.Localize("Generic", "GENERIC_OK"), null, null, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1); //TODO: fix Clear map path? //MainForm.Instance.ClearMapPath(); } if (EditorDocument.m_loadCompletedCallback != null) { EditorDocument.m_loadCompletedCallback(success); } }
public static void Save(string fileName, EditorDocument.SaveCompletedCallback callback) { string s = Path.GetDirectoryName(fileName) + Path.DirectorySeparatorChar; string fileName2 = Path.GetFileName(fileName); byte[] bytes = Encoding.UTF8.GetBytes(s); byte[] bytes2 = Encoding.UTF8.GetBytes(fileName2); EditorDocument.m_saveCompletedCallback = callback; Binding.FCE_Document_Save(bytes, bytes2); }
public static bool Load(string fileName, EditorDocument.LoadCompletedCallback callback) { string s = Path.GetDirectoryName(fileName) + Path.DirectorySeparatorChar; string fileName2 = Path.GetFileName(fileName); byte[] bytes = Encoding.UTF8.GetBytes(s); byte[] bytes2 = Encoding.UTF8.GetBytes(fileName2); EditorDocument.m_loadCompletedCallback = callback; return Binding.FCE_Document_Load(bytes, bytes2); }
private static void SaveCompletedCallback(bool success) { EditorDocument.OnSaveCompleted(success); }
private void LoadMapInternal(string fileName, EditorDocument.LoadCompletedCallback callback) { EditorDocument.Load(fileName, callback); }