Search Results

Showing results 1 to 40 of 274
Search took 0.02 seconds.
Search: Posts Made By: dickersonka ; Forum: C# and child forums
Forum: C# Nov 17th, 2009
Replies: 3
Views: 356
Posted By dickersonka
You have to show us what you got before we can help you
Forum: C# Nov 17th, 2009
Replies: 3
Views: 443
Posted By dickersonka
you need to have an open connection, just as it says, right before you call execute reader call this


if (conn1.State != ConnectionState.Open)
{
conn1.Open();
}

...
Forum: C# Apr 9th, 2009
Replies: 4
Views: 997
Posted By dickersonka
whether it is buttons or textboxes, still the same concept


//form 1
frmKeypad frmKey = new frmKeypad();
frmKey.ShowDialog();
this.btnQuestion.Text = frmKey.SelectedKey;


//form 2
Forum: C# Apr 9th, 2009
Replies: 4
Views: 997
Posted By dickersonka
here's a link on a small little sample i did for that

http://alleratech.com/blog/post/Sharing-data-between-forms-with-C.aspx
Forum: C# Apr 8th, 2009
Replies: 3
Views: 300
Posted By dickersonka
pretty much the same thing

the important piece being this line


Application.ThreadException += new System.Threading.ThreadExceptionEventHandler (Application_ThreadException);


unless you...
Forum: C# Apr 8th, 2009
Replies: 3
Views: 300
Posted By dickersonka
Not really

Its good practice to handle the exceptions as they occur and decide if you can move on or pass back a specific error message

Here is an example of what you might be looking for...
Forum: C# Apr 8th, 2009
Replies: 10
Views: 1,150
Posted By dickersonka
i should add to this, both really have their place

normally you would use these instance methods when they pertain to particular class, lets says a single point of reference for a connection...
Forum: C# Apr 8th, 2009
Replies: 10
Views: 1,150
Posted By dickersonka
when using this


public static int Result4, Result6 = 0;
public static Assembly DMUAssembly;


there is no need for a singleton, they are static variables
Forum: C# Apr 8th, 2009
Replies: 10
Views: 1,150
Posted By dickersonka
The problem with that would be is that its not a singleton and can exist in multiple classes


private static readonly GlobalVariables TheSingleGlobalVariableInstance = new GlobalVariables();

...
Forum: C# Apr 8th, 2009
Replies: 10
Views: 1,150
Posted By dickersonka
you are mixing static with singleton here

try this way

public class GlobalVariables
{
private static readonly GlobalVariables TheSingleGlobalVariableInstance = new...
Forum: C# Apr 8th, 2009
Replies: 1
Views: 426
Posted By dickersonka
try this

its unclear why you are using string text as a parameter if its not being passed on, but here it is


void delegate textCallback(string text);
public void ThreadProcSafe2(String text)...
Forum: C# Apr 7th, 2009
Replies: 2
Views: 574
Posted By dickersonka
add an extra variable called shown


private bool shown = false;
private void button1_Click(object sender, EventArgs e)
{
firstName = "Tom";
lastName = "Lee"; ...
Forum: C# Apr 7th, 2009
Replies: 8
Solved: arrays
Views: 586
Posted By dickersonka
its because you are using an untyped list for one, but you didn't have an else statement


if (yourValue == "b")
{
break;
}
else
{
numbers.Add(Convert.ToInt32(yourValue));
Forum: C# Apr 7th, 2009
Replies: 13
Views: 1,817
Posted By dickersonka
Prices.Add(2.0);

This only appends to your list, this does not so called 'add' or sum them together

for the sum you need to use a foreach or enumerator as you had before, and increment sumValue
Forum: C# Apr 7th, 2009
Replies: 1
Views: 596
Posted By dickersonka
you can compile c from command line, just use the same from c#
the redirectstandardoutput will allow you to get the output that would be displayed as well


Process proc = new Process();...
Forum: C# Apr 7th, 2009
Replies: 8
Solved: arrays
Views: 586
Posted By dickersonka
you don't always have to use that way, but you can

you could also do something like this


foreach(int num in numbers)
{
Console.WriteLine(" " + num);
}
Forum: C# Apr 7th, 2009
Replies: 8
Solved: arrays
Views: 586
Posted By dickersonka
this will loop through all the values in your array
IEnumerator basically means you can use it to iterate your data

lets say you have 1, 5, 3, 8 in your array

this will print out

1 5 3 8
Forum: C# Mar 19th, 2009
Replies: 4
Views: 591
Posted By dickersonka
The exe is the compiled solution, all exes have already been compiled as well

if you are in a winforms app, it needs to be compiled before running it, if you are in asp.net you can set the project...
Forum: C# Mar 17th, 2009
Replies: 4
Views: 3,316
Posted By dickersonka
In the past I have used SharpZipLib

http://www.icsharpcode.net/OpenSource/SharpZipLib/
Forum: C# Mar 16th, 2009
Replies: 2
Views: 276
Posted By dickersonka
use formatting


//you set your data here
decimal numValue = 20.0000;

//format it here
string num = String.Format("{0:C}", numValue);
this.textbox.Text = num;
Forum: C# Mar 11th, 2009
Replies: 2
Views: 1,397
Posted By dickersonka
System.Diagnostics.Process.Start("calc")
Forum: C# Mar 10th, 2009
Replies: 5
Views: 1,972
Posted By dickersonka
Just to be sure and check all sides of the problem

I noticed:

this.txtStatus.Text + "\r\n" + text;


if its a one line textbox you won't be able to see the output, for testing purposes, try...
Forum: C# Mar 6th, 2009
Replies: 13
Views: 895
Posted By dickersonka
I mean that if you are typing for the control to receive the typed in text, then this event will get caught
Forum: C# Mar 6th, 2009
Replies: 13
Views: 895
Posted By dickersonka
This happens when the control has focus and the user presses a key

I use this here
if (Int32.TryParse(numString, out num))

to check if it was a numeric key that was pressed, if not, it is...
Forum: C# Mar 6th, 2009
Replies: 13
Views: 895
Posted By dickersonka
first add the event for PreviewKeyDown the same way as you did for validating

here is the code i would use inside the event
i'm not always that great at explaining things like this, and...
Forum: C# Mar 6th, 2009
Replies: 2
Views: 681
Posted By dickersonka
of course, the same as you would any other property


public int[] LendMoney
{
get{return lendMoney;}
set{lendMoney = value;}
}
Forum: C# Mar 5th, 2009
Replies: 13
Views: 895
Posted By dickersonka
Yeh that didn't quite work as i thought it would have

What you can do instead is capture previewkeydown
add this to the existing field

"12" + "4"

124

then check 124 to be greater than...
Forum: C# Mar 5th, 2009
Replies: 13
Views: 895
Posted By dickersonka
In the designer click on the events for the numeric control you are trying to catch the events for and double click on validating

Or on the codeside
numericcontrol.Validating += eventnamehere
Forum: C# Mar 5th, 2009
Replies: 13
Views: 895
Posted By dickersonka
Oh i thought you were making your own control

You should be able to catch the validating event and get the value before it has changed back to maximum
Forum: C# Mar 5th, 2009
Replies: 1
Solved: file path help
Views: 988
Posted By dickersonka
from the ui we get a filepath


string filePath = this.textBoxPath.value;

//We call our class like this from the ui
BusinessLogic logic = new BusinessLogic(filePath);
logic.Load();
Forum: C# Mar 5th, 2009
Replies: 13
Views: 895
Posted By dickersonka
I would suggest something like that you would want to be an exception rather than event

Create an exception class and do a check before passing the value to the numeric control and throw an...
Forum: C# Mar 3rd, 2009
Replies: 4
Views: 561
Posted By dickersonka
much more clear now, well if you really will have 50000 records at once or a large number of records, i would use the sql bulk insert

here's a link that should get you started in the right...
Forum: C# Mar 3rd, 2009
Replies: 4
Views: 561
Posted By dickersonka
a couple possible options is dependent on how you are accessing your data

if lets say you are looping through ids and running a select on each id, then that is very inefficient as far as the...
Forum: C# Mar 3rd, 2009
Replies: 3
Views: 474
Posted By dickersonka
Read the file into a byte array, pass the byte array to the webservice, assuming thats what you are using, either way though, then save the file back out into the filesystem using a streamreader
Forum: C# Dec 2nd, 2008
Replies: 28
Views: 1,650
Posted By dickersonka
right, then the exception is correct

uri is expected to be a registered prefix, and javascript is not, things are working properly!!!
Forum: C# Dec 2nd, 2008
Replies: 28
Views: 1,650
Posted By dickersonka
lol whoa, i thought you said it was microsoft
Forum: C# Dec 2nd, 2008
Replies: 28
Views: 1,650
Posted By dickersonka
right, but when that throws an exception, what is the linkItem?
Forum: C# Dec 2nd, 2008
Replies: 28
Views: 1,650
Posted By dickersonka
just to be sure we are still at the same place

what is the exact link that is passed in (what is linkItem)
Forum: C# Dec 2nd, 2008
Replies: 2
Views: 845
Posted By dickersonka
agree with lizr, a lot of times to make the code a little cleaner i would make a constant


const string quote = "\"";
string sample = "This is a " + quote + "test" + quote;
Forum: C# Dec 2nd, 2008
Replies: 28
Views: 1,650
Posted By dickersonka
try with httpresponse and httprequest
Showing results 1 to 40 of 274

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC