private void DeveloperTabs_DrawItem(object sender, DrawItemEventArgs e) { Graphics g = e.Graphics; Brush _textBrush; // Get the item from the collection. TabPage _tabPage = DeveloperTabs.TabPages[e.Index]; // Get the real bounds for the tab rectangle. Rectangle _tabBounds = DeveloperTabs.GetTabRect(e.Index); if (e.State == DrawItemState.Selected) { // Draw a different background color, and don't paint a focus rectangle. _textBrush = new SolidBrush(Color.Black); g.FillRectangle(Brushes.WhiteSmoke, e.Bounds); } else { _textBrush = new System.Drawing.SolidBrush(e.ForeColor); e.DrawBackground(); } // Use our own font. Font _tabFont = new Font("Tahoma", 16.0f, FontStyle.Regular, GraphicsUnit.Pixel); // Draw string. Center the text. StringFormat _stringFlags = new StringFormat(); _stringFlags.Alignment = StringAlignment.Center; _stringFlags.LineAlignment = StringAlignment.Center; g.DrawString(_tabPage.Text, _tabFont, _textBrush, _tabBounds, new StringFormat(_stringFlags)); }
private void ViewThenRemoveBTN_Click(object sender, EventArgs e) { try { RemoveAppCB.Text = GridSearchResults.SelectedRows[0].Cells[1].Value.ToString(); GridSearchResults.DataSource = null; DeveloperTabs.SelectTab(ManageAppTab); ManageAppSubTabs.SelectTab(RemoveTab); } catch (Exception ex) { MessageBox.Show(ex.Message); } /* * developer = new Developer(); * try * { * if (developer.RemoveApp()) * { * MessageBox.Show("App removed Successfully!"); * updateCount(); * fillsearchGrid(); * fillCBs(); * } * } * catch (Exception ex) * { * MessageBox.Show(ex.Message); * }*/ }
private void ViewThenUpdateBTN_Click(object sender, EventArgs e) { try { UpdateAppCB.Text = GridSearchResults.SelectedRows[0].Cells[1].Value.ToString(); GridSearchResults.DataSource = null; DeveloperTabs.SelectTab(ManageAppTab); ManageAppSubTabs.SelectTab(UpdateAppTab); } catch (Exception ex) { MessageBox.Show(ex.Message); } }