|
|
I had a look Manfred and it gets virtually no traffic so I'll leave my post here and accept the flak!
|
|
|
|
|
Good suggestion, Manfred! (upvoted)
|
|
|
|
|
Manfred R. Bihy wrote: posted in the collaboration forum Thx Manfred, I didn't know there was one.
|
|
|
|
|
hi
Does anyone have chart control Recommended for C# WinForm ?
free or Built-in
thanks
|
|
|
|
|
|
I have 3 servers that I wish to monitor through a Windows form and then display the RoundtripTime in 'ms' on a form in their corresponding labels.
Servers are Server1, Server2, Server3
Labels are Label1, Label2, Label3
Using the below code I am easily able to loop through these servers and output to console and even write to a single label only, but cannot figure out how to ping Server1, write to Label1; then Server2 to Label2 and so on...
Any advice would be much appreciated (I have // out the Console.Write lines, as these work, but are not what I want to achieve.
private void ping_Status(object sender, EventArgs e)
{
string[] pingsvrs = new string[3];
pingsvrs[0] = MyGlobals.Server1;
pingsvrs[1] = MyGlobals.Server2;
pingsvrs[2] = MyGlobals.Server3;
using (Ping ping = new Ping())
{
foreach (string pingsvr in pingsvrs)
{
//Console.WriteLine("Pinging: {0}", comp);
try
{
//Console.Write(" {0}...", comp);
PingReply reply = ping.Send(comp);
if (reply.Status == IPStatus.Success)
{
//Console.WriteLine("Success - IP Address:{0}..{1} ms", reply.Address, reply.RoundtripTime);
//string delay = string.Format("{0}", reply.RoundtripTime);
LabelX.Text = (delay + " ms");
}
else
{
//Console.WriteLine(reply.Status);
LabelX.Text = "Failed";
}
}
catch (Exception ex)
{
//Console.WriteLine("Error ({0})",
ex.InnerException.Message);
LabelX.Text = "Error";
}
}
}
}
|
|
|
|
|
Why are you using labels at all? Your solution doesn't scale at all.
Use a DGV instead or a ListView. That way you don't have to change the number of labels to support a different number of servers and jump through the hoops of using labels at all.
|
|
|
|
|
i moved to a new pc today , it has a 64 bit OS, win 7 proffesional, but icant get visual studios installed, i keep getting a error unsupported OS , but i had it installed on the other pc which also was a win 7 pro
modified 28-Jul-15 10:01am.
|
|
|
|
|
|
i asked it here because the people here might help me , as usual , lol but uhm this pc does it with 2015 RC and with the 2013 exp
|
|
|
|
|
The links are to Visual Studio specific forums on this site...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
We have some list of files to copy from a ftp server. Sometimes the file in the source folder have files arrived on same date but @ different time
and I would like to copy only latest file for each date. Ex:
abc_sky_2014-01-15XYZ03-05-00.Dat
abc_sky_2014-01-15XYZ03-08-00.Dat
abc_sky_2014-01-16XYZ008-10-00.Dat
abc_sky_2014-01-16XYZ008-13-00.Dat
abc_sky_2014-01-16XYZ008-16-00.Dat
From above files I want to fetch only the latest files for each date : abc_sky_2014-01-15XYZ03-08-00.Dat, abc_sky_2014-01-16XYZ008-16-00.Dat
Can someone please help.
|
|
|
|
|
There is no "simple" built-in way to do that.
You will have to read all the file names, and group them by name and date. You can then easily sort the times.
I'd suggest using a regex to "split" the file name from the date and time, then using Linq to group the values.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
var directory = new DirectoryInfo(@"F:\Root\");
var files = from f in directory.EnumerateFiles("*.dat")
group f by f.Name.Substring(0, 21) into g
select g.Last();
foreach (var file in files)
{
Console.WriteLine(file.Name);
}
|
|
|
|
|
Hello everyone. I want to develop a small application in Windows Form Application using VS Community 2015. I need to create some forms and then export them in a pdf file for printing. The problem is that I have to create the form to fit exactly in a A4 paper width and height. What tools do you recommand me to use or which do you think is the best approach?
|
|
|
|
|
Use a PrintDocument[^] - you have complete control over the exact placement of everything.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Thank you, I will try with that..
|
|
|
|
|
You're welcome!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Ok so I have a problem. I have to create the form of the page with multiple data which will be inserted from textboxes and labels. I need to arrange them and in the final, I found a way to create more pages if is necessary. But I can't set the height of the windows forms larger than 780 and I really don't know why ) Is there any way to create a structure for the form specially for printing? I'm kinda beginner with this type of projects..
|
|
|
|
|
Hi,
I'm trying to build a logic analyzer - style chart with minimum 16 lines. I so far took a chart and added 16 chart areas, 16 series and 16 titles. The chart areas are all aligned to the first one.
What I need to add is a
1. "general" horizontal and vertical scrollbar and a horizontal scale
2. a zoom and pan function via mousewheel
3. at least two cursors whith automatic "delta" display
for 1. I tried adding the scale and the scrollbar to the bottom chart area, but this results in a changing display of the line as soon as a scrollbar gets visible. Of course all lines should scroll together. I imagined something like scrollbars for the chart not for the chartArea but that doesn't exist, right ?
The vertical scrollbar should be visible if there are more lines than can be displayed in the current window, but the first problem is that chart areas can only be added in relation to the chart height from 0-100 % , not more. Should I use something else than chartareas?
2. for example strg+wheel for zoom and alt+wheel for pan (scroll) should I use a keypressed/keydown event ?
3. no idea yet, the only visible cursors so far are the ones when click and drag which results in a automatic zoom currently
can anyone give me some hints for the different problems ?
Thank you very much,
Mat
modified 28-Jul-15 4:18am.
|
|
|
|
|
ok, point 2. done, this leaves 1. and 3. ...
no one ?
|
|
|
|
|
How do I use the repisitory pattern in Mvc tamplate
|
|
|
|
|
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
A very quick search using your question as the search term gave nearly half a million hits: Google "How do I use the repisitory pattern in Mvc tamplate"[^]
In future, please try to do at least basic research yourself, and not waste your time or ours.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Completely agree with my friend's comment above.
But assuming that you are new to this world, be my guest and have a look into this article.
http://www.codeproject.com/Articles/631668/Learning-MVC-Part-Repository-Pattern-in-MVC-App
But please from next time, time to do some basic research first.
|
|
|
|