|
Hi,
Thanks for the response. Just getting back to work after Holiday break.
If you follow the link found in my original message (for some reason it is not clickable, but if you cut-and-paste into a browser it should work) it shows the code I'm using. In a nutshell, I'm trying to assign a new URI to an XML file. If the file (specialXmlFile in my example) has a .xml extenstion all is well. If it doesn't the binding does not take.
Lily Bristol
|
|
|
|
|
Hello
I have create a form (assume form1)this form has a name and password fields , I have another form (assume form2) it`s have a password changer
like
password :
confirm a new password :
by those fields I must change the password field in form1
please can anyone help me
<<<<<<<<<<<<<<<<<<<<<<<<<<<Best wishes>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
|
|
|
You'll need to store a "reference" to both forms somewhere so you can access both of them. Or alternatively store the password in a commmon location.
Here's a simple example (don't follow it for security reasons):
public class DataStore
{
public static string Password { get; set; }
}
public class Form1 : Form
{
private void txtPassword_TextChanged(object sender, EventArgs e)
{
DataStore.Password = this.txtPassword.Text;
}
}
public class Form2 : Form
{
private void ChangePassword(string newPassword)
{
DataStore.Password = newPassword;
}
}
|
|
|
|
|
Hello
Thanks for your answer but what can I write in class datastore (exactly in get & set)
<<<<<<THANKS A LOT>>>>>>
|
|
|
|
|
johnIT86 wrote: (exactly in get & set)
Those are automatic properties which require C# 3.0. You could write them as such:
public class DataStore
{
private static string m_Password;
public static string Password
{
get { return DataStore.m_Password; }
set { DataStore.m_Password = value; }
}
}
|
|
|
|
|
Not the best architecture seen so far.
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.
[my articles]
|
|
|
|
|
Why do you need to change the password in form1? You should not be displaying passwords, only asking the user to input. Change the password in form2, then go back to form1 as normal.
only two letters away from being an asset
|
|
|
|
|
Can anyone recommend a component, close or open-source (no GPL please), that has a decent editor to be embedded into an app?
Cheers
modified on Friday, December 28, 2007 3:33:32 PM
|
|
|
|
|
Actipro seems to be the defactor syntax editor for .NET applications. Syncfusion also have one I think.
There is also a free one that was initially by Compona but is now called Fireball or something else, there's an article on it here.
There's also ICSharpCode.TextEditor (from SharpDevelop)
If you don't want fully managed libraries there was also a managed wrapper around Scintilla that's gone through several incarnations, I don't know what the status of that one is anymore.
|
|
|
|
|
Many thanks Ed, hope there is more to check out.
From what I see Scintilla was a nice shot but remains to be well-supported etc. The managed wrapper I searched for got me to CodePlex (scintillanet) for people interested.
The one done here is on sourceforge but I think it lacks features or under-developed as of late.
So giving up on those two I checked out the Actipro vs Syncfusion and the latter seems to be cheaper and more heavy on ad machinery. But I appreciate the hint Actipro is the standard out there.
Are there any others?
Was just looking at VSX (and VS2008 route, sure it would give a huge feature set and virtually for free) but it is slightly an overkill as I just wanted Intellisense/code-completion and initially C# support (perhaps move on to other languages later). I guess it tells a lot where MS is going with dev tools and perhaps even XNA. Also that kind of VS 'hanging' complexity is bound to bring many bugs out in VS2008 SDK (and likely never to be available in Express editions) although I see it is available as open source to certain customers.
SharpDevelop was always an option although I am not really sure about their licencing (recently changed to LGPL?).
|
|
|
|
|
SharpDevelop is LGPL since 2005 (http://laputa.sharpdevelop.net/SharpDevelop2LicenseChangedToLGPL.aspx[^]).
The text editor alone doesn't have C# code-completion, but you can use implement code-completion if you combine it with other SharpDevelop LGPL libraries. There is an example standalone C# editor with code completion in the SharpDevelop source code download.
|
|
|
|
|
I would highly recommend Actipro's editor. If you are only looking for C# intellisense, then their control has it "built-in" with the .Net language add-on. So you could get up an running very quickly.
Initially, (with version 3.x and earlier) they only provided the ability to show intellisense (e.g. it didn't do it for you). I think Synfusion still works this way.
They also have the best support I've ever run into.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Cheers for your input guys, they all look great for a start. Although I can see myself looking deeper at both of them later (requiring Intellisense and good editing experience as a starting point is just a side-effect), I'd like to initially just get it over with and move on to the problem domain.
Thanks again..
(hope I don't see myself ending up looking along the lines of real-latent emergence of VBA SDK ,ie.once it became obsolete, equivalent in .NET Once you start with features and accepting requests for change, it becomes an unstoppable process)
|
|
|
|
|
I've experienced coding against a trial of Actipro's and also an old version of Syncfusions and my preference would be Actipro if I had a project that could justify the cost.
Don't know about VSX at all.
I recently had a look at SharpDevelop's latest release and the whole thing seemed much easier to use than I remember although there is very little documentation for it so if you're stuck you have to ask on the forums or look at the source code. Actipro will have the benefit of many more examples, every example for #Develop points you to the #Develop code and this is just too big and abstract for many things.
|
|
|
|
|
After 3 hours of frustration I need some help with the findOne() method. FindAll() is no problem but after gong through and trying findOne() code I have only gotten one to work all the others fail (including the one on this site: http://www.codeproject.com/KB/system/QueryADwithDotNet.aspx[^]. The problem seems to be with the search filter, I have to set it to "samaccountname":
<br />
DirectorySearcher search = new DirectorySearcher();<br />
search.Filter = "samaccountname=" + userName;<br />
<br />
<br />
<br />
search.PropertiesToLoad.Add("memberOf");<br />
StringBuilder groupsList = new StringBuilder();<br />
SearchResult result = search.FindOne();<br />
if (result != null)<br />
{<br />
int groupCount = result.Properties["memberOf"].Count;<br />
<br />
for (int counter = 0; counter < groupCount; counter++)<br />
{<br />
groupsList.Append((string)result.Properties["memberOf"][counter]);<br />
groupsList.Append("|");<br />
}<br />
}<br />
else<br />
{<br />
MessageBox.Show("not found");<br />
}
help!!!
shwaguy
modified on Friday, December 28, 2007 12:37:58 PM
|
|
|
|
|
Does this code compile? What is the error message you get? Did you debug it? What line does it fail on?
Just because we can; does not mean we should.
|
|
|
|
|
I thought the original posting was pretty clear:
-The code works as is, but, when substituting the commented out filters for the working one it fails
-The code fails becuase "SearchResult result = search.FindOne();" results in "result = null"
-There is no error message, a null value is returned
-I am using VS C# Express 2005 and have reinstalled and restarted the PC
If there is a better way to trouble-shoot let me know, I need all the help I can get.
thanks,
shwaguy
|
|
|
|
|
I compiled this code:
static void Main(string[] args)<br />
{<br />
DirectorySearcher search = new DirectorySearcher();<br />
string userName = "myusername";<br />
search.Filter = "samaccountname=" + userName;<br />
<br />
<br />
<br />
search.PropertiesToLoad.Add("memberOf");<br />
StringBuilder groupsList = new StringBuilder();<br />
SearchResult result = search.FindOne();<br />
if (result != null)<br />
{<br />
int groupCount = result.Properties["memberOf"].Count;<br />
<br />
for (int counter = 0; counter < groupCount; counter++)<br />
{<br />
groupsList.Append((string)result.Properties["memberOf"][counter]);<br />
groupsList.Append("|");<br />
}<br />
}<br />
<br />
Console.WriteLine(groupsList.ToString());<br />
Console.ReadLine();<br />
}
Resulting in groupList.ToString() = CN=ggotamanda,OU=Groups,OU=OT,OU=CityHall,DC=stpaul,DC=city|CN=ggcbotusers,OU=Groups,OU=CB,OU=CityHall,DC=stpaul,DC=city|CN=ggTMSWebMasters,OU=Groups,OU=IS,OU=CityHall,DC=stpaul,DC=city|CN=ggotusers,OU=Groups,OU=OT,OU=CityHall,DC=stpaul,DC=city|
my guess is that the username variable is not known to AD so you get a null result. Beyond that, maybe someone else has an idea.
Just because we can; does not mean we should.
|
|
|
|
|
try this, the only thing I can see different from what I've used.
search.Filter = "(SAMAccountName=" + userName + ")";
only two letters away from being an asset
|
|
|
|
|
thanks for the reply, but there is nothing wrong with the code as it is posted!!!
Using "samaccountname" as the filter criteria works everytime (read the code comments). Using anything else fails, I have tried fully compliant LDAP queries too.
I have no issue with the FindAll() method but would like to use this one (I figure that it is faster).
help!!!!
shwaguy
|
|
|
|
|
shwaguy wrote: there is nothing wrong with the code as it is posted!!!
Don't go getting you feathers up. If there is nothing wrong, then what is the question?
Perhaps you need to calm down and restate the question, more clearly since we are obviously not getting your meaning.
only two letters away from being an asset
|
|
|
|
|
I seem to get my feathers up when people reply, with the first thought that comes into their head, without actually reading the original post; it tends to destroy a thread.
Your post was not so bad, simple mistake...but 2 replies in a row (one not yours) that went down the same path is a bit frustrating.
Usually when a thread gets to 2 like this I never get an answer to the question......so I will ask later.
thanks
shwaguy
|
|
|
|
|
shwaguy wrote: so I will ask later.
I'll remember to ignore you then.
only two letters away from being an asset
|
|
|
|
|
thanks for letting me know you will ignore my threads...it was very useful on topic information (sc).
I understand that people make mistakes, but, when I get 3 knee jerk responses (responses that have NO input to the question) in a row I tend to figure noone will want to read the thread.
I twice stated that there was no issue with the existing code, but, you seemed to miss that. Your ego must be easily bruised if to be hurt by those exclamation marks.
-If a response is not the solution thats all good.
-If a response is correct solution thats all good.
-If the response is off topic becuase the poster did not bother to read the post....I think "I wish that the poster could delete the response, its a waste of reading time and clutters the original post"
You take offense way too easily. Just because you have 3500 posts does not mean I am kissing your butt for very poor, of topic, replies. I don't have anything against you either, I think you may have helped a lot of threads.
shwaguy
|
|
|
|
|
shwaguy wrote: I twice stated that there was no issue with the existing code,
Then why did you post it?
Go away, son, you bore me.
only two letters away from being an asset
|
|
|
|