Example #1
0
        //MENU BUTTONS
        private void tsbOpen_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.InitialDirectory = "c:\\";
            ofd.Filter           = "APG files (*.apg)|*.apg";
            ofd.RestoreDirectory = true;

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    Stream fileStream = null;
                    if ((fileStream = ofd.OpenFile()) != null)
                    {
                        using (fileStream)
                        {
                            ssFile   = new SSFile(fileStream);
                            fileName = ofd.FileName;
                            fileSize = (new FileInfo(ofd.FileName)).Length.ToString();
                            loadFileIntoPlayer();
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
                }
            }
        }
Example #2
0
 private void tsbRecord_Click(object sender, EventArgs e)
 {
     this.Hide();
     ssFile = new SSFile();
     ssFile.Capture(10, 1000, ImageFormat.Jpeg);
     loadFileIntoPlayer();
     this.Show();
 }
Example #3
0
        private void initPlayer()
        {
            ssFile = new SSFile();

            fileName = "";

            //MenuBar
            newToolStripMenuItem.Enabled               = false;
            saveAsToolStripMenuItem.Enabled            = false;
            captureToolStripMenuItem.Enabled           = true;
            changeDisplayTimeToolStripMenuItem.Enabled = false;
            frameToolStripMenuItem.Enabled             = false;
            fileInfoToolStripMenuItem.Enabled          = false;

            //ButtonBar
            tsbNew.Enabled             = false;
            tsbOpen.Enabled            = true;
            tsbPlay.Enabled            = false;
            tsbStop.Enabled            = false;
            tsbLoop.Enabled            = false;
            tsbLoop.Checked            = true;
            tsbExpand.Enabled          = false;
            tsbDeleteFrame.Enabled     = false;
            tsbRecord.Enabled          = true;
            tsbSave.Enabled            = false;
            tsbFrameExport.Enabled     = false;
            tsbFileInformation.Enabled = false;

            timerPlayer.Enabled = false;

            tbPlayerBar.Maximum = 0;

            pbPlayer.Image    = null;
            pbPlayer.Size     = new Size(0, 0);
            pbPlayer.Location = new Point(0, 0);
        }