Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
 private static void SaveCompletedCallback(bool success)
 {
     EditorDocument.OnSaveCompleted(success);
 }
Esempio n. 6
0
 private void LoadMapInternal(string fileName, EditorDocument.LoadCompletedCallback callback)
 {
     EditorDocument.Load(fileName, callback);
 }