示例#1
0
        private void btnSendToAnalytics_Click(object sender, EventArgs e)
        {
            cbAutoAddDump.Checked = false;
            var mi = MemoryDomains.GetInterface(cbSelectedMemoryDomain.SelectedItem.ToString());

            RTC_AnalyticsTool_Form.OpenAnalyticsTool(mi, MemoryDumps);
        }
示例#2
0
        public static void OpenAnalyticsTool(BlastLayer bl = null)
        {
            S.GET <RTC_AnalyticsTool_Form>().Close();
            var stf = new RTC_AnalyticsTool_Form();

            S.SET(stf);

            if (bl == null)
            {
                return;
            }

            if (bl.Layer.Count == 0)
            {
                MessageBox.Show("Sanitize Tool cannot sanitize BlastLayers that don't have any units.");
                return;
            }

            if (bl.Layer.Count == 1)
            {
                MessageBox.Show("Sanitize Tool cannot sanitize BlastLayers that only have one unit.");
                return;
            }

            BlastLayer clone = (BlastLayer)bl.Clone();

            stf.lbDumps.DisplayMember = "Text";
            stf.lbDumps.ValueMember   = "Value";
            stf.lbDumps.Items.Add(new { Text = $"Original Layer [{clone.Layer.Count} Units]", Value = clone });

            stf.originalBlastLayer = clone;

            stf.ShowDialog();
        }
示例#3
0
        public static void OpenAnalyticsTool(MemoryInterface mi, List <string> memoryDumpPaths)
        {
            S.GET <RTC_AnalyticsTool_Form>().Close();
            var stf = new RTC_AnalyticsTool_Form();

            S.SET(stf);

            stf.MemoryInterface  = mi;
            stf.ActiveTableDumps = memoryDumpPaths;

            stf.DumpSource.Clear();

            foreach (var dump in memoryDumpPaths)
            {
                var fi = new FileInfo(dump);
                stf.DumpSource.Add(new {
                    key   = fi.Name,
                    value = fi.FullName
                });
            }

            stf.lbDumps.DataSource = null;
            stf.lbDumps.DataSource = stf.DumpSource;

            stf.btnSelectAllDumps_Click(null, null);

            stf.lbDomainSize.Text = $"Domain size: {mi.Size}";

            stf.WordSize = mi.WordSize;
            switch (mi.WordSize)
            {
            default:
            case 1:
                stf.cbWordSize.SelectedIndex = 0;
                break;

            case 2:
                stf.cbWordSize.SelectedIndex = 1;
                break;

            case 4:
                stf.cbWordSize.SelectedIndex = 2;
                break;

            case 8:
                stf.cbWordSize.SelectedIndex = 3;
                break;
            }

            stf.Show();
        }