|
smallkubi wrote: I think maybe paint problem. Why?
smallkubi wrote: When i ask before, i get the answer is point number is too big. The more points you need to draw, the longer it takes. If there had been a useless delay in the chart-control, people would have noticed.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I mean Dalay is not that Chart generating process is slow, when i finished plot, i want to operate on Chart, like mouse moving, Scroll... is slow.
|
|
|
|
|
Meaning it will have to recalculate which part it should show and repaint it. That takes time. Smaller charts with less points will be faster.
If you find that the Chart-control is "too slow" for your needs, you may have to implement your own.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
oh, do you know how to stop control auto refresh? i think if i can refresh it in mannual?
|
|
|
|
|
Stop the user from scrolling, panning and/or zooming, and you don't need to refresh.
If anything changes, a refresh would be required to get the updated data on screen.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Now i want to have the function of Zooming,scrolling... Anything changes, screen don't update automatically,I want to updated data on screen mannully, can it be possible?
|
|
|
|
|
Sure; use the drawing functions to draw your chart. Means writing code to calculate the length of the axes, drawing each point, drawing some labels.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi, i have another question...
If i want to use multi-thread to call fun1, how can i input the variable x, y,z?
for example:
static void Main()
{
int x = 1;
int z = 3;
Thread th=new Thread(fun1( ? )) //how can i do ?
th.start();
// fun1(x, y => fun2(y));
// fun1(x, y => fun3(y, z));
}
static void fun1(int x, Action<int> call)
{
call(x);
}
static void fun2(int y) { ... }
static void fun3(int y, int z) { ... }
|
|
|
|
|
Something like this:
Thread th = new Thread(() => fun1(x, y => fun3(y, z)));
Breaking it down:
Action<int> call = y => fun3(y, z);
ThreadStart start = () => fun1(x, call);
Thread th = new Thread(start);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Good Idea,i meet it.
And if i have a button at main Thread , it can abort Thread "th". How to code button click function?
And, if whether Thread th end or abort, i want to run" MessageBox.Show("Thread end")", how can i do it?
|
|
|
|
|
|
hi,
If i use Func<double,double> call= y=>fun3(y,z) , fun3 can be one output param function. But if my function need 2 or more output, how can i do it?
|
|
|
|
|
Sorry, I'm not following you.
Do you mean you want multiple return values from your function? If so, you'll need to create a class or structure to contain them:
public struct Fun3ReturnValues
{
public int SomeValue { get; set; }
public string SomeOtherValue { get; set; }
}
...
public static Fun3ReturnValues Fun3(int y, int z)
{
return new Fun3ReturnValues
{
SomeValue = 42,
SomeOtherValue = "Hello",
};
}
Alternatively, you could use the Tuple class[^], but the meaning of the values wouldn't be as clear.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
|
|
Hi,
I want a quick feedback as soon as a particular file is on an FTP server. What is the most effective way to get this information quickly?
File is comming daily from a service-provider.
File is stored in ftp-FileSystem with fix name+[Date]
Software is running on a Server (C# or Powershell)
We need this file asap after incomming to ftp-Server
(can we implement a FTP-Event for watching incomming Sigh | )
Thanks &
Regards
Nicole
modified 27-Nov-15 9:54am.
|
|
|
|
|
Get it from where, where does the file come from, where is it stored, is your software running on the server or on a client, etc?
Please edit your question and add some context and proper detail.
|
|
|
|
|
File is comming daily from a service-provider.
File is stored in ftp-FileSystem with fix name+[Date]
Software is running on a Server (C# or Powershell)
We need this file asap after incomming to ftp-Server
(can we implement a FTP-Event for watching incomming )
|
|
|
|
|
|
Keep in mind no matter what you use to tell you that the "file is there" it is merely telling you that the filename has been created. It will not tell you if the file has something in it or that the file transfer from the uploader has completed.
|
|
|
|
|
Very true.
Only sure way I have found for this is to require that a marker file be laid down after all other transfers have been completed.
|
|
|
|
|
I am new to c#. I have the following in my project in windows forms:
Form1 with button and DataGridView.
Form2 with button.
Form3 with button and 3 textBoxes.
In form1, I click buttonOpenForm2 form2 pops up. Then in form2 I click buttonOpenForm3 form3 pops up which has 3 text boxes and button. Now the 3 forms are open.
now in form3, I enter values in textBox1, textBox2 and textBox3 and when click buttonAddRow ( from form3) I want these values to be inserted into the DataGRidView in Form1.
My question is: How can I add a row into DataGridView in Form1 ( parent) from form3 (child of child form) WITHOUT closing form2 and form3? I mean I want to pass the data while form2 and form3 are still open.
Please help me. Thank you
Form1:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void buttonOpenForm2 _Click(object sender, EventArgs e)
{
Form2 frm2 = new Form2();
frm2.Show();
}
}
Form2:
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void buttonOpenForm3 _Click(object sender, EventArgs e)
{
Form3 frm3 = new Form3();
frm3.Show();
}
}
Form3:
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void buttonAddRow _Click(object sender, EventArgs e)
{
}
}
|
|
|
|
|
|
Hi, thank you for the help, I will have to study the properties and events then i will test the code written in the answer. thank you
|
|
|
|