1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
using System;
using System.Windows.Forms;
namespace FX3Goodies.ExtensionMethods
{
public static class Extensions
{
/// <summary>
/// Delegate um strings zu invoken.
/// </summary>
public delegate string StringInvoker(string toInvoke, Form Invoker);
/// <summary>
/// Delegate um Integer Werte zu invoken.
/// </summary>
public delegate int IntegerInvoker(int toInvoke, Form Invoker);
/// <summary>
/// Delegate um Double Werte zu invoken.
/// </summary>
public delegate double DoubleInvoker(double toInvoke, Form Invoker);
/// <summary>
/// Invokes the this string. Extension-method with params.
/// </summary>
/// <param name="stringToInvoke">The string to invoke.</param>
/// <param name="theInvokingForm">The invoking form.</param>
/// <returns></returns>
/// Documented at : 20.08.2008 , 10:56
/// done by : Noodles
/// on workstation : UNI-2
/// compiled for processor architecture : x86
/// processor id : x86 Family 15 Model 79 Stepping 2, AuthenticAMD
/// number of processors : 1
/// operating system : Windows_NT
/// (C) 2008 Sperneder Patrick , Gert H. Burgstaller
/// http://www.psi-labs.at/development/noodles
public static string InvokeThisString(this string stringToInvoke, Form theInvokingForm)
{
if (theInvokingForm.InvokeRequired)
{
theInvokingForm.Invoke(new StringInvoker(InvokeThisString), new Object[] { stringToInvoke, theInvokingForm });
}
return stringToInvoke;
}
/// <summary>
/// Invokes the this integer. Extension-method with params.
/// </summary>
/// <param name="integerToInvoke">The integer to invoke.</param>
/// <param name="theInvokingForm">The invoking form.</param>
/// <returns></returns>
/// Documented at : 20.08.2008 , 10:56
/// done by : Noodles
/// on workstation : UNI-2
/// compiled for processor architecture : x86
/// processor id : x86 Family 15 Model 79 Stepping 2, AuthenticAMD
/// number of processors : 1
/// operating system : Windows_NT
/// (C) 2008 Sperneder Patrick , Gert H. Burgstaller
/// http://www.psi-labs.at/development/noodles
public static int InvokeThisInteger(this int integerToInvoke, Form theInvokingForm)
{
if (theInvokingForm.InvokeRequired)
{
theInvokingForm.Invoke(new IntegerInvoker(InvokeThisInteger), new Object[] { integerToInvoke , theInvokingForm });
}
return integerToInvoke ;
}
/// <summary>
/// Invokes this double. Extension-method with params.
/// </summary>
/// <param name="doubleToInvoke">The double to invoke.</param>
/// <param name="theInvokingForm">The invoking form.</param>
/// <returns></returns>
/// Documented at : 20.08.2008 , 11:00
/// done by : Noodles
/// on workstation : UNI-2
/// compiled for processor architecture : x86
/// processor id : x86 Family 15 Model 79 Stepping 2, AuthenticAMD
/// number of processors : 1
/// operating system : Windows_NT
/// (C) 2008 Sperneder Patrick , Gert H. Burgstaller
/// http://www.psi-labs.at/development/noodles
public static double InvokeThisDouble(this double doubleToInvoke, Form theInvokingForm)
{
if (theInvokingForm.InvokeRequired)
{
theInvokingForm.Invoke(new DoubleInvoker(InvokeThisDouble), new Object[] { doubleToInvoke, theInvokingForm });
}
return doubleToInvoke;
}
}
}
|