Example #1
0
        private void Trace_Click(object sender, MouseButtonEventArgs e)
        {
            var    lbl  = sender as Label;
            string name = (string)lbl?.Content;

            RebuildDcr(_dcrGraph.EditWindowString, _dcrGraph.EditWindowString);
            var trace = Model.GraphMerge.GraphTraces.First(x => x.Any(y => y.Name.Equals(name)))
                        .First(x => x.Name.Equals(name));
            DcrGraph dcrGraph;

            if (trace.Context.ContextType == ContextType.Global)
            {
                dcrGraph = _dcrGraph;
            }
            else if (trace.Context.ContextType == ContextType.Local)
            {
                dcrGraph = Model.GraphMerge.OriginalDcrGraphs.First(x =>
                                                                    x.StoredTraces.Any(y => y.Name.Equals(trace.Name)));
            }
            else
            {
                dcrGraph = Model.GraphMerge.DcrGraphEventLocalMerges.First(x =>
                                                                           x.StoredTraces.Any(y => y.Name.Equals(trace.Name)));
            }
            var traceWindow = new TraceWindow(trace, dcrGraph);

            traceWindow.ShowDialog();
        }
Example #2
0
        private void Trace_Click(object sender, MouseButtonEventArgs e)
        {
            RebuildDcr(DcrText.Text, DcrText.Text);
            var traceWindow = new TraceWindow(Model.Traces.First(x => x.Name.Equals(((Label)sender).Content)), _dcrGraph);

            traceWindow.ShowDialog();
        }