|
1. Set the language property of form to desired language
2. Change the strings on the forms to chossen language.
3. New language specific resource dll will be created and used if the language settings are set in windows enviornment
|
|
|
|
|
thanks for ur answer.
there is a faster way to get all the strings without pass all the forms?
|
|
|
|
|
Hi,
I have texts such as the following...
"EUR50,000 (Wholesale)"
or
"USD 1,000 - Retail"
...
...
...
How do I just pull out the text i.e. (Wholesale)
or Retail ?
I am using this at present and it seems to work if there is brackets around but not if there is "-"
_strRetailWholeSale = strValues.Substring(intPos, strValues.Length - intPos).Trim()
Thanks
|
|
|
|
|
Use Regular Expressions, it will help you out.
|
|
|
|
|
Check this out this regular exp:
@"(\([a-zA-Z]+\))|(\s?-\s?[a-zA-Z]*)"
This might help u out.
|
|
|
|
|
well if your two examples are the only types it could be i would split the string with spaces, then get the last string in the resulting array. Then you just need to remove brackets if need be. Something like...
string[] results = inputString.Split(' ')'
string result = result[result.Length-1].Replace("(", "").Replace(")", "");
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hello everybody.
I hope some of you can help me with this problem with CSV Reader. I have a text file contains
"USER\FIRSTNAME";"DOMAINNAME"
"User1";"USER\Admin"
I am using LumenWorks.Framework.IO.Csv (CSV Reader) to "read" my text file, but I got the output wrong. The CSV reader removes the \ from my text file.
the output is like this
USERFIRSTNAME;DOMAINNAME
User1;USERAdmin where it should be
USER\FIRSTNAME;DOMAINNAME
User1;USER\Admin
If i remove the double qoute from my text file, then I get the right output. Has any of you run in to this issue, or could any one explains to me how I can fix this issue??
Any advice will be grateful. Many thanks in advance!!
|
|
|
|
|
Hey again,
I found a solution for my problem. It to have " and ' in CSVReader class, then it works
|
|
|
|
|
I have a problem, I use PictureBox es to display a source image in 32x32 pixel chunks.
The are added to a FlowLayoutPanel 's Controls property.
Now I want the user to be able to select several at the same time (up to 25), I try to do that by using the MouseDown and stopping the seletion at the MouseUp event (miraculously it fixed itself and the MouseUp even works right now).
My problem is that the user can still select not neighboring PictureBox es, but can hold the mous button down, move around to completely unrelated PictureBox es on the other edge of the FlowLayoutPanel and add these to the selection, because the MouseUp event didn't get fired yet.
How do I prevent the user from selecting PictureBox es that are not next to each other?
I tried it with the MouseLeave event both, but the PictureBox es' event fires the moment you leave a single of them, preventing any selection of more than 1 and the FlowLayoutPanel 's event is inaccessible when I fill all of it with PictureBox es.
I also tried to check the Cursor position, but that fires seemingly randomly and I can't debug it (during debug the cursor position isn't fixed at the last position the cursor had in your program, but will change according to the position in VS).
|
|
|
|
|
OK so for the sake of argument lets say you have a 3x3 grid of these pictureboxes numbered from 1 (top-left) to 9 (bottom-right).
If im correct what you are saying is that if you mouse down on (1) then move out the grid round to (3) then (2) does not become selected? obviously this should be the case.
Well to solve you could simply write you own algorithm to detect which boxes are selected and then fill in the gaps. Or, more simply, you can create a rectangle object using the mouse down position, and the mouse up position (i.e. a selection rectangle) then you can do a collision detection with the selection rectangle on all the pictureBoxes, any collisions should make the picturebox selected
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Not quite.
My problem isn't that things don't get selected, this seems to work.
My problem is that multiple PictureBox es can be selected while the mousebutton is held down (all are fine, if you let go of one it's MouseUp event shoul fire and stop the selecting).
While the mousebutton is held down, (during the MouseDown event), you practically can only select neighboring TextBox es, to select one that isn't next to a previously selected one, you'd have to let go of the button and thus the slection would be stopped (and started from new).
Now the problem is that if you exit the area where the PictureBox es are displayed, while still holding the mousebutton down and then move to a far away PictureBox and it would get added to the selection, making it inconsistent.
I somehow want force the user to be able to only select up to 25 neighboring PictureBox es, preferrably with a limit of 5 boxes horizontally and 5 boxes vertically.
|
|
|
|
|
As Musefan said u need to write your own collision detection logic or u can use the following...
1.Use a toggle flag to set the status of each picture box selected.
like
public void PictureBox1_Click(<arguments>)
{
if(pictureBox1.IsSelected!=true)
pictureBox1.IsSelected = true;
else
pictureBox1.IsSelected = false;
}</arguments>
((Note: IsSelected is a custom built property what you need to code...))
then check the IsSelected property while adding the selected pictureboxes....
Have a Happy Coding.....
|
|
|
|
|
I thought I had it by making the FlowLayoutPanel slightly larger then the PictureBox es covering it
But if you hold the mouse button down none of the events get fired, they only fire when you don't press the mouse button.
That's is useless to me.
Colision detection is kinda out of the question, the mouse coordinates are different from the control sizes (events get fired at the wrong time) and I can't debug it because during debug the mouse coordinates still change every time I move the mouse.
An IsChecked property wouldn't really help me.
I need to detect if the user moves away from the PictureBoxes while holding the mouse button down
modified on Monday, April 6, 2009 3:06 AM
|
|
|
|
|
to run my application i need to install .net but when i try to install it telling invalid Win32...may i know y??? and solution?
A S E L A
|
|
|
|
|
- What version of .NET?
- What OS-version?
- Have you run a virus-checker on your installation-package?
Download .NET 2.0 here[^].
I are troll
|
|
|
|
|
hi
Here is my code in this i use a file dialog box from which i open the excel file but here is one problem i read only one sheet in datagride view when i select some another file then it shows the error PLZ CHECK THE FILE NAME OR FILE IS NOT EXIT NEED A Help
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog FD = new OpenFileDialog();
FD.Filter = "Excel|*.xls";
if (FD.ShowDialog() == DialogResult.OK)
{
textBox1.Text = " " + FD.FileName;
}
string filename = textBox1.Text;
String connectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + filename + ";" +
"Extended Properties=Excel 8.0;";
OleDbConnection connection = new OleDbConnection(connectionString);
connection.Open();
OleDbCommand selectCommand = new OleDbCommand("SELECT * FROM [xyz$]", connection);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter();
dataAdapter.SelectCommand = selectCommand;
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet);
System.Data.DataTable dataTable = dataSet.Tables[0];
dataGridView1.DataSource = dataSet.Tables[0];
// textBox1.Text = "";
MessageBox.Show(dataGridView1.RowCount.ToString());
connection.Close();
}
|
|
|
|
|
<repbot engaged=true>
1) Please use punctation, it helps make sense of gibberish.
2) DO NOT SHOUT UNLESS YOU WANT TO BE FLAMED!
3) Spelling helps. It helps a lot.
4) Format your code, see the buttons on this page for <code></code> in line or
<pre>blocks of code</pre>
Compare:
if (FD.ShowDialog() == DialogResult.OK)
{
textBox1.Text = " " + FD.FileName;
}
and
if (FD.ShowDialog() == DialogResult.OK)
{
textBox1.Text = " " + FD.FileName;
}
</repbot>
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Welcome to the community of PersiaDevelopers.com fans. A centralized learning environment specifically targeted to Persian software developers and designers.
PersiaDevelopers.com is the largest community of Microsoft .NET Development Platform enthusiasts in Iran.
Keeping up to date with the latest technologies through articles and news, taking advantage of PersiaDevelopers forums which allow you to search a growing archive of technical questions and answers, achieving to a large library of ebooks and many other parts are the reasons which help it growing faster and faster.
On this group you will find links to help you stay connected with the PersiaDevelopers.com. Read what people are saying about new technologies and see what people are doing with Microsoft development technologies.
www.persiadevelopers.com
|
|
|
|
|
Stop crossposting the ads, please.
I are troll
|
|
|
|
|
Hi all,
I've added value pair, int and string, in a Dictionary. Now I want to take pairs from the last. int value represent the index of a string and string value represent the value to insert into the original string.
I've try this.
<br />
foreach (KeyValuePair<int,> pair in diction)<br />
{<br />
str = str.Insert(pair.Key, pair.Value);
}
This insert items in wrong index once the first item index is added in the correct place. So I want to added them from the last item. But I'm messup with that how to access the last element. Can someone help me to do this.
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Dictionary<TKey, TValue>.Last Method
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|
|
Thanks for the replay.
Can you explain it bit more with my example, please?
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Dictionary<int, string> diction = new Dictionary<int, string>();<br />
<br />
diction.Add(1, "first");<br />
diction.Add(2, "second");<br />
diction.Add(3, "last");<br />
<br />
Dictionary<int,string>.KeyCollection keys = diction.Keys;<br />
int lastKey = keys.Last();<br />
<br />
Dictionary<int,string>.ValueCollection values = diction.Values;<br />
string lastValue = values.Last(); <br />
<br />
MessageBox.Show("lastKey = " +lastKey + " lastValue = " + lastValue);
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|
|
But now I've a little mess here. I want to iterate whole dictionary, from the last to first pair. In this way, I've to take the last value and to find the next need to remove it, right?
I appreciate your help all the time...
CodingLover
|
|
|
|
|
string allstr = "";
for (int count = diction.Count; count > 0; count--)
{
allstr += diction.ElementAt(count-1).Value;
}
MessageBox.Show("allstr = " + allstr);
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|