internal OptionsDialog(Options options) { Options = options.Clone(); InitializeComponent(); m_EnableSuppression.Checked = Options.EnableSuppression; m_BindAddress.Text = Options.BindAddress.ToString(); m_BindPort.Text = Options.BindPort.ToString(); if (null != Options.TraceDirectory) { m_TraceDirectory.Text = Options.TraceDirectory; } else { // Move to trace directory tab. m_Tabs.SelectTab(2); } m_SymbolColumn.AspectGetter = (object o) => { return o; }; m_SymbolColumn.AspectPutter = (object row_object, object value) => { StringListPutHelper(m_SuppressedSymbolList, Options.SuppressedSymbols, row_object, value); }; m_SymPathColumn.AspectGetter = (object o) => { return o; }; m_SymPathColumn.AspectPutter = (object row_object, object value) => { StringListPutHelper(m_SymbolPathsList, Options.SymbolPaths, row_object, value); }; m_SuppressedSymbolList.SetObjects(Options.SuppressedSymbols); m_SymbolMappingList.SetObjects(Options.ModulePathRemappings); m_SymbolPathsList.SetObjects(Options.SymbolPaths); }
public MainWindow() { InitializeComponent(); SetupListView(); if (!m_Options.LoadFromRegistry()) { // Load default settings. string dir = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location); string defaults = Path.Combine(dir, @"DefaultOptions.json"); m_Options = Options.LoadFromFile(defaults); // Show options to allow user to set directory. using (var dlg = new OptionsDialog(m_Options)) { if (DialogResult.OK == dlg.ShowDialog(this)) { m_Options = dlg.Options; } } } m_Listener = new TraceListener(this); m_Listener.BindAddress = IPAddress.Parse(m_Options.BindAddress); m_Listener.BindPort = m_Options.BindPort; m_Listener.TraceDirectory = m_Options.TraceDirectory; m_Listener.Start(); ScanTraceDirectory(); }
internal SymbolResolveDialog(TraceListItem trace, Options options) { InitializeComponent(); m_Options = options; m_Item = trace; m_Replay = new TraceReplayStateful(trace.FileName); }
internal DeltaWindow(string fn, Options options) { InitializeComponent(); m_Trace = new TraceReplayStateful(fn); m_Options = options; TimeControlHelpers.CreateTimeControlMarks(m_StartTimeControl, m_Trace); TimeControlHelpers.CreateTimeControlMarks(m_EndTimeControl, m_Trace); m_Perspective.Items.AddRange(TreePerspective.AllItems); m_Perspective.SelectedIndex = 0; }
internal HeapWindow(TraceListItem trace_info, Options options) { m_Options = options; m_Trace = new TraceReplayStateful(trace_info.FileName); InitializeComponent(); InitTree(); InitFragmentationView(); // Set window title. Text = String.Format("{0} ({2} - {1:n0} events) - MemTrace Heap View", Path.GetFileName(m_Trace.FileName), m_Trace.MetaData.EventCount, m_Trace.MetaData.PlatformName); }
protected TreeBuilderBase(TraceReplayStateful replay, TraceReplayStateful.StatusDelegate status_delegate, TreePerspective perspective, Options options) { Replay = replay; StatusCallback = status_delegate; Perspective = perspective; Root = new MemTreeNode(null, "Everything"); SuppressedSymbols = new HashSet<string>(); if (options.EnableSuppression) { foreach (var sym in options.SuppressedSymbols) { SuppressedSymbols.Add(sym); } } }
public Options Clone() { var result = new Options(); result.SuppressedSymbols.AddRange(SuppressedSymbols); result.EnableSuppression = EnableSuppression; result.BindAddress = BindAddress; result.BindPort = BindPort; result.TraceDirectory = TraceDirectory; result.SymbolPaths.AddRange(SymbolPaths); foreach (var m in ModulePathRemappings) { result.ModulePathRemappings.Add(m.Clone()); } return result; }
public DeltaTreeBuilder(TraceReplayStateful t, double startTime, double endTime, TraceReplayStateful.StatusDelegate status_delegate, TreePerspective perspective, Options options) : base(t, status_delegate, perspective, options) { m_StartTime = startTime; Replay.SeekTo(endTime, StatusCallback); }
public SnapshotTreeBuilder(TraceReplayStateful t, double time, TraceReplayStateful.StatusDelegate status_delegate, TreePerspective perspective, Options options) : base(t, status_delegate, perspective, options) { Replay.SeekTo(time, StatusCallback); }
private void ChangeOptionsMenuItem_Click(object sender, EventArgs e) { using (var dlg = new OptionsDialog(m_Options)) { if (DialogResult.OK == dlg.ShowDialog(this)) { m_Options = dlg.Options; m_Listener.TraceDirectory = m_Options.TraceDirectory; ScanTraceDirectory(); } } }