|
However, it seems like a good topic for an article.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Article, please!
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
I'm not really sure if I am yet able to write an article...
First thing is that the code has some mistakes and unnecessarities (for example some data-types should be changed)...
The other thing is, as you might have already realized my english is not what you can call printable and so I would need someone to help me out with correcting the texts ... Volunteers first
But nethertheless I will think of writing an article...
I think there should be some additions to only the program itself - Anyone got any ideas?
I thought of maybe a utility to create the data for recognition, like you draw what you want, it flattens what you have drawn and creates the angles we need to compare...
So, please post suggestions to the article, the code itself and so on here, or directly via eMail...
Greetz
Sascha Negele
|
|
|
|
|
Dude, your English is good enough. But I wouldn't mind co-author credits
Use the 'Email' link if you are interested.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
thank you very much i saw that but may couldnt get that any way thanks once again.
|
|
|
|
|
Hi there, how can I call any one of the winAPI functions,
in a C# code,
and does it make a difference if the code is a service not an application
Thanks in advance
There is always something to learn
|
|
|
|
|
|
|
Thanks all
There is always something to learn
|
|
|
|
|
You are welcome
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Likewise
|
|
|
|
|
Can anyone please tell me in C# how to find a particular file is loaded by which processes? For example I want to check if "C:\test.doc" is loaded by which processes.
Thanks,
Mushq
|
|
|
|
|
|
Why? What do you want to do with it?
|
|
|
|
|
Thanks for reply.
PIEBALDconsult wrote: What do you want to do with it?
Actually some of my requirement wants to kill those processes.
Regards,
Mushq
|
|
|
|
|
Please anybody give me the LAN TicTacToe game in C# Win32
|
|
|
|
|
|
Hi Guys. I need some Advice/Help please.
I have two portions to my application that I am working on at the moment and they both working fine but I want to combine the two or to have the one matching data from the other one.
First, I have this Button event that would take data from a txtbox that would match data and return a MessageBox with a String. See below.
private void btnValidate_Click(object sender, EventArgs e)
{
int pcode = 0;
if (int.TryParse(txtboxPcode.Text, out pcode) == false)
{
MessageBox.Show("Invalid Integer!");
return;
}
if((pcode >= 4731) && (pcode <=6499))
{
MessageBox.Show("Eastern Cape");
return;
}
if ((pcode >= 9300) && (pcode <= 9999))
{
MessageBox.Show("Free State");
return;
}
}
The other section in my app I am using FileHelpers to import a CSV file into a MultiLine txtbox. This works fine. I want to use one of the files in the filehelpers import to match to the above code and return the matched value in the MessageBox. Below the FileHelpers Code. In the below code I want to use the imp.CallComments and match that to the pcode above and return the value currently returned in the Messagebox.
private void btnOpenFile_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() != DialogResult.OK)
{
this.Close();
}
else
{
txtboxSelectFile.Text = openFileDialog1.FileName;
}
string filePath;
filePath = txtboxSelectFile.Text;
FileHelperEngine<CsvImp> engine = new FileHelperEngine<CsvImp>();
engine.ErrorManager.ErrorMode = ErrorMode.SaveAndContinue;
CsvImp[] res = engine.ReadFile(filePath);
if (engine.ErrorManager.ErrorCount > 0)
engine.ErrorManager.SaveErrors("Errors.txt");
foreach (CsvImp imp in res)
{
txtboxDisplay.Text += imp.CompanyCode + "\t" + imp.Caller + "\t" +
imp.Reference + "\t" + imp.Agent + "\t" + imp.CallComments + Environment.NewLine;
}
}
Can somebody please advise me what the best way of doing this would be please? Any advice is greatly appreciated.
Thanking you in advance.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
I'd refactor the transformation code out of the button click handler into a separate routine that returns an appropriate string for the given input like:
private string TransformMyString(string inputStr)
{
string retval = "";
int pcode = 0;
if (!int.TryParse(inputStr, out pcode))
{
retval = "Invalid Integer!";
}
else if ((pcode >= 4731) && (pcode <= 6499))
{
retval = "whatever";
}
return retval;
}
Then you can MessageBox.Show the return from the function of put it in a text box or do whatever else you need to do.
|
|
|
|
|
Well my problem is the next buddies
I have a GridView, well Actually a RagGrid From telerik control
I get the data executing a StoreProcedure and storing in a Datatable
the I just use the next code
<br />
DataTable dtListValues = null;
dtListValues = LoValues.oListValues(Values.PKValue);
this.rgValues.DataSource = dtListValues;
this.rgValues.DataBind();
and then the page ends with this
NameColumns PKValue NameValue isActive
but!! I don't want to use this names!!
And to "fix" this I try to use this
<br />
dtListValues.Columns[0].Caption = "Code";<br />
dtListValues.Columns[1].Caption = "Name";<br />
dtListValues.Columns[2].Caption = "Active";<br />
I already used this code after and before executing the DataBind
But!!!! It doesn't work!!! =(
Could someone Tell Me where I'm wrong ?
I hope you can help me please
thanks in advanced
Greetings!!!
|
|
|
|
|
I'm not familiar with that datagridview but I would look to it's properties for setting the caption (column header) instead.
|
|
|
|
|
Hello!!
Yes, I try this too, and I concluded that the correct code (according to my nerves [¬_¬])
was this :
<br />
dtListValues.Columns[0].Caption = "Code";<br />
dtListValues.Columns[1].Caption = "Name";<br />
dtListValues.Columns[2].Caption = "Active";<br />
because when I was looking the properties in debugging time I saw the names of the captions in this properties
but when I try to change it, It doesn't work
In any way, too much thanks for your Help!!
|
|
|
|
|
Okay, so me and my buddy were having this discussion today.
Assume a case in C# where we have two classes, class A and class B, with A having an array of objects of B.
Now when we want to use these classes from a different class C (without inheritance that is), we create two instances of A and B. However all members of class A and a few from B are to be initialized before they can be used in C.
So the argument was abouthow to have this initializing logic in the constructor for class A. But then that would mean having a part of the logic also in the constructor for class B.
Instead why not having a public method in class A which takes care of this logic?
The argument stopped at how much of memory duz it take to invoke and execute two constructors instead of one public method?
Any takers?
------------------------------------
Vision is the ability to see the invisible
|
|
|
|
|
The constructor for B should construct a B.
The constructor for A should construct an A, which may involve instantiating the array of B, and may involve instantiating a number of Bs to put into that array.
The constructor for C should construct a C, whatever that entails.
Or... each class should have an Initialize method that does what the constructor would do otherwise.
Perhaps you didn't ask the question well.
|
|
|
|
|
Or you could use the Factory Pattern
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|