|
I was hoping it was possible to do this in C#.
|
|
|
|
|
Fayu wrote: I was hoping it was possible to do this in C#.
Well it may be, but before you can start coding you need to design the structure of your program and the logic of your parser and associated grammar. As I said before, try to search on the subjects you are interested in and you may find that someone has written a technical paper on that very subject which will lead you to a solution. Always remember that CodeProject Search and Google are the first steps in finding an answer.
But don't expect anyone on these forums to write your program for you. We are all working on our own problems as well as answering questions.
|
|
|
|
|
I was not expecting you to write code for me. I have googled it and have seen that antlr is one way of going but I wanted to know if it was possible to do this in C#.
|
|
|
|
|
Well, as a general statement yes, it is possible to do it (or anything else) in C#. However, your original question was framed in such a way that implied you were asking for a full solution to your problem.
|
|
|
|
|
Why not take a look at using ANTLR[^]? It even has an PL/SQL grammar available here[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi,
Why do I get a funny brightening gradient-like behavior when setting the size mode to stretch a small image in a large pictureBox control??
Thank you.
|
|
|
|
|
Hi,
I am suffering from one problem since few weeks. Could you please try to help me?
I am a C# programmer, i have client needs:
He have 10 computers in office (VPN connection). one computer is server and all are clients. server computer has one folder it always updated time to time, i had to writer code to copy that folder from server computer. i made it and it works fine when i run that software in two system LAN connected.
But VPN server needs user authentication. how can i connect to VPN server through C# program, this is my question.
Hope nice to hear from you!
Thanks!
yogesh
|
|
|
|
|
|
i could not open the link given...
yogesh
|
|
|
|
|
Snippet from the link:
For all of you who are looking to do a similar feat to what I did, the command is as follows:
rasdial <vpn_name> <vpn_username> <vpn_password>
To disconnect:
rasdial <vpn_name> /d
Thus, in usable terms, my line would look like this:
System.Diagnostics.Process.Start("rasdial.exe", "My_VPN My_Username My_Password");
To disconnect from the VPN, simply use this line:
System.Diagnostics.Process.Start("rasdial.exe", "My_VPN /d");
|
|
|
|
|
Can anyone tell me how shall I create a new control a button inside a textbox. The button will have a search(loop) picture I will use it as a lookup control in my application.
|
|
|
|
|
why put a button inside a text box? Surely a control designed to distinguish importance like a group box would serve a better purpose then trying to couple a text box that contains a button?
|
|
|
|
|
Hi,
use Button.Controls.Add() ;-
bye
|
|
|
|
|
You have it backwards, he wants a button within a text box, not the other way around.
|
|
|
|
|
Take a look at the source code for v 1.1 in this[^] article. The FileChooserLibrary contains a control which enables the sort of functionality you are looking for. It is unfinished, but working, and should give you some ideas at the very least.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi
I would like to update the GUI once specific scenario occurs
I’ve application that have GUI and logic layers
At logic layers I have hierarchy classes witch means that class ‘A’ use class ‘B’ that use class ‘C’, etc
At Class ‘C’ I would like to notify GUI (such as update counter edit box) once a condition exist (for example
if ((m_num % 100) == 0))
UpdateGUI(m_num)
I know I can use the event mechanism
Create and register event at class A,B,C and register also the event at the GUI
Is there any other way to call event from very low class to very higher class hierarchy?
I hope I describe my question properly
Thanks
Ronen
|
|
|
|
|
Ronenb wrote: Is there any other way to call event from very low class to very higher class hierarchy?
The only other way that springs to mind is to use P/Invoke to utilize the SendMessage/PostMessage API calls. That is a lot of work though, when the Event mechanism is there.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
The listview control has the scroll bar.
But I only need the V Scroll bar, and I want the scrool bar in the left of the list view and when scrolling, the list view will be changed one row by one row.
can anyone help me ? How to uses the VScrollBar to control the listview control.
|
|
|
|
|
Dear All,
I have developed an application which does some manipulation with database and it also uploads and downloads files from web.
the application is basically in Winform Layout, it has Notify Icon which shows the status of uploading and downloading.
the problem is in logging of computer, if the application is running, the computer does not log off which i want it to log off. Y it doesent log off?
if i close the application and point to log off, computer can log off successfully.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi,
with which method do you close the form manualy? did the closing handler stop closing?
kind regards
|
|
|
|
|
thx, sorry for late reply,
yes i have certain conditions in closing event, based on those condition i am closing my form.
a simple condition is a boolean value, if that bool value is true than i am closing my form.
i think this causes the form not to close when i log off my compuer
how can i solve this, Please?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi,
you're lucky, because I've got announcement for your post.
Okay, I have a way:
You may use
Microsoft.Win32.SystemEvents.SessionEnding += new Microsoft.Win32.SessionEndingEventHandler(SystemEvents_SessionEnding);
and then
void SystemEvents_SessionEnding(object sender, Microsoft.Win32.SessionEndingEventArgs e)
{
switch (e.Reason)
{
case Microsoft.Win32.SessionEndReasons.Logoff:
break;
case Microsoft.Win32.SessionEndReasons.SystemShutdown:
break;
default:
break;
}
}
you may omit the switch block, because you don't need it. Everytime the handler is called, Windows logs you off, or shuts down.
IMPORTANT: On Form_Closing (or Form_Closed) you MUST remove handler from SessionEnding-Event:
Microsoft.Win32.SystemEvents.SessionEnding -= new Microsoft.Win32.SessionEndingEventHandler(SystemEvents_SessionEnding)
hope it helps
kind regards
modified on Wednesday, September 2, 2009 5:14 AM
|
|
|
|
|
i have tried following but still it didnt helped me
void SystemEvents_SessionEnding(object sender, Microsoft.Win32.SessionEndingEventArgs e)
{
exitProgram=true;
Envoirnemt.Exit();
}
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Don't know if Envoirnemt.Exit(); works. Try this.Close(); instead, if it is a windows form application
Greetz
|
|
|
|
|
I have done following
void MainFormLoad(object sender, EventArgs e)
{
SystemEvents.SessionEnding +=new SessionEndingEventHandler(SystemEvents_SessionEnding);
}
void SystemEvents_SessionEnding(object sender,Microsoft.Win32.SessionEndingEventArgs e)
{
StreamWriter sw=new StreamWriter(@"c:\log.txt",true);
sw.WriteLine(e.Reason.ToString());
sw.WriteLine("close");
sw.Close();
exitProgram=true;
Close();
}
looks like nothing happens when i log off or shut down the computer
i see nothing in my c drive and also my winform never closes.
Note: i have also notify icon in my WinForm. It always appears. Y it doesent closes?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|