Click here to Skip to main content
15,899,313 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sharing a winform Pin
StephenMcAllister10-Apr-05 22:01
StephenMcAllister10-Apr-05 22:01 
GeneralRe: Sharing a winform Pin
S. Senthil Kumar10-Apr-05 23:14
S. Senthil Kumar10-Apr-05 23:14 
GeneralSerializing soap message Pin
RajivJain10-Apr-05 19:37
RajivJain10-Apr-05 19:37 
QuestionHow to Convert BYTE * to byte[] Pin
DeepToot10-Apr-05 18:33
DeepToot10-Apr-05 18:33 
AnswerRe: How to Convert BYTE * to byte[] Pin
DeepToot12-Apr-05 8:56
DeepToot12-Apr-05 8:56 
Generaltrouble trying to display integer values Pin
tadhg8810-Apr-05 15:17
tadhg8810-Apr-05 15:17 
GeneralRe: trouble trying to display integer values Pin
Christian Graus10-Apr-05 15:41
protectorChristian Graus10-Apr-05 15:41 
QuestionBuilt my own stream? Pin
Snowjim10-Apr-05 14:10
Snowjim10-Apr-05 14:10 
Hey!

I have built a class that inherit from the Stream class, but i am not realy using any of the Streams members, can i still call my class a Stream class?

My stream class need one stream from the serial port, and one stream from the units within the program.

To get this i add two ArrayLists(BuffertFromPort and BuffertFromUnit) to my Stream class..

My ide of this stream class is to let every unit(that needs the stream) get access to this stream object(as with regular stream objects),

Unit Reading part
the stream object stores the units name and the reader position on the BuffertFromPort array.

The units use a event on the stream to know when data is added on the BuffertFromPort array.

When this event is fired the units is providing there unit name to the stream object, the stream object looks how much data the unit is behind and returns this data to the unit. Is also moves the reader position of the unit.

The stream is using FIFO(First in first out), this means that if all unit reader positions is past a particular elemtn in the array, then it will remove all data before this poition.

Unit writing part
Only one unit can write to the serial port at once, so the unit need to get promission by the stream, if there already is another writing unit then the other unit will have to wait until the writing unit leves the premission free.

also this will be using events to let the serial port know when data is sent from a unit inside the program.

Incoming data from serial port
When data comes on the serial port i use ReadExisting witch return a string, this string is parse to byt[] then it is added to the Arraylist in the my stream object. When i unit is reading it returns the byt[] on a particular element and then the unit is parsing it to string(or what ever) there is also a function to let my stream class handle the parsing from byt[] to string.

THE REAL QUESTION
1. Can i call my class a stream class despite i dont use any of the Strem members?
2. Am i doing this the wrong way?
3. I know that you can connect streams to particular controls, is there any way i can do this?

Best Regards
snowman

QuestionPasring with C#? Pin
geiste10-Apr-05 13:41
geiste10-Apr-05 13:41 
AnswerRe: Pasring with C#? Pin
Christian Graus10-Apr-05 13:55
protectorChristian Graus10-Apr-05 13:55 
AnswerRe: Pasring with C#? Pin
Polis Pilavas10-Apr-05 14:01
Polis Pilavas10-Apr-05 14:01 
GeneralRe: Pasring with C#? Pin
geiste10-Apr-05 16:43
geiste10-Apr-05 16:43 
GeneralRe: Pasring with C#? Pin
Polis Pilavas11-Apr-05 2:01
Polis Pilavas11-Apr-05 2:01 
GeneralRe: Pasring with C#? Pin
geiste11-Apr-05 5:34
geiste11-Apr-05 5:34 
GeneralRe: Pasring with C#? Pin
Polis Pilavas11-Apr-05 7:25
Polis Pilavas11-Apr-05 7:25 
GeneralKeep Focus Pin
johanhertz10-Apr-05 11:19
johanhertz10-Apr-05 11:19 
GeneralRe: Keep Focus Pin
Polis Pilavas10-Apr-05 12:45
Polis Pilavas10-Apr-05 12:45 
QuestionMove captionless dialog??? Pin
ddmcr10-Apr-05 5:42
ddmcr10-Apr-05 5:42 
AnswerRe: Move captionless dialog??? Pin
Polis Pilavas10-Apr-05 7:42
Polis Pilavas10-Apr-05 7:42 
AnswerRe: Move captionless dialog??? Pin
doudou-shen10-Apr-05 18:31
doudou-shen10-Apr-05 18:31 
GeneralWindowMove event from an InternetExplorer object Pin
Pikebu10-Apr-05 5:19
Pikebu10-Apr-05 5:19 
GeneralC# tabControl question Pin
elapid10-Apr-05 4:27
elapid10-Apr-05 4:27 
GeneralRe: C# tabControl question Pin
sreejith ss nair10-Apr-05 18:00
sreejith ss nair10-Apr-05 18:00 
Questionbones with directx? Pin
taha mohamed10-Apr-05 0:53
taha mohamed10-Apr-05 0:53 
Questionhow to get and desktop background in C#? Pin
Sabry19059-Apr-05 23:49
Sabry19059-Apr-05 23:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.