protected virtual void OnCompanySave(CompanyEventArgs e) { if (CompanySave != null) { CompanySave(this, e); } }
public void OnCompanyDeleted(object source, CompanyEventArgs e) { setCompanyAmountLabel(); var deletedCompanies = e.Company; var selectedValue = companyPickerComboBox.SelectedValue; var selectedCompany = companyPickerComboBox.SelectedItem as Company; PopulateCompaniesComboBox(); }
public CompanyView() { Size = new Size(200, 150); BorderStyle = BorderStyle.Fixed3D; name = new Label(); description = new Label(); divider = new Panel(); basicInterests = new Label(); interests = new Label(); profileLink = new Button(); name.Location = new Point(5, 5); name.Size = new Size(80, 25); name.Font = new Font(name.Font, FontStyle.Bold); profileLink.Location = new Point(name.Right + 10, 7); profileLink.Size = new Size(40, 20); profileLink.Text = "View"; basicInterests.Location = new Point(5, name.Bottom + 5); basicInterests.Size = new Size(Width - 10, 25); basicInterests.Font = new Font(basicInterests.Font, FontStyle.Italic); basicInterests.Text = "Looking for:"; divider.Location = new Point(-1, basicInterests.Bottom + 1); divider.Size = new Size(500, 1); divider.BackColor = Color.DarkGray; description.Location = new Point(10, basicInterests.Bottom + 5); description.Size = new Size(90, 50); name.BorderStyle = BorderStyle.FixedSingle; description.BorderStyle = BorderStyle.FixedSingle; basicInterests.BorderStyle = BorderStyle.FixedSingle; Controls.Add(name); Controls.Add(profileLink); Controls.Add(description); Controls.Add(divider); Controls.Add(basicInterests); profileLink.Click += delegate(object sender, EventArgs args) { CompanyEventArgs cargs = new CompanyEventArgs(); cargs.Company = Company; LinkClicked(this, cargs); }; }