|
Hey There thanks for the advice, I think I could do with reading up on thread safe code! Would it be worth while turning my Database connection code into an instanciable object and totally removing the static keywords to try and avoid these issues?
Thanks Mike
|
|
|
|
|
Hi,
I am new to C#, tried working with Validation Application blocks using the .config file approach and have run into some issues.I have created a solution file with 2 projects, 1 project has a form and am passing a value to the other project ( basically a class library )which has the app.config file and the class which contains the properties for which i have the get and set values.
Project 1
using ClassLibrary1;
using Microsoft.Practices.EnterpriseLibrary.Validation;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;
namespace Trial
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Class1 cw = new Class1();
cw.iNum = 1110;
ValidationResults results = Validation.ValidateFromConfiguration(cw, "Default");
if (!results.IsValid)
MessageBox.Show("error");
}
}
}
Project 2 has Class1.cs and the config file
Class1.cs
public class Class1
{
public int iNum;
public Class1()
{
}
#region Properties
public int Num
{
get { return iNum; }
set { iNum = value; }
}
#endregion
}
app.config
<configuration>
<configsections>
<section name="validation" type="Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidationSettings, Microsoft.Practices.EnterpriseLibrary.Validation, Version=4.0.0.0, Culture=neutral" />
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.0.0.0, Culture=neutral" />
</configsections>
<validation>
<type assemblyname="ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
name="ClassLibrary1.Class1">
<ruleset name="Default">
<properties>
<property name="Num">
<validator lowerbound="2" lowerboundtype="Inclusive" upperbound="100">
upperBoundType="Inclusive" negated="false" messageTemplate=""
messageTemplateResourceName="" messageTemplateResourceType=""
tag="" type="Microsoft.Practices.EnterpriseLibrary.Validation.Validators.RangeValidator, Microsoft.Practices.EnterpriseLibrary.Validation, Version=4.0.0.0, Culture=neutral"
name="Range Validator" />
</validator></property>
</properties>
</ruleset>
</type>
</validation>
</configuration>
my problem is that i am passing a value of 1110, but the range value is from 2 till 100, yet the validation is succeeding. Am i missing out on any details
|
|
|
|
|
my app get slow when i select items in ListView because the event SelectedIndexChanged called everytime an item get select, for example if i select an item, scroll down and select another item with SHIFT after around 1000+ items then that event will be 1000+ times, i searched on google and found some solutions, like using Timer, but i want to know that is there any other good solution ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
My only suggestion to you would be to rethink your approach. Surely having 1000+ records in a list view cannot be user friendly at all...
|
|
|
|
|
so can you tell me what should i use then ??
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
you need to separate your ui thread from data access thread.
use the background worker class.
attach your binding logic to "progress" event in the background worker and send 10 records (adjust accordingly) at a time to the ui.
that said i kinda agree with J$
being able to filter and doing lazy loading might be a better approach. so you give more information as the user requests it.. .not just send them everything in 1 request.
|
|
|
|
|
no its not what you think, i have to give all info. to user then (s)he will select items from ListView and do some tasks...thats why List controls were created, isnt it ?
ListView is too slow in everything, like deleting, selection .... but it looks better than DataGridView
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
guysss
suppose i select two imagess
and i want to compare them
like if they are exactly same or not
(by selecting sum random selected rectabgular portion of the images)
then how will i compare them by pixel by pixel
or any other method
|
|
|
|
|
no, you have to compare pixel by pixel
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
didnt understand wat u said
|
|
|
|
|
Why do you think it is an interesting question?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Assuming they are the same file type (and assuming they are compressed the same), then why would you need to do this? Ultimately, you could just compare the two images as byte arrays. Simplistically, you could use logic similar to the following:
If the number of bytes is different, then they are different.
For loop = 0 to Length of Image1
If Image2[Loop] Does Not Match Image2[Loop] Then
The Images are different
Exit Out
End If
End If
Shout Yippee Alleluia the Images are the same
|
|
|
|
|
Pete O'Hanlon wrote: Shout Yippee Alleluia the Images are the same
That's Geordie Basic I presume?
Are you sure you're in the correct forum?
|
|
|
|
|
Read my image processing articles for examples of gaining access to images at the pixel level.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all -
I am just about finished with my first C# windows application. The only issue I have left is finding the graphics for my toolbar buttons. I was told by a friend that MSDN has a standard set of graphics. Is this true and if so were are they. I have looked everywere on MSDN for these.
Thanks!
|
|
|
|
|
In VS2005 it's installed
C:\Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary
led mike
|
|
|
|
|
Hi dear fellow:
windows default toobar graphics are automatically added to the application...for this u have to select just Add Form type MDI...
Also u can use "Tool Strip" tool from the available Tools under tool boxe...just drag and drop to the top of the form..just after title bar..
ok...reply if it is helpful or needs more help...
Thanks
"Programming is a fun"
|
|
|
|
|
Can any one Help,
How to dynamically remove all data in the "Web.SiteMap" file using c# aspx 2.0.
|
|
|
|
|
Hi, i m working on a realtime video capture and i need help from a directshow veteran coder.
I need to make a directshow application with :
- Read streaming from Camera or Video file (in choice)
- Preview the capture in pictureBox
- Grab samples from SampleGrabber (to process images)
- Save the video capture in file (or not).
I need help in a simple process to activate "SAVE CAPTURE" with no interruption of the Camera or file read streaming.
See the schema here : http://etherny.no-ip.org/VKStream.gif[^]
Thx for your help.
|
|
|
|
|
This is all pretty easy stuff, there's at least two CP articles that do this.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i m very holess and got no guide in recording sound in c# , i got dll too but that dll do record the sound but it shows splash screen on the start of copy righgt i even tried to remove that splash screen but still not work fine;
Please guide me how i can record sound from computer as what ever is playing back on computer i wan to record it may in window media player or real player or from cdrom i wan to record it , please guide me in proper way give me example if u use any api then tell me example code i realy stuck in recording audio with c# plz help me and with your answers please leve ur email so i can contact you for further question thx
its me yami
now cheers
|
|
|
|
|
|
I do doubt that two wrongs make a right
I would point you to DirectX for full sound control, or third party control suites.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Hello.
i am using asp.net2.0 c# with atlas ajax enabled website.
in one module i have to creat radmenu inside the update panel on a button click..
but in this dynamic control generation its creating problem.
like its initial state is fully expand.
if i added post back trigger for that button now its generated in actual format like menu should be.
but now when i am scrolling my page then menu is always remain same as its postion but actually its should move as scroll move.
i hope i make my question clear.
if any one have any hint for this.please help me and mail me soln.
my address is dearviveksingh@gmail.com
thanx in advance.
|
|
|
|
|
Other forum members may feel different, but I would suggest that you post this in the forum of the site where you recieved the control.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|