Ejemplo n.º 1
0
 private void btnBinaryCompare_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     OpenFileDialog ofd = new OpenFileDialog();
     ofd.Filter = "Binary files|*.bin";
     ofd.Multiselect = false;
     if (m_trionicFile.GetFileInfo().Filename != "")
     {
         ofd.Multiselect = false;
         if (ofd.ShowDialog() == DialogResult.OK)
         {
             frmBinCompare bincomp = new frmBinCompare();
             bincomp.SetCurrentFilename(m_trionicFile.GetFileInfo().Filename);
             bincomp.SetCompareFilename(ofd.FileName);
             bincomp.CompareFiles();
             bincomp.ShowDialog();
         }
     }
     else
     {
         frmInfoBox info = new frmInfoBox("No file is currently opened, you need to open a binary file first to compare it to another one!");
     }
 }
Ejemplo n.º 2
0
        private void btnBinaryCompareSRAMsnapshots_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            // do a binary compare of sram dumps to see what's different
            OpenFileDialog ofdram1 = new OpenFileDialog();
            OpenFileDialog ofdram2 = new OpenFileDialog();
            ofdram1.Filter = "SRAM dumps|*.ram";
            ofdram2.Filter = "SRAM dumps|*.ram";
            ofdram1.Multiselect = false;
            ofdram2.Multiselect = false;

            if (ofdram1.ShowDialog() == DialogResult.OK)
            {
                if (ofdram2.ShowDialog() == DialogResult.OK)
                {
                    frmBinCompare bincomp = new frmBinCompare();
                    bincomp.SetCurrentFilename(ofdram1.FileName);
                    bincomp.SetCompareFilename(ofdram2.FileName);
                    bincomp.CompareFiles();
                    bincomp.ShowDialog();
                }
            }
        }