|
The GUI is going to be pretty simple, but I will need to use the mouse. The problem is I don't think I want to create a second window, but figure out how to place the video inside the CustomUI window. I am not sure if I can create a Windows.Form and embedded that into it?
|
|
|
|
|
I created an object class derived from System.Object and an array class derived from ArrayList. I'm trying to serialize (and deserialize) the entire thing. I found a great guide here.
When I serialized in the same situation in VC++, it automatically serialized all of the objects in the array for me. All I did was write in private variables that are in the list itself, and all the objects inside the list got serialized properly too.
Now, in C#, I read the file after serialization, it picks up the private array list data but it doesn't automatically serialize the objects inside of it. Not only do they not show up in the resulting file, but there's a breakpoint on the individual object serialization which never gets reached.
The question is, is the array list not supposed to automatically serialize it's objects inside of it, or am I not doing something to let it automatically serialize its members? I can serialize the members using a foreach but I wanted to know what the word on this was so I don't re-invent the wheel.
|
|
|
|
|
Did you mark the class inherited from ArrayList with the [Serializable] attribute? As far as I know, serialization cannot be inherited, but I am not sure.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
My class that I derived from ArrayList, yeah. I have private variables associated with the list itself that are declared in the lists' class definition like counts, maximums and minimums. Those get serialized and deserialized so I know C# has no problem finding the list.
|
|
|
|
|
Could you post the code of the 2 classes, please?
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
You must put XMLArray and XmlArrayItem attributes as shown in code below:
<br />
[XmlArray ("MyItems"), XmlArrayItem("MyItem", typeof(MyItem))]<br />
public ArrayList MyItems = new ArrayList();<br />
The output XML should be in following form
<MyItems> <br />
<MyItem/><br />
<MyItem/><br />
</MyItems><br />
Of course the MyItem class must be serializable too..
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
I'm trying to use the binary formatter instead of XML or Soap.
|
|
|
|
|
I have to do a heavy load printing job...
In order to be ok with the clients, they want first to preview the printing, analize it, and then print it.
In my implementation I use a printPreviewDialog. When I show the dialog 1-2 minutes are wasted in order to generate the preview - this is OK so far... But when I press on the print button in the dialog, all the data that was readed previously is re-readed again wasting another 1-2 minutes...
Is there a way to print directly the data generated by the printPreviewDialog?
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
Hello gurus,
I'd like to know how can I retrieve the previous value of the SelectedIndex of the tab control?
I need to know the previous value before it is modified when the SelectedIndexChanged event of the tab is fired...
Can some one show me a code snipet for doing this please?
Best regards.
Fred.
There is no spoon.
|
|
|
|
|
|
Why can you not just store the data (int index) in a custom variable?
|
|
|
|
|
oops, sorry Leppie, I somehow didnt realise you had already said the same thing lol
|
|
|
|
|
|
Hello,
I would like to store the encrypted password in the Windows Registry, and in my application I want to retrieve the password and decrypt it for further use. How can I achieve this.
Thank you.
|
|
|
|
|
Look at the Microsoft.Win32 namespace for registry writing.
Look at the System.Security.Cryptography namespace for encrypting and decrypting data.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
I can access Windows Registry no problem. The problem is, I don't know how to store encrypted password in the registry, and when I want to retrieve the password, I need to decrypt the password as well. I figured that I have to use the Cryptograph class, but in what way to encrypt and decrypt the information I can figure out.
Thank you.
|
|
|
|
|
|
zaboboa wrote: I would like to store the encrypted password in the Windows Registry, and in my application I want to retrieve the password and decrypt it for further use.
So where do you want to store the encryption key in order to decrypt it?
If this is a user password that the user must type in to gain access to something, then using a hashing algorithm is a much better idea. Hashing is a type of one way encryption (you can encrypt, but you cannot decrypt). So when the user types in their password it is also hashed and the two hash values are compared. The bonus is that you don't need to figure out where to store any keys in order to decrypt the data (because you can't decrypt the data)
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I would like to store the password in the windows registry, and I want to use the password to access the SQL Server from my Application. So, user will never type in the password. The application will use a generic account to access SQL server and not per user basis. And I want to store the password in the windows registry.
Thank you.
|
|
|
|
|
hi!
i have written an application with a mask to enter some text and calculate something. this data is save in a file and now i want to print this file, out of my application.
can someone tell me a good way to do this or some tips how i have to write the printsetup?
thx
greatings dominik
|
|
|
|
|
|
In a form class module (Formtest) this is what I am doing in .NET 2.0:
AppBar.CCInfo.CanApprove
In AppBa there is a struct
the compiler is giving an error as follows:
Accessing a member on 'ChngCtrlUI.frmAppBar.CCInfo' may cause a runtime exception because it is a field of a marshal-by-reference class
Thanks
|
|
|
|
|
Try wrapping frmAppBar as a public property, making the field private.
Or, make ChngCtrlUI not inherit from MarshalByRefObject if you don't need remoting.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
I'm brand new to C# and I'm trying to figure out how to parse a string. Is there a function available much like the explode() function in PHP which breaks up the string on a certain character and places the different parts into an array?
|
|
|
|
|
string s = "a,b,c";
string[] parsed = s.Split(',');
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|