|
first you would split into lines, identified by the ; char.
then you would go over each line and determine what the line contains,
once you know that you can invoke a different parser for each case (var declare, function, etc)
Its a lot of work when you get into strings, which may contain chars which are part of your syntax, ;'s in strings have to be ignored, for example.
|
|
|
|
|
do u have sample code please ?
|
|
|
|
|
Instead of writing your own script language, I would suggest employing the .NET script engine; according to the author it only supports VB and JScript.NET. Or you could load a C# source file into memory and then compile it with the C# compiler classes then load the resulting assembly with the System.Reflection classes.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
Ok
but do u have sample code, because i'm new to this and what you're told me is a little upper than me
|
|
|
|
|
The two articles I linked to cover the topics; for the second article it covers compiling code; but I'm not aware if it covers loading the compiled components and executing them.
My article, Using reflection to extend .NET programs, covers how to load an arbitrary assembly and execute it by using an interface known to both the program and the 'script'.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
1- is it possible to create a software like Laplink or PcAnywhere in C#, what I want to do is to see the current screen on the remote computer and be able to manipulate it from my computer ? if yes how can I do this ?
2- How can I create a multiple client chat app like one server to monitaring all the messages of all the client connected and a lot of the same client app to chat with each other ?
Thanks
|
|
|
|
|
BLaZiNiX wrote:
1- is it possible to create a software like Laplink or PcAnywhere in C#, what I want to do is to see the current screen on the remote computer and be able to manipulate it from my computer ?
I don't see why not, essentially a program like this transmits keystrokes, mouse movement, and button clicks from the client to the server and the server sends back the bitmap representing the screen.
BLaZiNiX wrote:
yes how can I do this ?
You implement each of the things I outlined above. Sorry if its no help; but you are asking for a lot there.
BLaZiNiX wrote:
How can I create a multiple client chat app like one server to monitaring all the messages of all the client connected and a lot of the same client app to chat with each other ?
Sounds like an IRC server; I suggest taking a look at some of the open source IRC servers out there to see how they do it; then work how to accomplish the same things in .NET.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
no it's not an IRC related thing, It's only because when I use TcpClient and TcpListener, can I use the same app that run only the tcpClient suppose 5 times
I want to make something more like multiple client on one server like ICQ or MSN
|
|
|
|
|
BLaZiNiX wrote:
It's only because when I use TcpClient and TcpListener
It all depends on how you work with them; I don't know of any limitations with TcpClient/TcpListener.
To test this theory out you could create a simple server that accepts a connection, then spawns a new thread to handle that connection. In the real world this is a bad thing to do (too many threads will slow it all down); but it will help illustrate that there shouldn't be any such limitation.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
yes I know I ask a lot, it's because I want to make a program and I don't have any idea . If u have one u can tell me
CYA
|
|
|
|
|
BLaZiNiX wrote:
How can I create a multiple client chat app like one server to monitaring all the messages of all the client connected and a lot of the same client app to chat with each other
Should be a breeze if you use .NET Remoting.
May the Source be with you
Sonork ID 100.9997 sijinjoseph
|
|
|
|
|
|
Try VNC, Clickety[^]
It comes with sources.
Concussus surgo.
When struck I rise.
|
|
|
|
|
I made a invisible component with c#,I add it in toolsbox,but I can't change the default ico.help?
lost my way
|
|
|
|
|
Scroll down one day
But its short so here it is: ToolboxBitmapAttribute
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
thanks a lot.
It is the answer.;)
lost my way
|
|
|
|
|
How to prevent multiple instances of my app?
I remember using Mustex in other languages, but in C# there is a Mutex class but it does something different.
|
|
|
|
|
|
|
For a DropDown ComboBox (ones that have editable fields), how can I set it to only accept uppercase?
The solution to this problem will require getting the TextBox control that is in the ComboBox. How do you do this?!
Thanks!
|
|
|
|
|
maybe you could capture on TextChanged event and then do
myCombo.Text = myCombo.Text.Toupper();
or something like that.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
Make sure you do something like this though:
if( myCombo.Text.ToUpper() != myCombo.Text )<br />
{<br />
myCombo.Text = myCombo.Text.ToUpper();<br />
} otherwise you will be setting the text over and over and over and over and over and over again.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
Thanks guys for your input!
I am still curious though if there was a way to get access to the TextBox directly. Any thoughts there?
|
|
|
|
|
I am working on a wrapper for the XML stuff in C#, and I want to add the ability to easily declare common namespaces. What I'd like to be able to do is have an enum called Namespaces, and do this
MyDoc.Namespace |= Namespaces.XSL & Namespaces.dt;
The question is, if I define a property and make it an int, will my set method get called, will this expand to
MyDoc.Namespace = MyDoc.Namespace |( Namespaces.XSL & Namespaces.dt);
or would I be better to define operator | and operator & for my enum ?
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Christian Graus wrote:
The question is, if I define a property and make it an int, will my set method get called, will this expand to
MyDoc.Namespace = MyDoc.Namespace |( Namespaces.XSL & Namespaces.dt);
To quote my favorite professor. *clears throat* "Try it and find out"
I would bet that it would work as you expect, but you should put the FlagsAttribute on your enum and then use an enum of the same type for the property.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|