OpenKeyWord  Build Tag: jenkins-DoxyGen_EN-107, Build ID: 2015-03-08_20-51-06
 All Classes Namespaces Functions Variables Properties Pages
OKW.CurrentObject Class Reference

This class administrates the actual GUI-object. More...

Inheritance diagram for OKW.CurrentObject:
Collaboration diagram for OKW.CurrentObject:

Public Member Functions

void CallMethod (string fpsMethod)
 Returns the Instance for the only Instance of this class.
Remark: More...
 
void CallMethod (string fpsMethod, List< string > fpLsParameter)
 Calls a method of the current object with "late bound function call". More...
 
void CallMethod (string fpsMethod, List< string > fpLsParameter_1, string fpsParameter_2)
 Calls a method of the current object with "late bound function call". More...
 
void CallMethod (string fpsMethod, string fpsParameter_1)
 Calls a method of the current object with "late bound function call". The called method has the signature: More...
 
void CallMethod (string fpsMethod, string fpsParameter_1, string fpsParameter_2)
 Calls a method of the current object with "late bound function call". The called method has the signature: More...
 
void CallMethod (string fpsMethod, string fpsParameter_1, string fpsParameter_2, string fpsParameter_3)
 Calls a method of the current object with "late bound function call". The called method has the signature: More...
 
void CallMethod (string fpsMethod, string fpsParameter_1, string fpsParameter_2, List< string > fpLsValue)
 Calls the method of the current object with "late bound function call". The called method has the signature: More...
 
bool CallMethodReturn_Boolean (string fpsMethod)
 Calls a method of the current object "late bound function call". The called method has the signature: More...
 
bool CallMethodReturn_BooleanPb (string fpsMethod, bool fpbParameter_1)
 Calls a method of the current object with "late bound function call". More...
 
int CallMethodReturn_Int (string fpsMethod)
 Calls a method of the current object with "late bound function call". More...
 
List< string > CallMethodReturn_ListString (string fpsMethod)
 Calls a method of the current object with "late bound function call". More...
 
List< string > CallMethodReturn_ListString (string fpsMethod, string fpsParam1, string fpsParam2)
 Calls a method of the current object "late bound function call". The calles method has the signature: More...
 
List< string > CallMethodReturn_ListString (string fpsMethod, List< string > fpLsParameter_1)
 Calls a method of the current object with "late bound function call". The called method has the signature: More...
 
List< string > CallMethodReturn_ListString (string fpsMethod, string fpsParameter_1, string fpsParameter_2, List< string > fpLsParameter_3)
 Calls a method of the current object with "late bound function call". The called method has the signature: More...
 
string CallMethodReturn_String (string fpsMethod)
 Calls a method of the current object "late bound function call". The called method has the signature: More...
 
string CallMethodReturn_String (string fpsMethod, string fpsParameter_1)
 Calls a method of the current object with "late bound function call". The called method has the signature: More...
 
bool CheckCharacter (string fpsFunctionalname)
 This method checks the professional objectname to "allowed" signs. More...
 
object GetCurrentObject ()
 Gives the reference to the current Frame-Object. Reference is stored in the field cvoObject. More...
 
string GetObjectName ()
 Detecting the ObejctName of the current object. More...
 
void Init ()
 Running the initializing of the class: There are all fields of the class set to a defined initial state. More...
 
void LogObjectData ()
 Method returns all the important information about the current object. This should help in error or exception when debugging by outputting the current data object.
These data will be returned: More...
 
object SetChildName (string fpsChildName)
 Setting the Child Object. More...
 
object SetWindowName (string fpsWindowName)
 Here the context is set to a window. More...
 

Protected Attributes

string cvsChildName = string.Empty
 The feature contains the professional name of the current child object. More...
 
string cvsWindowName = string.Empty
 The feature contains the professional name of the current window.
All GUI child objects are relating to this window given mit "cvsChildName".
 

Private Member Functions

 CurrentObject ()
 Initializes a new instance of the OKW.CurrentObject class. No public constructor: Use the OKW.CurrentObject.Instance to obtain the instance of this class. More...
 
object ResetToWindow ()
 The current object will be set back to the window. Child Object will be deleted. More...
 
void UpdateObject ()
 Method updates two values: More...
 

Private Attributes

object cvoObject = null
 Singelton-Class: Instance contains the Object-Reference of CurrentObject. More...
 
string cvsObjectFunctionalName = string.Empty
 Complete "functional name" of the current object "WindowName.ChildObjectName". More...
 
string cvsObjectName = string.Empty
 Full "technical name" of the current object "WindowsName.ChildObject.Name". More...
 
LogMessenger LM = null
 
Logger Log = Logger.Instance
 
FrameObjectDictionary myFrameObjectDictionary = new FrameObjectDictionary()
 This Dictionary holds all visited/used "Frame Objects". More...
 

Additional Inherited Members

- Static Protected Attributes inherited from OKW.OKWSingeltonBase< T >
static Lazy< T > instance = new Lazy<T>(() => CreateInstanceOfT())
 
- Properties inherited from OKW.OKWSingeltonBase< T >
static T Instance [get]
 Holt die einzige Instanz dieser Klasse. More...
 

Detailed Description

This class administrates the actual GUI-object.

Each technical GUI-object, irrelevant how deep they are nested into each other technically, will be referenced with two informations: WindowName und ChildObjectName

Design-Pattern: Singleton - Highlander-Principle

Author
Zoltan Hrabovszki
Date
2012.11.01

Constructor & Destructor Documentation

OKW.CurrentObject.CurrentObject ( )
private

Initializes a new instance of the OKW.CurrentObject class. No public constructor: Use the OKW.CurrentObject.Instance to obtain the instance of this class.

Author
Zoltan Hrabovszki
Date
2012.12.02
232  {
233  this.LM = new LogMessenger(this.GetType().Name);
234  }

Member Function Documentation

void OKW.CurrentObject.CallMethod ( string  fpsMethod)

Returns the Instance for the only Instance of this class.
Remark:

  • This class is a Singleton.
    • Highlander Principle: There only can be one instance of this class!
    • Use this function to obtain the instance of this class.
    • There is no public constructor for this method!

The instance of CurrentObject.

Author
Zoltan Hrabovszki
Date
2012.11.29

Calls a method of the current object with "late bound function call".

The called method has the signature:

Parameter/Return Type
Parameter none
Return none
Parameters
fpsMethodname of method to be called.
Author
Zoltan Hrabovszki
Date
2014.01.14
309  {
310  this.Log.LogFunctionStartDebug("CallMethod", "string fpsMethod", fpsMethod);
311  try
312  {
313  Type myTypeObject = this.cvoObject.GetType();
314  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
315  BindingFlags.Public | BindingFlags.Instance,
316  null,
317  new Type[] {},
318  null);
319  // Existiert die Methode des Objektes?
320  if (myMethodInfo == null)
321  {
322  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
323  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
324  throw new OKWFrameObjectMethodNotFoundException(errorText);
325  }
326  else
327  {
328  // Ja, Methode via Invoke aufrufen
329  myMethodInfo.Invoke(this.cvoObject, null);
330  }
331  }
332  finally
333  {
334  this.Log.LogFunctionEndDebug();
335  }
336  return;
337  }
void OKW.CurrentObject.CallMethod ( string  fpsMethod,
List< string >  fpLsParameter 
)

Calls a method of the current object with "late bound function call".

The called method has the signature:

Parameter/Return Type
Parameter List< string >
Return none
Parameters
fpsMethodname of method to be called.
fpLsParameter1st parameter as list-string.
Author
Zoltan Hrabovszki
Date
2014.01.14
371  {
372  this.Log.LogFunctionStartDebug("CallMethod", "string fpsMethod", fpsMethod, "List<string> fplsParameter", fpLsParameter.ToString());
373  object[] lvoParameter = new object[1];
374  lvoParameter[0] = fpLsParameter;
375  try
376  {
377  Type myTypeObject = this.cvoObject.GetType();
378  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
379  BindingFlags.Public | BindingFlags.Instance,
380  null,
381  new Type[] { typeof(List<string>) },
382  null);
383  // Existiert die Methode des Objektes?
384  if (myMethodInfo == null)
385  {
386  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
387  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
388  throw new OKWFrameObjectMethodNotFoundException(errorText);
389  }
390  else
391  {
392  // Ja, Methode via Invoke aufrufen
393  myMethodInfo.Invoke(this.cvoObject, lvoParameter);
394  }
395  }
396  finally
397  {
398  this.Log.LogFunctionEndDebug();
399  }
400 
401  return;
402  }
void OKW.CurrentObject.CallMethod ( string  fpsMethod,
List< string >  fpLsParameter_1,
string  fpsParameter_2 
)

Calls a method of the current object with "late bound function call".

The calles object has the signature:

Parameter/Return Type
1st Parameter List< string >
2nd Parameter string
Return none
Parameters
fpsMethodname of method to be called.
fpLsParameter_11st parameter as list-string.
fpsParameter_22nd parameter as list-string.
Author
Zoltan Hrabovszki
Date
2014.01.14
439  {
440  this.Log.LogFunctionStartDebug("CallMethod", "string fpsMethod", fpsMethod, "List<string> fpLsParameter_1", fpLsParameter_1.ToString(), "string fpsParameter_2", fpsParameter_2);
441  object[] lvoParameter = new object[2];
442 
443  lvoParameter[0] = fpLsParameter_1; // Der letzte Parameter ist immer der zu übergebende Wert
444  lvoParameter[1] = fpsParameter_2; // Hier sind Kooerdinaten usw. zu finden
445  try
446  {
447  Type myTypeObject = this.cvoObject.GetType();
448  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
449  BindingFlags.Public | BindingFlags.Instance,
450  null,
451  new Type[] {typeof(List<string>), typeof(string)},
452  null);
453  // Existiert die Methode des Objektes?
454  if (myMethodInfo == null)
455  {
456  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
457  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
458  throw new OKWFrameObjectMethodNotFoundException(errorText);
459  }
460  else
461  {
462  // Ja: Methode via Invoke aufrufen
463  myMethodInfo.Invoke(this.cvoObject, lvoParameter);
464  }
465  }
466  finally
467  {
468  this.Log.LogFunctionEndDebug();
469  }
470 
471  return;
472  }
void OKW.CurrentObject.CallMethod ( string  fpsMethod,
string  fpsParameter_1 
)

Calls a method of the current object with "late bound function call". The called method has the signature:

Parameter/Return Type
1st Parameter string
Return none
Parameters
fpsMethodname of method to be called.
fpsParameter_11st parameter as type-string.
Author
Zoltan Hrabovszki
Date
2012.11.01
504  {
505  this.Log.LogFunctionStartDebug("CallMethod", "string fpsMethod", fpsMethod, "string fps_Parameter_1", fpsParameter_1);
506  object[] lvoParameter = new object[1];
507  lvoParameter[0] = fpsParameter_1; // Hier sind z.B. Kooerdinaten usw. zu finden
508  try
509  {
510  Type myTypeObject = this.cvoObject.GetType();
511  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
512  BindingFlags.Public | BindingFlags.Instance,
513  null,
514  new Type[] { typeof(string) },
515  null);
516  // Existiert die Methode des Objektes?
517  if (myMethodInfo == null)
518  {
519  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
520  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
521  throw new OKWFrameObjectMethodNotFoundException(errorText);
522  }
523  else
524  {
525  // Ja, Methode via Invoke aufrufen
526  myMethodInfo.Invoke(this.cvoObject, lvoParameter);
527  }
528  }
529  finally
530  {
531  this.Log.LogFunctionEndDebug();
532  }
533  return;
534  }
void OKW.CurrentObject.CallMethod ( string  fpsMethod,
string  fpsParameter_1,
string  fpsParameter_2 
)

Calls a method of the current object with "late bound function call". The called method has the signature:

Parameter/Return Type
1st Parameter string
2nd Parameter string
Return none
Parameters
fpsMethodname of method to be called.
fpsParameter_11st parameter as type-string.
fpsParameter_22nd parameter as type-string.
Author
Zoltan Hrabovszki
Date
2012.11.01
571  {
572  this.Log.LogFunctionStartDebug("CallMethod", "string fpsMethod", fpsMethod, "string fps_Parameter_1", fpsParameter_1, "string fps_Parameter_2", fpsParameter_2);
573  object[] lvoParameter = new object[2];
574  lvoParameter[0] = fpsParameter_1; // Hier sind z.B. Kooerdinaten usw. zu finden
575  lvoParameter[1] = fpsParameter_2; // Auch hier sind Kooerdinaten usw. zu finden
576  try
577  {
578  Type myTypeObject = this.cvoObject.GetType();
579  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
580  BindingFlags.Public | BindingFlags.Instance,
581  null,
582  new Type[] { typeof(string), typeof(string) },
583  null);
584  // Existiert die Methode des Objektes?
585  if (myMethodInfo == null)
586  {
587  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
588  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
589  throw new OKWFrameObjectMethodNotFoundException(errorText);
590  }
591  else
592  {
593  // Ja, Methode via Invoke aufrufen
594  myMethodInfo.Invoke(this.cvoObject, lvoParameter);
595  }
596  }
597  finally
598  {
599  this.Log.LogFunctionEndDebug();
600  }
601  return;
602  }
void OKW.CurrentObject.CallMethod ( string  fpsMethod,
string  fpsParameter_1,
string  fpsParameter_2,
string  fpsParameter_3 
)

Calls a method of the current object with "late bound function call". The called method has the signature:

Parameter/Return Type
1st Parameter string
2nd Parameter string
3rd Parameter string
Return none
Parameters
fpsMethodname of method to be called.
fpsParameter_11st paramarameter as type-string.
fpsParameter_22nd parameter as type-string.
fpsParameter_33rd parameter as type-string.
Author
Zoltan Hrabovszki
Date
2012.11.01
642  {
643  this.Log.LogFunctionStartDebug("CallMethod",
644  "string fpsMethod", fpsMethod,
645  "string fpsParameter_1", fpsParameter_1,
646  "string fpsParameter_2", fpsParameter_2,
647  "string fpsParameter_3", fpsParameter_3);
648  object[] lvoParameter = new object[3];
649  lvoParameter[0] = fpsParameter_1;
650  lvoParameter[1] = fpsParameter_2;
651  lvoParameter[2] = fpsParameter_3;
652  try
653  {
654  Type myTypeObject = this.cvoObject.GetType();
655  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
656  BindingFlags.Public | BindingFlags.Instance,
657  null,
658  new Type[] {typeof(string), typeof(string), typeof(string)},
659  null);
660  // Existiert die Methode des Objektes?
661  if (myMethodInfo == null)
662  {
663  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
664  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
665  throw new OKWFrameObjectMethodNotFoundException(errorText);
666  }
667  else
668  {
669  // Ja, Methode via Invoke aufrufen
670  myMethodInfo.Invoke(this.cvoObject, lvoParameter);
671  }
672  }
673  finally
674  {
675  this.Log.LogFunctionEndDebug();
676  }
677  return;
678  }
void OKW.CurrentObject.CallMethod ( string  fpsMethod,
string  fpsParameter_1,
string  fpsParameter_2,
List< string >  fpLsValue 
)

Calls the method of the current object with "late bound function call". The called method has the signature:

Parameter/Return Type
1st Parameter string
2nd Parameter string
3rd Parameter List<string>
Return none
Parameters
fpsMethodname of the method to be called.
fpsParameter_11st parameter as type-string.
fpsParameter_22nd parameter as type-string.
fpLsValue3rd parameter as type-List<string>.
Author
Zoltan Hrabovszki
Date
2012.11.01
718  {
719  this.Log.LogFunctionStartDebug("CallMethod",
720  "string fpsMethod", fpsMethod,
721  "string fpsParameter_1", fpsParameter_1,
722  "string fpsParameter_2", fpsParameter_2,
723  "string fpsLValue", "fpLsValue.ToString");
724  object[] lvoParameter = new object[3];
725  lvoParameter[0] = fpsParameter_1;
726  lvoParameter[1] = fpsParameter_2;
727  lvoParameter[2] = fpLsValue;
728  try
729  {
730  Type myTypeObject = this.cvoObject.GetType();
731  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
732  BindingFlags.Public | BindingFlags.Instance,
733  null,
734  new Type[] {typeof(string), typeof(string), typeof(List<string>)},
735  null);
736  // Existiert die Methode des Objektes?
737  if (myMethodInfo == null)
738  {
739  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
740  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
741  throw new OKWFrameObjectMethodNotFoundException(errorText);
742  }
743  else
744  {
745  // Ja, Methode via Invoke aufrufen
746  myMethodInfo.Invoke(this.cvoObject, lvoParameter);
747  }
748  }
749  finally
750  {
751  this.Log.LogFunctionEndDebug();
752  }
753  return;
754  }
bool OKW.CurrentObject.CallMethodReturn_Boolean ( string  fpsMethod)

Calls a method of the current object "late bound function call". The called method has the signature:

Parameter/Return Type
Parameter keine
Return bool
Parameters
fpsMethodName of the method to be called.
Returns
Result is a bool type.
Author
Zoltan Hrabovszki
Date
2012.11.01
786  {
787  bool lvbReturn = false;
788  this.Log.LogFunctionStartDebug("CallMethodWithReturn",
789  "string fpsMethod", fpsMethod);
790  try
791  {
792  Type myTypeObject = this.cvoObject.GetType();
793  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
794  BindingFlags.Public | BindingFlags.Instance,
795  null,
796  new Type[] { },
797  null);
798  // Existiert die Methode des Objektes?
799  if (myMethodInfo == null)
800  {
801  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
802  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
803  throw new OKWFrameObjectMethodNotFoundException(errorText);
804  }
805  else
806  {
807  // Ja, Methode via Invoke aufrufen
808  lvbReturn = (bool)myMethodInfo.Invoke(this.cvoObject, null);
809  }
810  }
811  finally
812  {
813  this.Log.LogFunctionEndDebug(lvbReturn);
814  }
815  return lvbReturn;
816  }
bool OKW.CurrentObject.CallMethodReturn_BooleanPb ( string  fpsMethod,
bool  fpbParameter_1 
)

Calls a method of the current object with "late bound function call".

The called method has the signature:

Parameter/Return Type
1st Parameter string
2nd Parameter bool
Return bool
Parameters
fpsMethodName of the method to be called.
fpbParameter_12nd parameter as a bool type.
Returns
Return is a bool type.
Author
Zoltan Hrabovszki
Date
2012.11.01
854  {
855  bool lvbReturn = false;
856  object[] lvoParameter = new object[1];
857  lvoParameter[0] = fpbParameter_1;
858  this.Log.LogFunctionStartDebug("CallMethodReturn_BooleanPb",
859  "string fpsMethod", fpsMethod,
860  "bool fpsParameter_1", fpbParameter_1.ToString());
861  try
862  {
863  Type myTypeObject = this.cvoObject.GetType();
864  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
865  BindingFlags.Public | BindingFlags.Instance,
866  null,
867  new Type[] {typeof(bool)},
868  null);
869  // Existiert die Methode des Objektes?
870  if (myMethodInfo == null)
871  {
872  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
873  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
874  throw new OKWFrameObjectMethodNotFoundException(errorText);
875  }
876  else
877  {
878  // Ja, Methode via Invoke aufrufen
879  lvbReturn = (bool)myMethodInfo.Invoke(this.cvoObject, lvoParameter);
880  }
881  }
882  finally
883  {
884  this.Log.LogFunctionEndDebug(lvbReturn);
885  }
886  return lvbReturn;
887  }
int OKW.CurrentObject.CallMethodReturn_Int ( string  fpsMethod)

Calls a method of the current object with "late bound function call".

The called method has the signature:

Parameter/Return Type
Parameter none
Return int
Parameters
fpsMethodName of the method to be called.
Returns
Return is an int type.
Author
Zoltan Hrabovszki
Date
2012.11.01
921  {
922  int lviReturn = 0;
923  bool bOK = false;
924  this.Log.LogFunctionStartDebug("CallMethodReturn_Int",
925  "string fpsMethod", fpsMethod);
926  try
927  {
928  Type myTypeObject = this.cvoObject.GetType();
929  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
930  BindingFlags.Public | BindingFlags.Instance,
931  null,
932  new Type[] { },
933  null);
934  // Existiert die Methode des Objektes?
935  if (myMethodInfo == null)
936  {
937  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
938  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
939  throw new OKWFrameObjectMethodNotFoundException(errorText);
940  }
941  else
942  {
943  // Ja, Methode via Invoke aufrufen
944  lviReturn = (int)myMethodInfo.Invoke(this.cvoObject, null);
945  }
946  bOK = true;
947  }
948  finally
949  {
950  if (bOK)
951  {
952  this.Log.LogFunctionEndDebug(lviReturn.ToString());
953  }
954  else
955  {
956  this.Log.LogFunctionEndDebug();
957  }
958  }
959  return lviReturn;
960  }
List<string> OKW.CurrentObject.CallMethodReturn_ListString ( string  fpsMethod)

Calls a method of the current object with "late bound function call".

The called object has the signature:

Parameter/Return Type
Parameter none
Return List<string>
Parameters
fpsMethodName of the method to be called.
Returns
Return is of the type List<string>
Author
Zoltan Hrabovszki
Date
2012.11.01
994  {
995  List<string> lvLsReturn = new List<string>();
996  bool bOK = false;
997  this.Log.LogFunctionStartDebug("CallMethodReturn_ListString",
998  "string fpsMethod", fpsMethod);
999  try
1000  {
1001  Type myTypeObject = this.cvoObject.GetType();
1002  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
1003  BindingFlags.Public | BindingFlags.Instance,
1004  null,
1005  new Type[] { },
1006  null);
1007  // Existiert die Methode des Objektes?
1008  if (myMethodInfo == null)
1009  {
1010  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
1011  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
1012  throw new OKW.OKWFrameObjectMethodNotFoundException(errorText);
1013  }
1014  else
1015  {
1016  // Ja, Methode via Invoke aufrufen
1017  lvLsReturn = (List<string>)myMethodInfo.Invoke(this.cvoObject, null);
1018  }
1019  bOK = true;
1020  }
1021  finally
1022  {
1023  if (bOK)
1024  {
1025  this.Log.LogFunctionEndDebug(lvLsReturn);
1026  }
1027  else
1028  {
1029  this.Log.LogFunctionEndDebug();
1030  }
1031  }
1032  return lvLsReturn;
1033  }
The exeption.
Definition: OKWFrameObjectMethodNotFoundException.cs:76
List<string> OKW.CurrentObject.CallMethodReturn_ListString ( string  fpsMethod,
string  fpsParam1,
string  fpsParam2 
)

Calls a method of the current object "late bound function call". The calles method has the signature:

Parameter/Return Type
1st Parameter string
2nd Parameter string
Return List<string>
Parameters
fpsMethodName of the method to be called
fpsParam11st paramarameter as type-string.
fpsParam22nd parameter as type-string.
Returns
List<string> .
Author
Zoltan Hrabovszki
Date
2012.11.01
1073  {
1074  List<string> lvLsReturn = new List<string>();
1075  object[] lvoParameter = new object[2];
1076  bool bOK = false;
1077  lvoParameter[0] = fpsParam1;
1078  lvoParameter[1] = fpsParam2;
1079  this.Log.LogFunctionStartDebug("CallMethodReturn_ListString",
1080  "string fpsMethod", fpsMethod,
1081  "string fpsParam1", fpsParam1,
1082  "string fpsParam2", fpsParam2);
1083  try
1084  {
1085  Type myTypeObject = this.cvoObject.GetType();
1086  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
1087  BindingFlags.Public | BindingFlags.Instance,
1088  null,
1089  new Type[] {typeof(string), typeof(string)},
1090  null);
1091  // Existiert die Methode des Objektes?
1092  if (myMethodInfo == null)
1093  {
1094  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
1095  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
1096  throw new OKW.OKWFrameObjectMethodNotFoundException(errorText);
1097  }
1098  else
1099  {
1100  // Ja, Methode via Invoke aufrufen
1101  lvLsReturn = (List<string>)myMethodInfo.Invoke(this.cvoObject, lvoParameter);
1102  }
1103  bOK = true;
1104  }
1105  finally
1106  {
1107  if (bOK)
1108  {
1109  this.Log.LogFunctionEndDebug(lvLsReturn);
1110  }
1111  else
1112  {
1113  this.Log.LogFunctionEndDebug();
1114  }
1115  }
1116  return lvLsReturn;
1117  }
The exeption.
Definition: OKWFrameObjectMethodNotFoundException.cs:76
List<string> OKW.CurrentObject.CallMethodReturn_ListString ( string  fpsMethod,
List< string >  fpLsParameter_1 
)

Calls a method of the current object with "late bound function call". The called method has the signature:

Parameter/Return Type
1st Parameter List<string>
Return List<string>
Parameters
fpsMethodName of the method to be called
fpLsParameter_11st parameter as list<string>.
Returns
List<string> .
Author
Zoltan Hrabovszki
Date
2012.11.01
1153  {
1154  List<string> lvLsReturn = new List<string>();
1155  object[] lvoParameter = new object[1];
1156  bool bOK = false;
1157  lvoParameter[0] = fpLsParameter_1;
1158  this.Log.LogFunctionStartDebug("CallMethodWithReturn",
1159  "string fpsMethod", fpsMethod,
1160  "List<string> fpLsParameter_1", fpLsParameter_1.ToString());
1161  try
1162  {
1163  Type myTypeObject = this.cvoObject.GetType();
1164  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
1165  BindingFlags.Public | BindingFlags.Instance,
1166  null,
1167  new Type[] {typeof(List<string>)},
1168  null);
1169  // Existiert die Methode des Objektes?
1170  if (myMethodInfo == null)
1171  {
1172  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
1173  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
1174  throw new OKWFrameObjectMethodNotFoundException(errorText);
1175  }
1176  else
1177  {
1178  // Ja, Methode via Invoke aufrufen
1179  lvLsReturn = (List<string>)myMethodInfo.Invoke(this.cvoObject, lvoParameter);
1180  }
1181  bOK = true;
1182  }
1183  finally
1184  {
1185  if (bOK)
1186  {
1187  this.Log.LogFunctionEndDebug(lvLsReturn);
1188  }
1189  else
1190  {
1191  this.Log.LogFunctionEndDebug();
1192  }
1193  }
1194  return lvLsReturn;
1195  }
List<string> OKW.CurrentObject.CallMethodReturn_ListString ( string  fpsMethod,
string  fpsParameter_1,
string  fpsParameter_2,
List< string >  fpLsParameter_3 
)

Calls a method of the current object with "late bound function call". The called method has the signature:

Parameter/Return Type
1st Parameter string
2nd Parameter string
3rd Parameter List<string>
Return List<string>
Parameters
fpsMethodName of the method to be called
fpsParameter_11st parameter as string.
fpsParameter_22nd parameter as string.
fpLsParameter_33rd parameter as list<string>.
Returns
List<string> .
Author
Zoltan Hrabovszki
Date
2012.11.01
1239  {
1240  List<string> lvLsReturn = new List<string>();
1241  object[] lvoParameter = new object[3];
1242  bool bOK = false;
1243  lvoParameter[0] = fpsParameter_1;
1244  lvoParameter[1] = fpsParameter_2;
1245  lvoParameter[2] = fpLsParameter_3;
1246  this.Log.LogFunctionStartDebug("CallMethodReturn_ListString",
1247  "string fpsMethod", fpsMethod,
1248  "string fpsParam1", fpsParameter_1,
1249  "string fpsParameter_2", fpsParameter_2,
1250  "List<string> fpLsParameter_3", fpLsParameter_3.ToString());
1251  try
1252  {
1253  Type myTypeObject = this.cvoObject.GetType();
1254  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod);
1255  // Existiert die Methode des Objektes?
1256  if (myMethodInfo == null)
1257  {
1258  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
1259  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
1260  throw new OKWFrameObjectMethodNotFoundException(errorText);
1261  }
1262  else
1263  {
1264  // Ja, Methode via Invoke aufrufen
1265  lvLsReturn = (List<string>)myMethodInfo.Invoke(this.cvoObject, lvoParameter);
1266  }
1267  bOK = true;
1268  }
1269  finally
1270  {
1271  if (bOK)
1272  {
1273  this.Log.LogFunctionEndDebug(lvLsReturn);
1274  }
1275  else
1276  {
1277  this.Log.LogFunctionEndDebug();
1278  }
1279  }
1280  return lvLsReturn;
1281  }
string OKW.CurrentObject.CallMethodReturn_String ( string  fpsMethod)

Calls a method of the current object "late bound function call". The called method has the signature:

Parameter/Return Type
Parameter none
Return string
Parameters
fpsMethodName of the method to be called.
Returns
string.
Author
Zoltan Hrabovszki
Date
2012.11.01
1315  {
1316  string lvsReturn = string.Empty;
1317  bool bOK = false;
1318  this.Log.LogFunctionStartDebug("CallMethodWithReturn",
1319  "string fpsMethod", fpsMethod);
1320  try
1321  {
1322  Type myTypeObject = this.cvoObject.GetType();
1323  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
1324  BindingFlags.Public | BindingFlags.Instance,
1325  null,
1326  new Type[] {},
1327  null);
1328  // Existiert die Methode des Objektes?
1329  if (myMethodInfo == null)
1330  {
1331  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
1332  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
1333  throw new OKWFrameObjectMethodNotFoundException(errorText);
1334  }
1335  else
1336  {
1337  // Ja, Methode via Invoke aufrufen
1338  lvsReturn = (string)myMethodInfo.Invoke(this.cvoObject, null);
1339  }
1340  bOK = true;
1341  }
1342  finally
1343  {
1344  if (bOK)
1345  {
1346  this.Log.LogFunctionEndDebug(lvsReturn);
1347  }
1348  else
1349  {
1350  this.Log.LogFunctionEndDebug();
1351  }
1352  }
1353  return lvsReturn;
1354  }
string OKW.CurrentObject.CallMethodReturn_String ( string  fpsMethod,
string  fpsParameter_1 
)

Calls a method of the current object with "late bound function call". The called method has the signature:

Parameter/Return Type
1st Parameter string
Return string
Parameters
fpsMethodName of the method to be called.
fpsParameter_11st parameter as string.
Returns
string.
Author
Zoltan Hrabovszki
Date
2013.05.17
1390  {
1391  string lvsReturn = string.Empty;
1392  object[] lvoParameter = new object[1];
1393  bool bOK = false;
1394  lvoParameter[0] = fpsParameter_1;
1395  this.Log.LogFunctionStartDebug("CallMethodWithReturn",
1396  "string fpsMethod", fpsMethod,
1397  "string fpsParameter_1", fpsParameter_1);
1398  try
1399  {
1400  Type myTypeObject = this.cvoObject.GetType();
1401  MethodInfo myMethodInfo = myTypeObject.GetMethod(fpsMethod,
1402  BindingFlags.Public | BindingFlags.Instance,
1403  null,
1404  new Type[] {typeof(string)},
1405  null);
1406  // Existiert die Methode des Objektes?
1407  if (myMethodInfo == null)
1408  {
1409  // Nein: -> Mit einem OKWFrameObjectMethodNotFoundException aussteigen...
1410  string errorText = this.LM.GetMessage("CallMethod", "MethodNotDefined", fpsMethod);
1411  throw new OKWFrameObjectMethodNotFoundException(errorText);
1412  }
1413  else
1414  {
1415  // Ja, Methode via Invoke aufrufen
1416  lvsReturn = (string)myMethodInfo.Invoke(this.cvoObject, lvoParameter);
1417  }
1418  bOK = true;
1419  }
1420  finally
1421  {
1422  if (bOK)
1423  {
1424  this.Log.LogFunctionEndDebug(lvsReturn);
1425  }
1426  else
1427  {
1428  this.Log.LogFunctionEndDebug();
1429  }
1430  }
1431  return lvsReturn;
1432  }
bool OKW.CurrentObject.CheckCharacter ( string  fpsFunctionalname)

This method checks the professional objectname to "allowed" signs.

Parameters
fpsFunctionalnameFunctional name to be checked (string).
Returns
true, if the professional name contains no "forbidden" sign, otherwise false
Author
Zoltan Hrabovszki
Date
2012.11.01
1452  {
1453  // Variable
1454  bool lvb_Return = false;
1455  bool bOK = false;
1456  this.Log.LogFunctionStartDebug("CurrentObject.GetObjectName");
1457  // Initialisierung
1458  try
1459  {
1460  // Define a regular expression OKW_Object Name.
1461  // FIXME: Regulärenausdruck für Fachlich-funktionalen-Namen anpassen
1462  Regex rx = new Regex(@"^\w+");
1463  // Check each test string against the regular expression.
1464  if (rx.IsMatch(fpsFunctionalname))
1465  {
1466  lvb_Return = true;
1467  }
1468  else
1469  {
1470  // FrameObjekt-Name enthält nicht erlaubte Zeichen, daher Exception auslösen.
1471  string errorText = this.LM.GetMessage("CheckCharacter", "OKWFrameObjectIllegalNameCharacterException", fpsFunctionalname);
1472  throw new OKWFrameObjectIllegalNameCharacterException(errorText);
1473  }
1474  bOK = true;
1475  }
1476  finally
1477  {
1478  if (bOK)
1479  {
1480  this.Log.LogFunctionEndDebug(lvb_Return);
1481  }
1482  else
1483  {
1484  this.Log.LogFunctionEndDebug();
1485  }
1486  }
1487  return lvb_Return;
1488  }
object OKW.CurrentObject.GetCurrentObject ( )

Gives the reference to the current Frame-Object. Reference is stored in the field cvoObject.

Returns
Reference to the current GUI-Object.
Author
Zoltan Hrabovszki
Date
2012.11.01
1506  {
1507  object lvoReturn = new object();
1508  bool bOK = false;
1509  this.Log.LogFunctionStartDebug("CurrentObject.GetCurrentObject");
1510  try
1511  {
1512  lvoReturn = this.cvoObject;
1513  bOK = true;
1514  }
1515  catch
1516  {
1517  if (bOK)
1518  {
1519  this.Log.LogFunctionEndDebug(this.cvoObject.GetType().FullName);
1520  }
1521  else
1522  {
1523  this.Log.LogFunctionEndDebug();
1524  }
1525  }
1526  return this.cvoObject;
1527  }
string OKW.CurrentObject.GetObjectName ( )

Detecting the ObejctName of the current object.

Returns
Gives the ObjectName in the form "WindowName.ChildName" or "WindowName".
Author
Zoltan Hrabovszki
Date
2012.11.01
1545  {
1546  string lvsReturn = string.Empty;;
1547  bool bOK = false;
1548  this.Log.LogFunctionStartDebug("CurrentObject.GetObjectName");
1549  try
1550  {
1551  lvsReturn = this.cvsObjectName;
1552  bOK = true;
1553  }
1554  catch
1555  {
1556  if (bOK)
1557  {
1558  this.Log.LogFunctionEndDebug(lvsReturn);
1559  }
1560  else
1561  {
1562  this.Log.LogFunctionEndDebug();
1563  }
1564  }
1565  return lvsReturn;
1566  }
void OKW.CurrentObject.Init ( )

Running the initializing of the class: There are all fields of the class set to a defined initial state.

Author
Zoltan Hrabovszki
Date
2012.12.15
1584  {
1585  Logger.Instance.LogFunctionStartDebug("CurrentObject.Init");
1586  try
1587  {
1588  this.LM = new LogMessenger(this.GetType().Name);
1589  this.cvoObject = null;
1590  this.cvsChildName = string.Empty;
1591  this.cvsWindowName = string.Empty;
1592  this.cvsObjectName = string.Empty;
1593  this.myFrameObjectDictionary = null;
1594  this.myFrameObjectDictionary = new FrameObjectDictionary();
1595  }
1596  finally
1597  {
1598  Logger.Instance.LogFunctionEndDebug();
1599  }
1600  return;
1601  }
void OKW.CurrentObject.LogObjectData ( )

Method returns all the important information about the current object. This should help in error or exception when debugging by outputting the current data object.
These data will be returned:

  • Window Name: cvsWindowName
  • Name of Child: cvsChildName
  • Class of Object: this.cvoObject.GetType().Name
  • Fullname of Object: cvsObjectName
Note
Method is called during exception handling.
Author
Zoltan Hrabovszki
Date
2012.11.01
1632  {
1633  Logger.Instance.LogFunctionStartDebug("CurrentObject.LogObjectData");
1634  try
1635  {
1636  Logger.Instance.ResOpenList("Object Data:");
1637  Logger.Instance.LogPrint(this.LM.GetMessage("LogObjectData", "WindowName", this.cvsWindowName));
1638  Logger.Instance.LogPrint(this.LM.GetMessage("LogObjectData", "ChildWindowName", this.cvsChildName));
1639  Logger.Instance.LogPrint(this.LM.GetMessage("LogObjectData", "Class of Object", this.cvoObject.GetType().Name));
1640  Logger.Instance.LogPrint(this.LM.GetMessage("LogObjectData", "FullNameOfObject", this.cvsObjectName));
1641  }
1642  catch (SystemException e)
1643  {
1644  Logger.Instance.LogPrint(e.Message);
1645  }
1646  finally
1647  {
1648  Logger.Instance.ResCloseList();
1649  }
1650  Logger.Instance.LogFunctionEndDebug();
1651  }
object OKW.CurrentObject.ResetToWindow ( )
private

The current object will be set back to the window. Child Object will be deleted.

Returns
Returns the object reference of the window.
Author
Zoltan Hrabovszki
Date
2012.11.01
1777  {
1778  bool bOK = false;
1779  this.Log.LogFunctionStartDebug("CurrentObject.ResetToWindow");
1780  this.Log.LogPrintDebug(this.LM.GetMessage("ResetToWindow", "ResetToWindowDebug"));
1781  try
1782  {
1783  this.cvsChildName = string.Empty;
1784  this.UpdateObject();
1785  bOK = true;
1786  }
1787  finally
1788  {
1789  if (bOK)
1790  {
1791  this.Log.LogFunctionEndDebug(this.cvoObject.GetType().FullName);
1792  }
1793  else
1794  {
1795  this.Log.LogFunctionEndDebug();
1796  }
1797  }
1798  return this.cvoObject;
1799  }
object OKW.CurrentObject.SetChildName ( string  fpsChildName)

Setting the Child Object.

Returns
Returns the object reference to the current object this.cvoObject with the return.
Parameters
fpsChildNameProfessional name of the Child Object
Note
Notice! The Windows Object must be set!
If not, a OKW.OKW_Kernel_Exception Exception will be triggered.
Author
Zoltan Hrabovszki
Date
2012.11.01
1679  {
1680  bool bOK = false;
1681  this.Log.LogFunctionStartDebug("CurrentObject.SetChildName", "string fpsChildName", fpsChildName);
1682  this.Log.LogPrintDebug(this.LM.GetMessage("SetChildName", "GivenWindownameDebug"));
1683  try
1684  {
1685  if (this.cvsWindowName != string.Empty)
1686  {
1687  this.Log.LogPrintDebug(this.LM.GetMessage("SetChildName", "SetChildwindowNameDebug", this.cvsWindowName, this.cvsChildName));
1688  this.cvsChildName = fpsChildName;
1689  this.UpdateObject();
1690  bOK = true;
1691  }
1692  else
1693  {
1694  // Fenster Objekt wurde nicht gesetzt, Exception auslösen...
1695  string ErrorText = this.LM.GetMessage("SetChildName", "OKWFrameObjectWindowNotSetException");
1696  throw new OKWFrameObjectWindowNotSetException(ErrorText);
1697  }
1698  }
1699  finally
1700  {
1701  if (bOK)
1702  {
1703  this.Log.LogFunctionEndDebug(this.cvoObject.GetType().FullName);
1704  }
1705  else
1706  {
1707  this.Log.LogFunctionEndDebug();
1708  }
1709  }
1710  return this.cvoObject;
1711  }
string cvsWindowName
The feature contains the professional name of the current window. All GUI child objects are relating...
Definition: CurrentObject.cs:105
object OKW.CurrentObject.SetWindowName ( string  fpsWindowName)

Here the context is set to a window.

  • The identifier of the last child object is deleted.
  • Frame class with "fpsWindowName" will be instantiate optionally or from the
Parameters
fpsWindowNameName of the window, which contains the context.
Returns
Returns the object reference back to the her set window.
Author
Zoltan Hrabovszki
Date
2012.11.01
1735  {
1736  object lvoReturn = new object();
1737  bool bOK = false;
1738  this.Log.LogFunctionStartDebug("CurrentObject.SetWindowName", "string fpsWindowName", fpsWindowName);
1739  try
1740  {
1741  this.cvsWindowName = fpsWindowName;
1742  this.cvsChildName = string.Empty;
1743  this.UpdateObject();
1744  lvoReturn = this.cvoObject;
1745  bOK = true;
1746  }
1747  finally
1748  {
1749  if (bOK)
1750  {
1751  this.Log.LogFunctionEndDebug(lvoReturn.ToString());
1752  }
1753  else
1754  {
1755  this.Log.LogFunctionEndDebug();
1756  }
1757  }
1758  return lvoReturn;
1759  }
void OKW.CurrentObject.UpdateObject ( )
private

Method updates two values:

Note
This method is called by OKW.CurrentObject.SetWindowName and OKW.CurrentObject.SetChildName. This method takes care, that the values given in SetWindowName and SetChildName will be instantiated in the corresponding frame object.
Author
Zoltan Hrabovszki
Date
2012.11.01
1824  {
1825  this.Log.LogFunctionStartDebug("CurrentObject.UpdateObject");
1826  try
1827  {
1828  if (this.cvsChildName == string.Empty)
1829  {
1830  // < 2. Get the Window-Object...
1831  this.cvoObject = this.myFrameObjectDictionary.GetObjectByName(this.cvsWindowName);
1832  // "frm_" + this.cvsWindowName; //< 1. Set the cvsObjectName for a window-object.
1833  this.cvsObjectName = this.cvoObject.GetType().Name;
1834  }
1835  else
1836  {
1837  // < 1. Set the cvsObjectName for a child-object.
1838  this.cvsObjectName = this.cvsWindowName + "." + this.cvsChildName;
1839  // < 2. Now get the Window-Object...
1840  this.cvoObject = this.myFrameObjectDictionary.GetObjectByName(this.cvsWindowName, this.cvsChildName);
1841  }
1842  }
1843  finally
1844  {
1845  this.Log.LogFunctionEndDebug();
1846  }
1847  return;
1848  }
string cvsChildName
The feature contains the professional name of the current child object.
Definition: CurrentObject.cs:92

Member Data Documentation

object OKW.CurrentObject.cvoObject = null
private

Singelton-Class: Instance contains the Object-Reference of CurrentObject.

The field cvoObject contains the reference of the current object in OKW_FrameObjectDictionary "myFrameObjectDictionary".

string OKW.CurrentObject.cvsChildName = string.Empty
protected

The feature contains the professional name of the current child object.

All GUI child objects are relating to this ChildObject, given under 'sNameChildObject'.

string OKW.CurrentObject.cvsObjectFunctionalName = string.Empty
private

Complete "functional name" of the current object "WindowName.ChildObjectName".

  • "Login" is a WindowObject
  • "Login.User" as reference to the child object "User" of the window "Login"
string OKW.CurrentObject.cvsObjectName = string.Empty
private

Full "technical name" of the current object "WindowsName.ChildObject.Name".

  • "frm_Login" is a WindowObject.
  • "frm_Login.User" as reference to the child object "User" of the professional window "Login"
LogMessenger OKW.CurrentObject.LM = null
private
Todo:
TODO: für JN review
Logger OKW.CurrentObject.Log = Logger.Instance
private
Todo:
TODO: für JN review
FrameObjectDictionary OKW.CurrentObject.myFrameObjectDictionary = new FrameObjectDictionary()
private

This Dictionary holds all visited/used "Frame Objects".

Important: The Frame-Class Must be included with "using" Works in an automatized call: The right class is given after input of the frame object Function contains the reference to the current window or child object


The documentation for this class was generated from the following file: