internal StandardView(GuiController controller, IModel model, IFilter filter, bool multipleExecutions, bool oldDisplayStyle) { this.controller = controller; this.model = model; this.filter = filter; this.multipleExecutions = multipleExecutions; this.oldDisplayStyle = oldDisplayStyle || multipleExecutions; formatter = new Formatter(this.oldDisplayStyle, this); // create thread guithread = new Thread(new ThreadStart(RunGuiThread)); guithread.IsBackground = true; guithread.SetApartmentState(ApartmentState.STA); guithread.Name = "gui-view"; }
internal MultiThreadView(Formatter formatter, GuiController controller) { this.formatter = formatter; this.guicontrol = controller; this.threads = new List <OneThreadView>(); this.tvo_list = new List <TaskVarOp>(); this.tid_to_index = new Dictionary <int, int>(); this.index_to_tid = new Dictionary <int, int>(); this.column_to_index = new Dictionary <int, int>(); this.index_to_column = new Dictionary <int, int>(); this.seqno_to_row = new Dictionary <int, int>(); this.column_to_name = new Dictionary <int, string>(); InitializeComponent(); listView2.Items.Clear(); listView2.ItemSelectionChanged += new ListViewItemSelectionChangedEventHandler(listView2_ItemSelectionChanged); listView2.CheckBoxes = true; }
internal ThreadViz(Formatter formatter, GuiController controller) { tvo_list = new List <TaskVarOp>(); sb = new StateBrowser( delegate(TaskVarOp tvo) {}, this, formatter, controller ); this.Controls.Add(sb); // their arrangement sb.Dock = DockStyle.Fill; // // Required for Windows Form Designer support // InitializeComponent(); Show(); }
internal CommandPanel(GuiController controller, IModel model, bool multipleExecutions, bool racedisplay) { this.controller = controller; this.model = model; // create thread guithread = new Thread(new ThreadStart(RunGuiThread)); guithread.IsBackground = true; guithread.SetApartmentState(ApartmentState.STA); guithread.Name = "gui-cmdpanel"; InitializeComponent(); this.FormClosing += (FormClosingEventHandler)HandleFormClosing; if (multipleExecutions) { this.multipleExecutions = true; olddisplaystyle.Checked = true; olddisplaystyle.Enabled = false; } this.racedisplay = racedisplay; }
public ConcurrencyExplorer(TextReader stream, bool racedisplay) { // make model IModel model = new EventDB(); // get first line to determine type of trace file bool recordAndReplay = false; string marker = stream.ReadLine(); if (marker == "m") { recordAndReplay = false; } else if (marker == "s") { recordAndReplay = true; } else { System.Console.WriteLine("the specified file is not a valid trace file."); System.Environment.Exit(0); } // make GUI controller controllers.Add(guicontroller = new GuiController(!recordAndReplay, racedisplay, model)); // make stream or event controller if (stream != null) { controllers.Add(new StreamController(stream, model)); } else { controllers.Add(eventcontroller = new EventController(model)); } }
/// <summary> /// Required designer variable. /// </summary> // private Container components = null; internal StateBrowser(DisplayLocationDel loc_del, IThreadView t_viz, Formatter f, GuiController controller) { tviz = t_viz; formatter = f; converter = f.GetIndexConverter(); display_location = loc_del; table = new List <List <TaskVarOp> >(); max_tid = new Dictionary <int, int>(); focus = -1; replay = false; current_column = -1; current_row = -1; mouse_x = mouse_y = -1; col_sz = 20; row_sz = 20; row_max = 0; prev_col = -1; prev_row = -1; ResizeRedraw = true; SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); OnResize(System.EventArgs.Empty); AutoScroll = true; line = new Pen(Color.Black); white_pen = new Pen(Color.White, 2); this.controller = controller; // InitializeComponent(); }