|
It looks the applications config file.
|
|
|
|
|
So how can we differentiate so the .dll can look at its own .config as well as the application .config file?
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
|
I'm setting up a search and I want the user to be able to decide if they want to see results based on a particular state of a boolean column in the table or ignore it and retrieve all rows regardless of the boolean state. (I hope that makes sense)
Essentially I want the user to be able to set a checkbox as checked, unchecked, or indeterminate and have my program act on any three of these states. Is it possible to catch an indeterminate checkstate? If so, how? As far as I can tell, both checked and indeterminate return a true checked value, so I can't use null, and there is no checkstate value for indeterminate.
Help! (Thanks in advance! Any help or advice would be tremendously appreciated!)
|
|
|
|
|
Check the CheckState property (no pun intended!).
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Can you elaborate? It sounds as though you're telling me to do what I've already tried. I need a different action for all three checkstates: checked, unchecked and indeterminate.
|
|
|
|
|
Set the CheckBoxes ThreeState property to true, then use a switch to determine the search scope.
switch (checkBox1.CheckState)
{
case CheckState.Checked:
break;
case CheckState.Indeterminate:
break;
default:
break;
} If you want the action to take place when the CheckBox is clicked, use the CheckStateChanged event, not the CheckedChanged as the latter doesn't respond to Indeterminate.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hm... That's interesting. Does this only work in a switch statement? I was trying to use an if statement with no success.
Thank you for your help, Davey.
|
|
|
|
|
If statements will work fine
if (checkBox1.CheckState == CheckState.Checked)
{
}
else if (checkBox1.CheckState == CheckState.Indeterminate)
{
}
else
{
}
Lodeclaw wrote: Thank you for your help
No problem
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
i have problem in this control
please help me
when i put the my control in form give me error message
but not define error
public partial class rado : UserControl
{
protected internal List<RadioButton> rd = new List<RadioButton>();
public List<RadioButton> Rd
{
get
{
return rd;
}
set
{
rd=value;
dro();
}
}
public RadioButton this[int index]
{
get
{
return rd[index];
}
set
{
rd[index] = value;
}
}
public rado()
{
InitializeComponent();
}
private void dro()
{
this.Controls.Clear();
for (int i = 0; i < rd.Count; i++)
{
this.Controls.Add(rd[i]);
}
}
}
modified on Friday, January 23, 2009 5:03 PM
|
|
|
|
|
Three times is way too many - please stop hitting submit NOW!
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
|
khaled_0b wrote: i have problem in this control
please help me
So, what is the problem? Termites? Bad hair day? Freeze burn?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
when i put the my control in form give me error message
but not define error
|
|
|
|
|
I'm not quite sure what you're hoping to achieve - but the error is fixed by marking the Rd property as non serializeable in the designer by putting this attribute before it.
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
i went create RadioButtonListBox control like checkedListBox
with additional PROPERTIES
where i set
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
modified on Friday, January 23, 2009 5:39 PM
|
|
|
|
|
You're a long way off track. You'll be struggling to make it work doing it the way you are.
Examine the CheckedListBox source to see how Microsoft do it, then adapt that to your own needs. There's alot to learn to create such an advanced control - beyond the scope of a forum such as this until you get into more specific details IMO.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hello all,
I'm working on a program using MS SAPI 5 where people can have a verbal conversation with a virtual person. I know the general content of these conversations, so I could limit the dictation grammar, and hopefully get much better speech recognition. I just can't quite figure out how to limit the dictionary. Does anyone here know how to define a limited domain grammar in SAPI 5?
I'm using C#, here's the instantiation of my dictation grammar and recognizer:
System.Speech.Recognition.SpeechRecognizer _recognizer = new SpeechRecognizer();
DictationGrammar dictGrammarContext = new DictationGrammar("grammar:dictation");
dictGrammarContext.Name = "Contextual Dictation Grammar";
dictGrammarContext.Enabled = true;
_recognizer.LoadGrammar(dictGrammarContext);
_recognizer.SpeechRecognized += new EventHandler<speechrecognizedeventargs>(DictReco_Event);
_recognizer.SpeechHypothesized += new EventHandler<speechhypothesizedeventargs>(DictHypo_Event);
</speechhypothesizedeventargs></speechrecognizedeventargs>
Any kick in the right direction (even towards a more appropriate forum) would be appreciated.
|
|
|
|
|
Hi Guys, working on an app at the mo that has a db,
the thing is, is that at the moment the db is hard coded to point to c:\mydatabase.
but obviosuly what i want to do is deploy the app to the local os drive,
but how do i do this in code, and need to make sure in the code knows where to find the db.
|
|
|
|
|
Relative directorys, put your DB in your application folder and then use System.Windows.Forms.Application.ExecutablePath and it will point to the db.
|
|
|
|
|
EliottA wrote: put your DB in your application folder
NOOOOOOOOOOOOOOOOO!
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Not even if it's Access?
|
|
|
|
|
Hi Greeg, what do you recommend?
|
|
|
|
|
The easiest way I have found to deploy a database is to embed it in the assembly and then on first start check the application data directory for the file. If it doesn't exist write it using GetType().Assembly.GetManifestResourceStream("theEmbeddedName") which returns a stream that I save to a file.
The application data path is
System.Windows.Forms.Application.CommonAppDataPath
embed a file in an assembly is as easy as adding it the project and selecting Build Action:Embedded Resource.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
I suppose that partly depends on what database system is in use and what sort of environment it runs in. And whether or not other such databases are present.
In a corporate environment with "real" databases (i.e. not Access) there will likely be administrators to tell you where to stick it.
For home use you can pretty much do as you please, but try not to put it on a system ( C: ) drive.
modified on Saturday, January 24, 2009 12:50 AM
|
|
|
|