Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: create Web browser in C# without using web browser control Pin
Pete O'Hanlon10-Oct-14 9:56
mvePete O'Hanlon10-Oct-14 9:56 
Questionhi friends Pin
Member 111430869-Oct-14 22:52
Member 111430869-Oct-14 22:52 
AnswerRe: hi friends Pin
Eddy Vluggen10-Oct-14 7:51
professionalEddy Vluggen10-Oct-14 7:51 
QuestionPlaying media with 2 different channels in stereo file using NAudio library Pin
Praveen Raghuvanshi9-Oct-14 17:55
professionalPraveen Raghuvanshi9-Oct-14 17:55 
AnswerRe: Playing media with 2 different channels in stereo file using NAudio library Pin
Eddy Vluggen10-Oct-14 7:53
professionalEddy Vluggen10-Oct-14 7:53 
QuestionWinform Change Label Text from secondary form action Pin
Derek Kennard9-Oct-14 1:56
professionalDerek Kennard9-Oct-14 1:56 
AnswerRe: Winform Change Label Text from secondary form action Pin
BillWoodruff9-Oct-14 3:00
professionalBillWoodruff9-Oct-14 3:00 
GeneralRe: Winform Change Label Text from secondary form action Pin
Derek Kennard9-Oct-14 15:28
professionalDerek Kennard9-Oct-14 15:28 
Perfect, absolutely perfect. This is exactly what I needed. Big Grin | :-D

Here is what I did...

C#
// in LocationChange (aka Form2)
        private string _holdSecLoc;
        private string _holdTeam;
        private string _holdUname;

// a bunch of other form code here...

        // a template for a method that takes three string parameters and returns void
        public Action<string, string, string> ChangeLabels;

        private void ChgLoc()
            {
            GetPrimeLocBal.UidDal = Login.PassUserIdText;
            GetPrimeLocBal.NewLoc = tbLocId.Text;
            }

        private void btnChange_Click( object sender, EventArgs e )
            {
            // a button in the secondary form that will call the method
            // injected into the secondary form by its creator, the main form
            ChgLoc();
            GetPrimeLocBal.GetPrime();
            _holdUname = GetPrimeLocBal.UidDal;
            _holdTeam = GetPrimeLocBal.TeamName;
            _holdSecLoc = GetPrimeLocBal.SecondaryLoc;
            ChangeLabels( _holdUname, _holdTeam, _holdSecLoc );
            Close();
            }


Now in MainDesktop (aka Form1)

C#
// added this to private void MainDesktop_Load( object sender, EventArgs e )

            _locChgChange.ChangeLabels = delegate( string s1, string s2, string s3 )
            {
                // update the labels
                tssUserId.Text = s1;
                tssTeam.Text = s2;
                tssPrimeLoc.Text = s3;
            };

// instead of showing the form2 in the load...

        private void changeSitesToolStripMenuItem_Click( object sender, EventArgs e )
            {
            // expose the secondary form
            _locChgChange.Show();
            }

QuestionMake Cell Read Only after clicking the Cell in DataGridView Pin
avisharma@sharma9-Oct-14 1:28
avisharma@sharma9-Oct-14 1:28 
AnswerRe: Make Cell Read Only after clicking the Cell in DataGridView Pin
Simon_Whale9-Oct-14 1:36
Simon_Whale9-Oct-14 1:36 
GeneralRe: Make Cell Read Only after clicking the Cell in DataGridView Pin
avisharma@sharma9-Oct-14 2:05
avisharma@sharma9-Oct-14 2:05 
Questionusing "naked" Action/Func as EventHandlers ? C# language question PinPopular
BillWoodruff9-Oct-14 1:07
professionalBillWoodruff9-Oct-14 1:07 
AnswerRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
Eddy Vluggen9-Oct-14 9:04
professionalEddy Vluggen9-Oct-14 9:04 
GeneralRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
BillWoodruff9-Oct-14 11:13
professionalBillWoodruff9-Oct-14 11:13 
GeneralRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
Eddy Vluggen10-Oct-14 7:38
professionalEddy Vluggen10-Oct-14 7:38 
GeneralRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
Richard Deeming9-Oct-14 22:20
mveRichard Deeming9-Oct-14 22:20 
GeneralRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
Eddy Vluggen10-Oct-14 7:50
professionalEddy Vluggen10-Oct-14 7:50 
AnswerRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
Nicholas Marty10-Oct-14 5:24
professionalNicholas Marty10-Oct-14 5:24 
GeneralRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
BillWoodruff10-Oct-14 11:23
professionalBillWoodruff10-Oct-14 11:23 
GeneralRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
Nicholas Marty13-Oct-14 1:13
professionalNicholas Marty13-Oct-14 1:13 
GeneralRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
BillWoodruff13-Oct-14 1:34
professionalBillWoodruff13-Oct-14 1:34 
GeneralRe: using "naked" Action/Func as EventHandlers ? C# language question Pin
Nicholas Marty13-Oct-14 2:17
professionalNicholas Marty13-Oct-14 2:17 
QuestionTransaction in active directory Pin
Nitin K8-Oct-14 23:21
Nitin K8-Oct-14 23:21 
AnswerRe: Transaction in active directory Pin
Eddy Vluggen9-Oct-14 0:30
professionalEddy Vluggen9-Oct-14 0:30 
QuestionHow to make custom pagination when use grid view in c# Pin
heyvid8-Oct-14 21:10
heyvid8-Oct-14 21:10 

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.