Click here to Skip to main content
15,921,959 members
Home / Discussions / C#
   

C#

 
AnswerRe: help for enabled property Pin
Christian Graus15-Nov-06 16:52
protectorChristian Graus15-Nov-06 16:52 
GeneralRe: help for enabled property Pin
vamsimohan2115-Nov-06 17:18
vamsimohan2115-Nov-06 17:18 
GeneralRe: help for enabled property Pin
Christian Graus15-Nov-06 17:22
protectorChristian Graus15-Nov-06 17:22 
GeneralRe: help for enabled property Pin
vamsimohan2115-Nov-06 17:30
vamsimohan2115-Nov-06 17:30 
GeneralRe: help for enabled property Pin
Christian Graus15-Nov-06 17:33
protectorChristian Graus15-Nov-06 17:33 
QuestionAsynchronous webrequest problem Pin
wajih.boukaram15-Nov-06 15:49
wajih.boukaram15-Nov-06 15:49 
AnswerRe: Asynchronous webrequest problem Pin
Christian Graus15-Nov-06 15:54
protectorChristian Graus15-Nov-06 15:54 
GeneralRe: Asynchronous webrequest problem Pin
wajih.boukaram15-Nov-06 16:10
wajih.boukaram15-Nov-06 16:10 
Hi thanks for your quick reply
these are methods of my MainForm class (base class is Form)
<br />
        private void getResult(String url, AsyncCallback callback)<br />
        {<br />
            try<br />
            {<br />
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);<br />
                request.Method = "GET";<br />
                if(useCompression)<br />
                    request.Headers.Add("Accept-Encoding: gzip,deflate");<br />
                request.CookieContainer = mainCookie;<br />
                request.AllowAutoRedirect = true;<br />
                request.AllowWriteStreamBuffering = true;<br />
<br />
                IAsyncResult result = request.BeginGetResponse(callback, request);<br />
            }<br />
            catch (WebException wex)<br />
            {<br />
                MessageBox.Show("Error Connecting: Check your connection settings...\nDetails: " + wex.Status.ToString());<br />
                return;<br />
            }<br />
        }


<br />
        private void SignInButton_Click(object sender, EventArgs e)<br />
        {<br />
            DisableSignInControls();<br />
            String url = mirror + "signin.aspx?user=" + UserNameComboBox.Text + "&pass=" + PasswordTextBox.Text;<br />
            mainCookie = new CookieContainer();<br />
            getResult(url, new AsyncCallback(signIn));<br />
        }<br />
<br />


<br />
        private void signIn(IAsyncResult result)<br />
        {<br />
            HttpWebRequest request = (HttpWebRequest)result.AsyncState;<br />
            HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result);<br />
            String responseResult = (useCompression ? decompressResponse(response) : new StreamReader(response.GetResponseStream()).ReadToEnd());<br />
            int i = responseResult.IndexOf("<response>");<br />
            if (i < 0)<br />
                MessageBox.Show("Corrupt response. Please try again.");<br />
            else<br />
            {<br />
                int j = responseResult.IndexOf("</response>");<br />
                String temp = responseResult.Substring(i + 10, j - i - 10);<br />
                if (temp != "")<br />
                {<br />
                    String[] returnValues = temp.Split('|');<br />
                    if (returnValues.Length == 1)<br />
                        MessageBox.Show(returnValues[0]);<br />
                    else<br />
                    {<br />
                        sid = returnValues[0];<br />
                        num_messages = int.Parse(returnValues[1]);<br />
                        MessageNumber.Text = "Messages: Left " + num_messages;<br />
                        SignInGroupBox.Visible = false;<br />
                        SendSMSGroupBox.Visible = true;<br />
                        SignOutMenu.Visible = true;<br />
                        FillContacts();<br />
                    }<br />
                }<br />
            }<br />
            EnableSignInControls();<br />
            FillUsers();<br />
        }<br />


the other functions are also part of the mainform class and they all make changes to the controls on the form.

do you need more info?

thanks again.
GeneralRe: Asynchronous webrequest problem Pin
Christian Graus15-Nov-06 16:53
protectorChristian Graus15-Nov-06 16:53 
GeneralRe: Asynchronous webrequest problem Pin
wajih.boukaram15-Nov-06 21:36
wajih.boukaram15-Nov-06 21:36 
QuestionHas anyone been able to insert a C# object in the Running Object Table? Pin
Tim Almdal15-Nov-06 11:42
Tim Almdal15-Nov-06 11:42 
QuestionC# opengl font help Pin
Anti-Distinctlyminty15-Nov-06 11:40
Anti-Distinctlyminty15-Nov-06 11:40 
AnswerRe: C# opengl font help Pin
Steve Echols15-Nov-06 19:29
Steve Echols15-Nov-06 19:29 
GeneralRe: C# opengl font help [modified] Pin
Anti-Distinctlyminty15-Nov-06 23:42
Anti-Distinctlyminty15-Nov-06 23:42 
QuestionHow to Get Position of current row in Dataset ? Pin
hdv21215-Nov-06 10:31
hdv21215-Nov-06 10:31 
AnswerRe: How to Get Position of current row in Dataset ? Pin
Judah Gabriel Himango15-Nov-06 11:51
sponsorJudah Gabriel Himango15-Nov-06 11:51 
QuestionHow can I change the font for the tooltip on DataGridView? Pin
smcneese15-Nov-06 9:59
smcneese15-Nov-06 9:59 
AnswerRe: How can I change the font for the tooltip on DataGridView? Pin
saini4828-Oct-10 20:09
saini4828-Oct-10 20:09 
QuestionWeird C# Problem Pin
Mary Parkhouse15-Nov-06 9:21
Mary Parkhouse15-Nov-06 9:21 
AnswerRe: Weird C# Problem Pin
Mary Parkhouse15-Nov-06 9:36
Mary Parkhouse15-Nov-06 9:36 
GeneralRe: Weird C# Problem Pin
Ed.Poore15-Nov-06 9:54
Ed.Poore15-Nov-06 9:54 
Questionhow to solve A/B using DNA computing Pin
suma1238215-Nov-06 9:05
suma1238215-Nov-06 9:05 
AnswerRe: how to solve A/B using DNA computing Pin
Dan Neely15-Nov-06 10:25
Dan Neely15-Nov-06 10:25 
GeneralRe: how to solve A/B using DNA computing Pin
suma1238215-Nov-06 10:49
suma1238215-Nov-06 10:49 
GeneralRe: how to solve A/B using DNA computing Pin
Dan Neely15-Nov-06 10:58
Dan Neely15-Nov-06 10:58 

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.