Esempio n. 1
0
        private bool DoSave(string Filename)
        {
            DisableFileWatcher();
            GR.Memory.ByteBuffer mediaData = null;

            if (m_Media != null)
            {
                mediaData = m_Media.Compile();
            }
            if (mediaData != null)
            {
                if (!GR.IO.File.WriteAllBytes(Filename, mediaData))
                {
                    System.Windows.Forms.MessageBox.Show("Could not save file " + Filename + ".", "Could not save file");
                    EnableFileWatcher();
                    return(false);
                }
                SetUnmodified();
            }
            SetDocumentFilename(Filename);
            EnableFileWatcher();
            return(true);
        }
Esempio n. 2
0
        protected override bool PerformSave(string FullPath)
        {
            DisableFileWatcher();

            GR.Memory.ByteBuffer mediaData = null;

            if (m_Media != null)
            {
                mediaData = m_Media.Compile();
            }
            if (mediaData != null)
            {
                if (!GR.IO.File.WriteAllBytes(FullPath, mediaData))
                {
                    System.Windows.Forms.MessageBox.Show("Could not save file " + FullPath + ".", "Could not save file");
                    EnableFileWatcher();
                    return(false);
                }
                SetUnmodified();
            }
            EnableFileWatcher();
            return(true);
        }