Exemplo n.º 1
0
        private void d71ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CloseMedia();

            m_Media = new C64Studio.Formats.D71();
            m_Media.CreateEmptyMedia();
            SetUnmodified();
            RefreshFileView();
            UpdateStatusInfo();
        }
Exemplo n.º 2
0
        public bool LoadMediaFile()
        {
            string upperName = m_Filename.ToUpper();

            validateMediumToolStripMenuItem.Enabled = false;

            if (upperName.EndsWith(".D64"))
            {
                // disk file
                m_Media = new C64Studio.Formats.D64();
            }
            else if (upperName.EndsWith(".D71"))
            {
                // disk file
                m_Media = new C64Studio.Formats.D71();
            }
            else if (upperName.EndsWith(".D81"))
            {
                // disk file
                m_Media = new C64Studio.Formats.D81();
            }
            else if (upperName.EndsWith(".T64"))
            {
                // tape file
                m_Media = new C64Studio.Formats.T64();
            }
            else if (upperName.EndsWith(".PRG"))
            {
                // prg file
                m_Media = new C64Studio.Formats.PRG();
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("The file " + m_Filename + " cannot be read, unknown format");
                return(false);
            }

            if (!m_Media.Load(m_Filename))
            {
                System.Windows.Forms.MessageBox.Show("The file " + m_Filename + " cannot be properly be read, maybe corrupted?");
                return(false);
            }

            SetUnmodified();
            DocumentInfo.DocumentFilename = m_Filename;
            if (string.IsNullOrEmpty(m_FileWatcher.Path))
            {
                SetupWatcher();
                EnableFileWatcher();
            }
            RefreshFileView();
            UpdateStatusInfo();
            validateMediumToolStripMenuItem.Enabled = true;
            return(true);
        }
Exemplo n.º 3
0
 public void CreateEmptyTapeImage()
 {
     CloseMedia();
     m_Media = new C64Studio.Formats.T64();
     m_Media.CreateEmptyMedia();
     SetUnmodified();
     UpdateStatusInfo();
     validateMediumToolStripMenuItem.Enabled = true;
     TabText = "Empty Tape";
     Text    = "Empty Tape";
 }
Exemplo n.º 4
0
        private void d64With40TracksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CloseMedia();

            var d64 = new C64Studio.Formats.D64();

            d64.CreateEmptyMedia40Tracks();
            m_Media = d64;
            SetUnmodified();
            RefreshFileView();
            UpdateStatusInfo();
        }
Exemplo n.º 5
0
        private bool CloseMedia()
        {
            if (Modified)
            {
                DialogResult saveRequestResult = CloseAfterModificationRequest();

                if (saveRequestResult == DialogResult.Cancel)
                {
                    return(false);
                }
            }
            m_Media = null;
            DocumentInfo.DocumentFilename = "";
            RefreshFileView();
            UpdateStatusInfo();
            return(true);
        }