Click here to Skip to main content
15,887,911 members
Home / Discussions / C#
   

C#

 
AnswerRe: import data Pin
Victor Nijegorodov12-Jan-19 5:01
Victor Nijegorodov12-Jan-19 5:01 
AnswerRe: import data Pin
OriginalGriff12-Jan-19 5:30
mveOriginalGriff12-Jan-19 5:30 
AnswerRe: import data Pin
mtoha13-Jan-19 17:44
professionalmtoha13-Jan-19 17:44 
QuestionSmtpclient "One of the streams has already been used and can't be reset to the origin." Pin
jkirkerx10-Jan-19 11:49
professionaljkirkerx10-Jan-19 11:49 
AnswerRe: Smtpclient "One of the streams has already been used and can't be reset to the origin." Pin
jkirkerx10-Jan-19 11:57
professionaljkirkerx10-Jan-19 11:57 
SuggestionRe: Smtpclient "One of the streams has already been used and can't be reset to the origin." Pin
Richard Deeming11-Jan-19 1:50
mveRichard Deeming11-Jan-19 1:50 
GeneralRe: Smtpclient "One of the streams has already been used and can't be reset to the origin." Pin
jkirkerx13-Jan-19 9:30
professionaljkirkerx13-Jan-19 9:30 
QuestionC# Winforms, Pass a button click to a user control on the form. Pin
jkirkerx7-Jan-19 12:54
professionaljkirkerx7-Jan-19 12:54 
I thought this would be easy.
I have a form with a user control I made which is an invoice creator that is self contained.
I ran out of space on the user control for a Save button, so I kept the Save button on the master form.
I want to click on the Form Save button and pass the click to the user control to do it's thing.
I searched the web, but all the examples are the other direction, user control to form.

I thought this would be correct using a delegate on the user control, but most examples were for passing text
public partial class CreateQuotationForm : UserControl
{
    private readonly string _quotationId = ObjectId.GenerateNewId().ToString();
    private ImageList _imageListSmall;
    private ImageList _imageListLarge;
    private List<QUOTATION_ITEMS> _quotationItems;

    public delegate void SaveClickEventHandler(object sender, EventArgs e);
    private SaveClickEventHandler saveClick;
    public event SaveClickEventHandler SaveClick
    {
        add { saveClick += value; }
        remove { saveClick -= value; }
    }
Then on the form, I'm clueless
private void OK_Button_Click(object sender, EventArgs e)
{            
   //Pass the click
}
If it ain't broke don't fix it
Discover my world at jkirkerx.com

AnswerRe: C# Winforms, Pass a button click to a user control on the form. Pin
Dave Kreskowiak7-Jan-19 16:43
mveDave Kreskowiak7-Jan-19 16:43 
GeneralRe: C# Winforms, Pass a button click to a user control on the form. Pin
jkirkerx8-Jan-19 6:29
professionaljkirkerx8-Jan-19 6:29 
AnswerRe: C# Winforms, Pass a button click to a user control on the form. Pin
OriginalGriff7-Jan-19 20:24
mveOriginalGriff7-Jan-19 20:24 
GeneralRe: C# Winforms, Pass a button click to a user control on the form. Pin
jkirkerx8-Jan-19 6:33
professionaljkirkerx8-Jan-19 6:33 
GeneralRe: C# Winforms, Pass a button click to a user control on the form. Pin
OriginalGriff8-Jan-19 6:47
mveOriginalGriff8-Jan-19 6:47 
GeneralRe: C# Winforms, Pass a button click to a user control on the form. Pin
jkirkerx8-Jan-19 7:21
professionaljkirkerx8-Jan-19 7:21 
QuestionMEF Question Pin
Kevin Marois7-Jan-19 11:48
professionalKevin Marois7-Jan-19 11:48 
AnswerRe: MEF Question Pin
Mycroft Holmes7-Jan-19 14:32
professionalMycroft Holmes7-Jan-19 14:32 
AnswerRe: MEF Question Pin
Dave Kreskowiak7-Jan-19 16:40
mveDave Kreskowiak7-Jan-19 16:40 
AnswerRe: MEF Question Pin
Pete O'Hanlon7-Jan-19 19:38
mvePete O'Hanlon7-Jan-19 19:38 
QuestionFailure to recognize Toolbox controls inside the encoding environment in visual 2010 Pin
Member 141105447-Jan-19 4:15
Member 141105447-Jan-19 4:15 
AnswerRe: Failure to recognize Toolbox controls inside the encoding environment in visual 2010 Pin
BillWoodruff7-Jan-19 4:32
professionalBillWoodruff7-Jan-19 4:32 
AnswerRe: Failure to recognize Toolbox controls inside the encoding environment in visual 2010 Pin
OriginalGriff7-Jan-19 4:46
mveOriginalGriff7-Jan-19 4:46 
QuestionIP commands Pin
Member 103699864-Jan-19 12:49
Member 103699864-Jan-19 12:49 
AnswerRe: IP commands Pin
Luc Pattyn4-Jan-19 15:24
sitebuilderLuc Pattyn4-Jan-19 15:24 
QuestionUsing Google Calendar API and email send a invitation to a user Pin
Nitish Prasad Satpathy4-Jan-19 4:02
Nitish Prasad Satpathy4-Jan-19 4:02 
AnswerRe: Using Google Calendar API and email send a invitation to a user Pin
Richard MacCutchan4-Jan-19 4:16
mveRichard MacCutchan4-Jan-19 4:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.