|
Hi all,
I am making use of Data block of the Enterprise Library 4.1, the problem is that each time I rebuild my application, Visual Studio overwrites the config file.
The application cannot function without these settings. How can I avoid this annoying issue?
The configuration line in question:
configSections
section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data....
configSections
dataConfiguration defaultDatabase="OraConnectionStr"
Thanks in advance.
Kind regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
I create a windows service where I implement the onStart() method, there i create i thread that opens a ServiceHost communication and write onto the base registery but it doesn't take effect, Idon't know how to give the thread the permission to write into it !
|
|
|
|
|
Open your "Control Panel", and look for the "Administrative Tools". This has an applet called "Services". Find your service in the list (should be there if it's properly installed) and double-click on it. Go to the tabpage called "Log On".
Here you can specify the account that the service should run under, and whether or not it's allowed to interact with the desktop (for, say, displaying a notification icon)
Hope this helps
I are troll
|
|
|
|
|
What account is the service running under??
|
|
|
|
|
My service runs under the "LocalSystem" accont, and I follow the quoted instructions (check the flag to give the permission to interact with the desktop ), but Regrettably the service could not write into the registery.
|
|
|
|
|
I found it !
Simply I wanted to wrote into "H_Key_Current_user" at it was impossible because the service was running under the "LocalSystem" account (not a "user" account) therefore I changed the location into "H_Key_Local_Machine" and it works very well
Thank you to all who wanted to help me
|
|
|
|
|
Dear friend
I want to make a website related to tree structure means if I generate a mail id example like rahul and ssponsored to other it means create other shyam the second id will come under my id . I want to see all it under a tree structure please advice to me how it possible.
Thanks ®ards
Akhilesh kumar
lucknow
|
|
|
|
|
www.rentacoder.com
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
The OP downvoted you and me for not doing his work. What BS that is.
|
|
|
|
|
They dont consider it as a help until you provide them with complete code which can be copy pasted
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
No, tell your client you cannot do the work.
|
|
|
|
|
Hello forum....
First of all I wanna thank you for your kind solutions for my problems.
I want to convert a string in DateTime format. The string is build in a C++ program using following code:
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
char* str = asctime (timeinfo);
WriteFile(hLog,str, lstrlen(str), &dwDummy, NULL);
So as an output I find the following string
Tue May 26 17:48:53 2009
in a specified fie.
Now I want to read this file in a C# program. Here while reading the file how can I know that a particular line is a time stamp.
I want to convert Tue May 26 17:48:53 2009 again into DataTime format.
I'll be thankful for any kind help.
Thanks ....
Vishal Moharikar.
|
|
|
|
|
Use regular expressions to find a match
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
How on earth does that help the OP?
He is not looking for a match, he wants to convert the string to a DateTime structure.
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.”
|
|
|
|
|
Henry Minute wrote: Here while reading the file how can I know that a particular line is a time stamp
Sometime, its better to read the complete message and not giving a conclusion based on the last line.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
string s = "Tue May 26 17:48:53 2009";
DateTime d = DateTime.ParseExact(s, "ddd MMM dd HH:mm:ss yyyy", new CultureInfo("en-US"), DateTimeStyles.NoCurrentDateDefault);
|
|
|
|
|
Like it! ParseExact - another one to commit to memory.
Regards,
Rob Philpott.
|
|
|
|
|
Wow. What noone caught onto here is that your code sample is written in C, not C#. Everything you've been told will not apply to your code.
You're in the wrong forum. You want the C/C++/MFC forum..
|
|
|
|
|
He said also that:
Now I want to read this file in a C# program
|
|
|
|
|
Whoops.
|
|
|
|
|
Whoa, slow there with the trigger, cowboy.
Cheers,
Vikram. Current activities:
Films: Philadelphia
TV series: Friends, season 4
Books: Six Thinking Hats, by Edward de Bono. Carpe Diem.
|
|
|
|
|
Vikram A Punathambekar wrote: cowboy
No, you've got me confused with another member of my team. That's his nickname, not mine.
Mine is more like, Conan the Destroyer.
|
|
|
|
|
I am a bit new to graphics in c#. Is there a way maybe to create a graphics object like a circle or square that it will look like it is 2d and then whenever a user click anywhere in the image object it must maybe give something like a messagebox and say it was clicked.
Graphics dc = this.CreateGraphics();
this.Show();
Pen bluePen = new Pen(Color.Blue, 3);
dc.DrawRectangle(bluePen, 0, 0, 50, 50);
Pen redPen = new Pen(Color.Red, 2);
dc.DrawEllipse(redPen, 0, 50, 80, 60);
This is what i tried but do not know how to make it look 3d or clickable
any help will be apreciated
Thank you
|
|
|
|
|
A few pointers as follows:
1) Rather than calling .CreateGraphics() handle the OnPaint event which gives you access to the Graphics object of the current control. This saves you having to determine every time your form is invalidated as the OnPaint event is raised at that time.
2) On a computer screen (which is inherantly flat) it is absolutely impossible to make an image 3 dimentional. The best you can do is fool the users eyes (and therefore brain) into thinking that they are looking at a 3 dimensional image. To do this you use perspective, shading etc.
2d box:
---
| |
---
3d box:
___
/ /|
--- |
| |/
---
3) To make things clickable you could either a) Inherit your shape from the Control class whereby it will then receive click events or b) Handle the click event of the form and using the mouse location (provided by the event) determine if the click is within the bounds of your shape.
|
|
|
|
|