Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
GeneralRe: Average image brightness Pin
newb2vb31-Jul-07 14:19
newb2vb31-Jul-07 14:19 
GeneralRe: Average image brightness Pin
Christian Graus31-Jul-07 17:33
protectorChristian Graus31-Jul-07 17:33 
AnswerRe: Average image brightness Pin
Luc Pattyn31-Jul-07 13:53
sitebuilderLuc Pattyn31-Jul-07 13:53 
QuestionC# Multithreading, GUI hangs while loading Pin
Justincc31-Jul-07 7:11
professionalJustincc31-Jul-07 7:11 
AnswerRe: C# Multithreading, GUI hangs while loading Pin
Luc Pattyn31-Jul-07 7:22
sitebuilderLuc Pattyn31-Jul-07 7:22 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Justincc31-Jul-07 7:29
professionalJustincc31-Jul-07 7:29 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
PhilDanger31-Jul-07 7:38
PhilDanger31-Jul-07 7:38 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Justincc31-Jul-07 10:05
professionalJustincc31-Jul-07 10:05 
I am new to C# so forgive me for not "just getting it" but this is what I have so far. I am doing something wrong because "BindingSource src = (BindingSource)e.Result;" Doesn't seem to be loading any data...

Did I atleast get everything running in the background except the GUI stuff?
Can you tell why I wouldn't be loading any data?

Thanks in advance.

<br />
 private delegate object LoadCompaniesDelegate();<br />
<br />
        public object LoadCompanies()<br />
        {<br />
            BindingSource src = new BindingSource();<br />
            if (pnlNavigation.InvokeRequired)<br />
            {<br />
                LoadCompaniesDelegate find = new LoadCompaniesDelegate(LoadCompanies);<br />
                this.Invoke(find, new object[] { });<br />
            }<br />
            else<br />
            {<br />
                PROSOCO.Library.Companies.Criteria criteria = PROSOCO.Library.Companies.Criteria.GetCriteria();                <br />
                PROSOCO.Library.Companies.Nodes nodes = PROSOCO.Library.Companies.Nodes.GetNodes(criteria.NodeCriteria());                <br />
                src.DataSource = nodes;<br />
                MessageBox.Show("Loaded Notes");<br />
            }<br />
            return src;<br />
        }       <br />
        private void bgWorker_DoWork(object sender, DoWorkEventArgs e)<br />
        {<br />
            e.Result = LoadCompanies();<br />
        }<br />
        private void bgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)<br />
        {<br />
            BindingSource src = (BindingSource)e.Result;<br />
            pnlNavigation.ContentTree.ParentMember = "ParentId";<br />
            pnlNavigation.ContentTree.ValueMember = "Id";<br />
            pnlNavigation.ContentTree.DisplayMember = "Name";<br />
            pnlNavigation.ContentTree.PrefixMember = "CustomerNumber";<br />
            pnlNavigation.ContentTree.PostfixMember = "CityState";<br />
            pnlNavigation.ContentTree.DataSource = src;<br />
            _activeModule = "Companies";<br />
<br />
            MessageBox.Show("Completed");<br />
        } <br />

GeneralRe: C# Multithreading, GUI hangs while loading Pin
PhilDanger31-Jul-07 10:21
PhilDanger31-Jul-07 10:21 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Justincc31-Jul-07 10:40
professionalJustincc31-Jul-07 10:40 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Justincc31-Jul-07 10:57
professionalJustincc31-Jul-07 10:57 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Judah Gabriel Himango31-Jul-07 13:15
sponsorJudah Gabriel Himango31-Jul-07 13:15 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Luc Pattyn31-Jul-07 7:53
sitebuilderLuc Pattyn31-Jul-07 7:53 
AnswerRe: C# Multithreading, GUI hangs while loading Pin
PhilDanger31-Jul-07 7:30
PhilDanger31-Jul-07 7:30 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Justincc31-Jul-07 7:36
professionalJustincc31-Jul-07 7:36 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
PhilDanger31-Jul-07 7:39
PhilDanger31-Jul-07 7:39 
AnswerRe: C# Multithreading, GUI hangs while loading Pin
Judah Gabriel Himango31-Jul-07 10:02
sponsorJudah Gabriel Himango31-Jul-07 10:02 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Justincc31-Jul-07 10:20
professionalJustincc31-Jul-07 10:20 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
PhilDanger31-Jul-07 10:23
PhilDanger31-Jul-07 10:23 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Justincc31-Jul-07 10:32
professionalJustincc31-Jul-07 10:32 
GeneralRe: C# Multithreading, GUI hangs while loading Pin
Judah Gabriel Himango31-Jul-07 13:13
sponsorJudah Gabriel Himango31-Jul-07 13:13 
QuestionBeginner Need Help Pin
patkan31-Jul-07 7:03
patkan31-Jul-07 7:03 
AnswerRe: Beginner Need Help Pin
Dave Kreskowiak31-Jul-07 7:29
mveDave Kreskowiak31-Jul-07 7:29 
GeneralRe: Beginner Need Help Pin
patkan1-Aug-07 0:11
patkan1-Aug-07 0:11 
GeneralRe: Beginner Need Help Pin
Dave Kreskowiak1-Aug-07 11:59
mveDave Kreskowiak1-Aug-07 11:59 

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.