private void UpdateUI() { dataGridView1.DataSource = null; lvListing.SetWindowTheme("explorer"); lvListing.VirtualListSize = 0; viewModel = null; if (document == null) { return; } // Listen to navigation events. document.Navigator.LocationChanged += navigator_LocationChanged; // Create the view model. viewModel = new ListingViewModel(document.Image); //dataGridView1.Columns.Clear(); dataGridView1.AutoGenerateColumns = false; dataGridView1.Font = new System.Drawing.Font(FontFamily.GenericMonospace, this.Font.Size); dataGridView1.DataSource = null; dataGridView1.DataSource = viewModel.Rows; dataGridView1.Refresh(); // Fill the procedure window. cbProcedures.Items.Clear(); cbProcedures.Items.AddRange(viewModel.ProcedureItems.ToArray()); // Fill the segment window. cbSegments.Items.Clear(); cbSegments.Items.AddRange(viewModel.SegmentItems.ToArray()); // Display the listing rows. //scope = ListingScope.Procedure; scope = ListingScope.Executable; // should rename to Image UpdateScope(); }
private void UpdateUI() { dataGridView1.DataSource = null; lvListing.SetWindowTheme("explorer"); lvListing.VirtualListSize = 0; viewModel = null; if (document == null) return; // Listen to navigation events. document.Navigator.LocationChanged += navigator_LocationChanged; // Create the view model. viewModel = new ListingViewModel(document.Image); //dataGridView1.Columns.Clear(); dataGridView1.AutoGenerateColumns = false; dataGridView1.Font = new System.Drawing.Font(FontFamily.GenericMonospace, this.Font.Size); dataGridView1.DataSource = null; dataGridView1.DataSource = viewModel.Rows; dataGridView1.Refresh(); // Fill the procedure window. cbProcedures.Items.Clear(); cbProcedures.Items.AddRange(viewModel.ProcedureItems.ToArray()); // Fill the segment window. cbSegments.Items.Clear(); cbSegments.Items.AddRange(viewModel.SegmentItems.ToArray()); // Display the listing rows. //scope = ListingScope.Procedure; scope = ListingScope.Executable; // should rename to Image UpdateScope(); }
private void mnuScopeSegment_Click(object sender, EventArgs e) { this.ListingScope = ListingScope.Segment; }
private void mnuScopeProcedure_Click(object sender, EventArgs e) { this.ListingScope = ListingScope.Procedure; }
private void mnuScopeExecutable_Click(object sender, EventArgs e) { this.ListingScope = ListingScope.Executable; }