|
Perfect, great response.
Thanks
|
|
|
|
|
I'm using System.Diagnostics.Debug.WriteLine to dump info. to the Output window in VS.
I need to implement some system for assigning verbosity level and on/off state per assembly.
Any suggestions how to hook into existing infrastructure? Any notes on existing conventions (eg. should verbosity level 0 mean no filtering, or no output)?
Note: I do want to keep this debug only.
Thanks
NIK
|
|
|
|
|
You can add custom tracelisteners, which allow you to redirect your logging output to any place you like. Perhaps this article[^] will show you what you need to know about that. Once you have created your own tracelistener, you can add in whatever verbosity settings you need.
:josh:
My WPF Blog[^]
|
|
|
|
|
Hi
I am a former java/swing programmer who just started programming C#.NET. When starting to create complex gui-applications I realized that I dont know how to attach a datastructure to a ListBox component.
What I want is to use a external arraylike structure to control the content of a ListBox. When updating this arraylike structur (adding, removing, modifying, etc) the ListBox also should be updated automaticly. I have not figured out how to do this in C#.NET yet, but its really easy in java/swing. There I could just to something like:
Vector<string> structure = new Vector<string>();
JList list = new JList(structure);
and after this all operations on "structure" would also affect the JList content.
Another approach was to create a class that inherited ListModel and override some methods for fetching info about the structure.
Any good advice about how I can achive the same using C#.NET? This is basicly all I miss from java so far.
Thanks so much for the help.
|
|
|
|
|
Data binding in .NET is implemented as a set of properties on the control that you set: DataSource, DataMember, and DisplayMember. If your list/collection type supports two-way notifications (namely, it implements the IBindingList interface) then changes made to the data source will be reflected in the GUI automatically. Search CP or MSDN for examples of how to use data binding.
:josh:
My WPF Blog[^]
|
|
|
|
|
Thanks for the start.
I have tried making a ListBox, a List (System.Collections.Generic) and do:
listBox1.DataSource = listdata;
where listdata is that generic List. The listBox show the listdata content, but when updating the listdata (listdata.Add("something")) it wont update in the ListBox. I am really sorry for the newbie questions. I find alot of guides on databinding when dealing with databases, but for a simple List its little or nothing.
|
|
|
|
|
List<t> does not implement IBindingList, so programmatic modifications to the list won't propogate to the control. Use ObservableCollection<t> if you need that functionality.
Josh
:josh:
My WPF Blog[^]
|
|
|
|
|
Hi
I used a BindingList and got everything to work. I am having a hard time seeing what collection-classes I should use for different tasks, but I probably will use List for everything non-gui related and BindingList for gui stuff unless you have something to say on that :p
Thanks so much for the help!
|
|
|
|
|
Hi ,
I hv a application(exe),i am running it simultanesouly 2 or more times..when many instance of an application is in open state, i want to different name for different instance in task manager...
|
|
|
|
|
The name you see in Task Manager is the .EXE filename. No, you can't change it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Like Mr. Kreskowiak said, the .exe filename cannot be changed in the task manager.
|
|
|
|
|
Hi friends,
first sorry about my english
My problem is to get the full quallified CodeTypeDeclaration of an Component to add some new methods, enums and comments.
In Framework 1.1 i do this witch the RootDesignerSerializer an it works fine. Now in Framework 2.0 Microsoft sets the RootDesignerSerializer to obsolete an puts the TypeCodeDomSerializer instead.
Here is my new implementation :
My base component :
[DesignerSerializer("MyTypeSerializer, MyAssembly, Version=2.0.0.8, Culture=neutral" , typeof(TypeCodeDomSerializer))]
public class MyComponent:Component
{
private void InitializeComponent() {}
}
My serializer :
class MyTypeSerializer: TypeCodeDomSerializer
{
public override object Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
{
IComponent cmp = null;
cmp = base.Deserialize(manager, declaration) as IComponent ;
return cmp;
}
My custom Component :
public partial class MyComponent1 : MyComponent
{
....
private void InitializeComponent(){...}
}
Now if i get to deserialize MyComponent1 an error occurs like this ......
The method MyComponent.InitializeComponent could not found.
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
Did anyone knows how to De- / serialize an Component with the TypeCodeDomSerializer so i can modify the this Type.
Note that am allready at deserializing MyComponent1, but in this case i dont wanna make changes to the object returned from base.Deserialize(manager, declaration). I will modify the CodeTypeDeclaration after base.Serialize(manager, root, members).
So i hope anyone can help ....
Thx Kai
(I know about my bad english ... sry, again)
|
|
|
|
|
Hi, i want to develop an encrypting proxy that listen on a specific port, take the messages, encrypt them, and then send the messages to its destination, and act in the other way, receive the messages, deencrypt them and send it to the application which uses that port...is this possible?? Is there an article about this!!??
Thanks in advance!
|
|
|
|
|
Hi,
is there any body out, who have advantages with XPS-paper, XPS-printing path, samples or other material?
THANKS
Gerhard
|
|
|
|
|
I want to execute batch file during installation that will perform execute commands like regasm and tlbexp.
I want it(.bat) execute automatically during installation.
Please help.
Regards,
kamran
Kamran
|
|
|
|
|
You can do this very easily using Custom Actions[^] in your installer project.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i want code to vibrate pocket pc in vb.net or c#.net.
|
|
|
|
|
And people in Hell want ice water!
Seriously, noone is just going to "give" you the code. You have to write it yourself. Making the PPC vibrate depends entirely on the hardware you have and if the manufacturer has some kind of SDK to give you that ability. There is no 'standard' for this...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I want to apply certain commands on the asseblies after they will be placed in the GAC during installation.e-g Tlbexp Assembly1.dll or regasm Assembly1.dll.
Currently i am running the Setup from batch file that starts the setup.Now the Setup will install the assemblies on to the GAC and also copies them into the installation path.
But this is not a good pocedure to accomplish the task.
Is there any good alternative?
Regards
Kamran
Kamran
|
|
|
|
|
Hello all!
I am having problems on finding out, how to get acces to the certificatestore in PocketPC and WM5 devices.
I want to programmatically add and delete certificates from the personal store using c#. (or any other .NET language).
Hopefully there is someone here that can help me get on my way.
Thanks in advance!
.. No-one?
-- modified at 3:21 Friday 7th July, 2006
|
|
|
|
|
hello friends,
i want to create a program that can display list of dynamic IP of all the users logged in for a website at anytime.
How is it possible in .NET framework.
with regards
Pawan Mishra
MCA, MCP.NET, MCAD.NET
|
|
|
|
|
You can only detect the IP of a user when there is a request. That means that you have to store the IP when the user logs in or visits a page.
A dynamic IP is used when you have a web server and don't have a static IP. A web page visitor doesn't user a dynamic IP.
---
b { font-weight: normal; }
|
|
|
|
|
Dear Gufa,
can you send me code for this problem?
regards
pawanmishraji@gmail.com
Pawan Mishra
MCA, MCP.NET, MCAD.NET
|
|
|
|
|
How the code looks depends very much on how you store the information for the users, e.g. what kind of database, the database layout, what data you store, how you communicate with the database, etc.
You use Request.UserHostAddress to get the IP number of the user.
---
b { font-weight: normal; }
|
|
|
|
|
Dear Gufa,
can you send me code for this problem?
regards
pawanmishraji@gmail.com
Pawan Mishra
MCA, MCP.NET, MCAD.NET
|
|
|
|