|
I had a nice and refreshing sleep, it made me realize that you guys are right about the concept of interfaces. Besides i found some nice tricks with reflection to make things more dynamic!
Thanks guys!
|
|
|
|
|
How can I fullfil the xml information for a enumerated type?
CODE_________________________________________________
public enum SegmentationTypes {SingleFrame = 1, FixedSize = 2, BottumUp = 3, Cumulation = 4, ShotDetection= 5, MedianIncremental = 6, Filtering = 7};
END CODE______________________________________________
When I insert the "///" I just get the summary field, and during compilin I get an error: "Missing XML comment for publicly visible type or member SegmentationTypes.SingleFrame" for every type in my enumerated type
Some suggestions?
|
|
|
|
|
You should put the individual items on a separate line then stick comments over each enumeration. You said "errors"... do you have "Treat warnings as errors" enabled? Is this something most people are doing nowadays???
Apologies for code layout...
public enum SegmentationTypes
{
SingleFrame = 1,
FixedSize = 2,
BottumUp = 3,
Cumulation = 4,
ShotDetection= 5,
MedianIncremental= 6,
Filtering= 7
};
Shaun: C# and .NET Evangelist to the known world.... well... the UK at least...
|
|
|
|
|
Hi.
im creating a control from scratch , inheriting from windows.forms.control
i want to be able to bind this control to a datasource , eg a datatable , iList etc
the data from the datasouce will be painted in the controls onpaint in a grid'ish way.
the problem is that since an ilist and a datatable have almost nothing incommon , so how would i go about to read data from the underlying datasource w/o breaking my neck??
do i have to implement special code to read data from each databindable type/interface?
or is there any form of support for this in the .net framework???
ive found some classes that _seems_ to have something to do whith this , BindingManagerBase and BindingContext , but i might be way wrong here?
can i somehow use one of those or any other class to extract data in the same way w/o having to care about what underlying object is bound to my control???
//Roger
|
|
|
|
|
You will need to use Complex Binding, since you said you are going to display the results in a grid’ish way. Most complex bindings are set to the Data Source property directly, as opposed to using a Binding Object to the DataBindings Collection. This is how the DataGrid does it.
You did not say if you were supplying your own data source or not. If you supply your own Data source, you will have to implement the Ilist and Icomponent interfaces. Does this help?
david23g
|
|
|
|
|
Have you checked out listcontrol and currencymanager classes?
Bo Hunter
|
|
|
|
|
Hi Everyone
I want to set share permissions which are "Fullcontrol","change" and "read" through code. But I can't find any c# classes for this. I can set all the security options using ActiveDs but I can not set any share level permissions.
Can anyone please help me?
Ashish
|
|
|
|
|
ok, so I have this....
private void Form1_Load(object sender, System.EventArgs e)
{
Process [] localByName = System.Diagnostics.Process.GetProcessesByName("notepad.exe");
}
So, first things first. From what I understand, the variable localByName (assuming it is a varible, and if it is what kind?) is storing the data from what ever "GetProcessesByName" returns, correct? If so what kind of data is it returing? A sting? A bool?
/\ |_ E X E GG
|
|
|
|
|
It is a variable and it is returning an array of Process objects.
You can access a Process object from the array like this:
Process p = localByName[0];
You can loop through the array like this
for(int i=0;i<localByName.GetLowerBound(0);i++)
{
}
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
hi,
how can i dequeue object from a Queue when the elements type of the queue is a structer?
for example, i use the following code to Enqueue the object 'new_object' which type is ABCD :
ABCD new_object=new ABCD();
MyQueue.Enqueue (new_object);
how to Dequeue?
this method doesn't work:
ABCD another_object=new ABCD();
another_object=MyQueue.Dequeue ();
any help?
|
|
|
|
|
sultan_mu wrote:
MyQueue.Dequeue ();
Dequeue() returns an object, so you need to cast back to the original object type.
another_object = (ABCD) MyQueue.Dequeue();
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
Thank u James..
now it's work!.
|
|
|
|
|
How can we get the DHTML object model as we do using IWebBrowser2 & IPersistStreamInit in COM?
Regards,
(a.k.a. Wal2k) www.wal2k.com
|
|
|
|
|
Can you tell me how to create a completely hidden windows form. I'm using it just for its message pump. I best I can do at the moment is hide from view, taskbar but no the Alt-Tab menu. And the user can still close it when it has focus and using Alt-F4.
I'm using a hidden form as I want to pass data using BeginInvoke between threads.
|
|
|
|
|
Well, have you thought of setting the forms visible property to false before calling its show method?
|
|
|
|
|
That doesn't work! Calling show just set visible back to true. Also the form still shows up in the taskbar and Alt-Tab menu. Instead I'm just using a Control instead of a Form.
|
|
|
|
|
I'm not sure exactly what you are trying to do, however, do you need to call Show? just instantiate the form, then do what you need.
|
|
|
|
|
I have a problem .. One of my applications is loading DLLs into memory but isnt unloading it.
I want to wirte a program that will get the address of a particular DLL loaded into memory and then unload it...Any ideas ?? Is it possible
|
|
|
|
|
curiousgal wrote:
One of my applications is loading DLLs into memory
By DLLs are you meaning .NET Assemblies or are you meaning C/C++ DLLs?
Once .NET Assemblies are loaded into an AppDomain they cannot then be unloaded unless you unload the entire AppDomain. Not sure what you can do if it is a C/C++ DLL, you could try calling FreeLibrary but there might be hidden functionality relying on that DLL still being loaded.
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
When I use SOAP format or binary format ... C# error that : ImageList is not mark as serliazation ....? How to mark ImageList as serlization ????
- what is PublicTokenType ?
|
|
|
|
|
I have a COM object that returns a binary string in a BSTR. .NET marshals this to a string. The problem is that some of the bytes get dropped when this happens.
As an example, load a PFD file into a byte array. Convert the byte array to a string, and then convert the string back to a byte array (UTF-8). If you compare the two byte arrays, they aren't the same.
I probably haven't explaied this very well, but I hope I haven't made it too confusing. Has anyone had any experience with this, and what can I do to make it work?
Thanks.
They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.
--Benjamin Franklin, 1759
|
|
|
|
|
Do you mean PDF file? If so what has loading the file got to do with COM? I have written quite a bit of code moving, loading PDFs etc. And I do it as Streams and byte arrays and have yet to see a problem.
Perhaps if you explain in more detail I may be able to help.
|
|
|
|
|
The COM object creates the PDF file on the fly. It's a third party control, so there isn't too much we can do about it.
I think my example of loading and manipulating a PDF file isn't the best example, because it doesn't really simulate the problem.
However, just out of curiousity, is there anything wrong with the following code:
<br />
pdfFile.Read(pdfBytes, 0, length)<br />
<br />
string pdfString = Encoding.UTF8.GetString(pdfBytes);<br />
<br />
string pdfBytes2 = Encoding.Unicode.GetBytes(pdfString);<br />
At this point, pdfBytes and pdfBytes2 should be the same, correct? This is not the behavior I'm seeing. I'm new to C#, and probably have made a very obvious mistake, but I would really appreciate someone pointing it out to me.
They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.
--Benjamin Franklin, 1759
|
|
|
|
|
Hmmm, not sure why the behaviour would be like that. I never have to convert the byte array in a string. I just carry it around till I have to write it out. I am not sure what happens behind the scene when the byte array is converted to a string. Maybe some stuff does not convert. What if you create a byte array with simple text or numbers and try the same. If that works then maybe its something in the PDF that does not convert well to a string. Just guessing. Sorry could not be of more help.
|
|
|
|
|
Unicode is UTF-16, which may be slightly different from UTF-8.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|