|
Hello Nico,
sorry for the plug, but you seem to like the PropertyGrid but at the same time you regret it's not flexible enough at runtime. Did you try Smart PropertyGrid? It has been developed from scratch for flexibility and usability (this one, you can present it to your users)...
Let me know in the visualhint helpdesk if you have any question.
|
|
|
|
|
I am running into a weird situation right now. I have a UserControl that contains a MenuStrip. I want to hide certain items depending on the access level of the current user. When I set the top level menu item's Visible property to false...nothing happens and the item is still visible.
There are no references to any of the items anywhere else in the code so I am 100% sure that its not getting set back. If I set the Visible property to false via the designer...it works. Anyone ever encounter this or know whats going on??
|
|
|
|
|
In designer it's working?! Hmm and are you sure, if all of the controls on the menustrip should have Visible property = false ? [Menustrip have Controls property, which is collection of controls placed on that strip].
VirtualVoid.NET
|
|
|
|
|
|
i don't understand u'r question...but still is this what u want..
if(gridview.rows.count == st)
Message.show("Hello");
Koushik
|
|
|
|
|
Pish, editing you message as i type a reply.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
suppose st = 5;
i insert the row in gridview. I want to insert a according to variable suppose st=5; when gridview = st then appear message.
|
|
|
|
|
Why did you delete your original question? I didn't see it, so now I have no idea what you are talking about.
---
single minded; short sighted; long gone;
|
|
|
|
|
1) Is there any way of determining/measuring the extent of the floating point part of my computation (as a % of runtime)?
2) Also, is there any way what to determine what currently dominates in my application - (I/O) or compute?
I guess what I need are some sort of monitoring functions?
Cheers
|
|
|
|
|
For 1.) Check out the PerformanceCounter class...you can set it to monitor the % of a method.
For 2.) I take it you want to find out what part of your application is most CPU intensive? If this is the case then check out in Visual Studio: (From the menu)
Tools->Performance Tools->Performance Wizard
This will get you started on getting statistics on all of your project's contained Methods.
|
|
|
|
|
Thank you.... I will check out the PerformanceCounter Class.
I can't find the performance wizard in the tools menu. Is this available in VS 2003?
|
|
|
|
|
I believe it is new to 2005. Check out FxCop
|
|
|
|
|
A better idea. Get a profiler. This[^] is a fine example of one from RedGate.
|
|
|
|
|
I have a csharp windows application, i am using Mysql database, i need to provide a utility from the application to backup and restore database.
I can run the following commands from the Dos shell, but i need to run the same from the csharp code. I used the folder browser and file dialog to get the path
and created the following string "mysqldump -u root -p XXXX emanage > c:\emanage.sql" . can some one help me out by telling how to run a command from csharp code.
Thanks in advance
|
|
|
|
|
To run a command in DOS generally
System.Diagnostics.Process.Start("cmd", "command comes here"); is used
-- modified at 7:34 Thursday 11th October, 2007
Koushik
|
|
|
|
|
The the above script just opens the dos console and does not run the command in the entered string. How do i run the command automatically.
|
|
|
|
|
Hey why don't u keep the required command in a batch (.bat) file and then run the batch file using..
System.Diagnostics.Process.Start(@"filename");
Koushik
|
|
|
|
|
Thanks for the reply, i did a mistake earlier, i put cmd in the command string and actual command in the parameters, but now its resolved.
Thanks again.
|
|
|
|
|
string ls_path = @"c:\csharpbkp.sql";
System.Diagnostics.Process.Start("mysqldump", "-u root -p emanage >" + ls_path );
why does this not work,
|
|
|
|
|
Probably there is no process or filename by mysqldump ...
Anyhow u got the answer right...
Koushik
|
|
|
|
|
I am using a batch file for now, but there is a process names mysqldump and it works fine on the command prompt and with the batch file.
|
|
|
|
|
<br />
public delegate void updatevalores(int total);<br />
<br />
public partial class FormConexiones : Form<br />
{<br />
private int procesosactuales = 0;<br />
public FormConexiones()<br />
{<br />
InitializeComponent();<br />
}<br />
private void FormConexiones_Load(object sender, EventArgs e)<br />
{<br />
procesos proces = new procesos();<br />
Thread pid = new Thread(new ThreadStart(proces.iniciar(new updatevalores(actualizarv))));<br />
pid.Start();<br />
}<br />
<br />
public void actualizarv(int total)<br />
{<br />
procesosactuales = total;<br />
}<br />
}<br />
Another Class:
class procesos {<br />
{<br />
struct sproceso<br />
{<br />
public int id;<br />
public string NombreProceso;<br />
public string DirProceso;<br />
public string FileProceso;<br />
public DateTime tiempoinicio;<br />
}<br />
ArrayList listaprocesos = new ArrayList();<br />
bool existeproces = false;<br />
bool coincide = false;<br />
Timer nuevotiempo = new Timer();<br />
<br />
public void iniciar(updatevalores procesoact)<br />
{<br />
<br />
nuevotiempo.Elapsed += new ElapsedEventHandler(TiempoEjecutar);<br />
nuevotiempo.Interval = 5000;<br />
nuevotiempo.Enabled = true;<br />
}<br />
<br />
}
The Line Thread pid = new Thread(new ThreadStart(proces.iniciar(new updatevalores(actualizarv)))); has give me an error.
How i can pass values to proces.iniciar method??????????
Thanks
|
|
|
|
|
Hello,
This[^] should help!
All the best,
Martin
|
|
|
|
|
public delegate void updatevalores(int total);<br />
<br />
public partial class FormConexiones : Form<br />
{<br />
private int procesosactuales = 0;<br />
public FormConexiones()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void FormConexiones_Load(object sender, EventArgs e)<br />
{<br />
procesos proces = new procesos();<br />
Thread pid = new Thread(new ParameterizedThreadStart(proces.iniciar));<br />
pid.Start(new updatevalores(actualizarv));<br />
}<br />
public void actualizarv(int total)<br />
{<br />
procesosactuales = total;<br />
}<br />
}
Give me an error with
ParameterizedThreadStart(proces.iniciar)
The error is: none overload correspond 'iniciar' match with 'System.Threading.ParameterizedThreadStart' delegate
what the
|
|
|
|
|
damn
i forget to read:
This is simple, but only accepts a single parameter and isn't type-safe (just like the options when using thread pool threads)
:->
|
|
|
|