|
Hello there. I am given a small xml script. How can I use that script to change the frame rate of this IP camera. Thanks for any input.
|
|
|
|
|
The question is not clear. Please explain what C# issues you are having problems with.
|
|
|
|
|
Well, I would say that you need to read some value from your XML file. It will either be an attribute or an element. Oh wait, it might be a set of values that you use to calculate the rate. If it is, you will have to read the values in and apply whatever calculation is appropriate. However, unless I'm greatly mistaken, IP cameras don't use framerates - they use bandwidth, and while you may be able to change the frame rate, the underlying bandwidth might not be able to cope.
As for actually choosing a frame rate and displaying your images then why not look at Aforge and set the DesiredFrameRate[^].
|
|
|
|
|
I have a textBox where i want to insert a string in a licence model (fdsf-dfss-fdfd-fdhd). I tried to select first 4 char and when I have 4 chars, is inserted "-". But it starts from the beginning when "-" is inserted after first 4 chars. This is how I tried:
private void textBox4_TextChanged(object sender, EventArgs e)
{
for (int i=0;i<=textBox4.Text.Length;i++)
{
while (textBox4.Text.Length == 4)
{
textBox4.Text += "-";
}
}
}
How can I make like after I have 4 chars and "-" is inserted, to be able to continue inserting the text after "-" ?
|
|
|
|
|
|
|
Change it to:
textBox4.Text += "-";
textBox4.SelectionStart = textBox4.Text.Length;
..in order to set the input cursor to the end of the text again.
Unrelated suggestion: Give your TextBoxes and all other controls a name that explains their purpose - in this case maybe "LicenceInput". That will make it much easier to read your code, even for yourself, after you haven't worked on it for a while
edit: A MaskedTextBox might be the most convenient way to handle this. The input mask would be: 0000\-0000\-0000\-0000
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
modified 20-Apr-15 7:15am.
|
|
|
|
|
it works, but after I insert another 4 characters, "-" is not inserted.
|
|
|
|
|
Please edit your original post and add your reworked code in a second code-block.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
On second thought, the modulo operator-approach isn't really well suited here, because due to inserting the dashes, the length of the text won't be a multiple of 4 at the positions where the next dash should be inserted. I would recommend a MaskedTextBox instead with an input mask like 0000\-0000\-0000\-0000
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
I can insert only numbers..
|
|
|
|
|
|
Is ok, I solved it. Thank you !
|
|
|
|
|
Too late I already replied ;o)
You're welcome!
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
is this a web app or windows app? If it is windows then you can use Masked Input and if it is web then you can use Jquery, don't need to hit server every time..
|
|
|
|
|
Is win form. I will try, thanks!
|
|
|
|
|
|
I've used masked textbox many times, just remember to set the mask and it will do all the work for you.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
How Can I Export Database From Sql Server To Sql Server Ce
|
|
|
|
|
|
|
Tridip Bhattacharjee wrote: all .net colletion related class follow the BTree algo ? None.
Usefull for harddisks with slow access time. What tree are you looking for, and what would you expect it to do? Or did you come across it and become interested? In that case, there's a lot more variants
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
I need to change the icon of the resulting .exe for my application programmatically at runtime. The path to the icon will be read form a file. I know it's possible to change the icon through: Project >> Properties >> Common Properties >> General >> Application Icon. I was reading at msdn to find the answer. It seems possible to change it but I just couldn't understand how. If anyone has done this before any help would be appriciated.
I'm using Microsoft Visual Studio .NET 2008
|
|
|
|
|
Set the Icon property of your form - that alters the runtime icon shown in the control box at the top left, and the taskbar.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|