View Single Post
Old 09-04-2006, 05:58 PM   #6
veetid
MySQL Error
 
veetid's Avatar
 
Join Date: Apr 2004
Posts: 4,994
Quote: Originally Posted by JWise1203 View Post
The password masking is enabled for the two fields that you mentioned.

The question I have is if you made the masking available through the SDK. I will need to do this for a plug-in that I am developing. Basically have the masking work exactly as you have it setup now.

I see what you are saying... This should all just been done by you in your plugin, very basic stuff...

For example in setup when you are populating in readConfig just use something like this:

Code:
string hiddenpassword = ""; for(int i=0;i<readConfig("/APPCONFIG/DIALUPPASSWORD").Length;i++) hiddenpassword += "*"; this.CF_updateButtonText("BUTTON4", hiddenpassword);

Then when you go to save use something like:

Code:
osk myosk = new osk(LanguageReader.getText("APPLANG/SETUP/PASSWORDTEXT"), ((CFControls.skinButton)buttonArray[CF_getButtonID("BUTTON4")]).Text, true); myosk.MainForm = this.MainForm; if(myosk.ShowDialog() == DialogResult.OK) { string hiddenpassword = ""; for(int i=0;i<myosk.resultData.Length;i++) hiddenpassword += "*"; this.CF_updateButtonText("BUTTON4", hiddenpassword); updateConfig("/APPCONFIG/DIALUPPASSWORD", myosk.resultData); } myosk.Close();

Notice updateConfig writes the real password to to the XML file, this is just a function that updates the XML node and then if you hit save, it saves the file, you hit cancel no changes are made...

This is where I could encrypt the password, at updateConfig... Then when you load up your plugin and read the config unencrypt there...


NOTE: The biggest thing to note is the true parameter on the end of the OSK dialog creation... This tells the OSK to auto mask for you... This might have been all you were asking for the whole time, this is handled for you in the dialog... With intellisense you can seet he parameters on the OSK and the numberpad...

david

david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210

Last edited by veetid; 09-04-2006 at 06:01 PM.
veetid is offline   Reply With Quote