- Todo:
- TODO: JN Übersetzung/Review
- Author
- Zoltan Hrabovszki
- Date
- 2014.10.10
OKW.FrameObjectDictionary.FrameObjectDictionary |
( |
| ) |
|
- Author
- Zoltan Hrabovszki
- Date
- 2014.10.10
108 Logger.Instance.LogFunctionStartDebug(
"FrameObjectDictionary.FrameObjectDictionary");
112 Logger.Instance.LogFunctionEndDebug();
object OKW.FrameObjectDictionary.__CreateInstanceByObjectName |
( |
string |
fps_ParentObject, |
|
|
string |
fps_ChildObject |
|
) |
| |
|
private |
Generates an instance of the OKW-Frame-Object.
- Returns
- The instance of OKW-Frame-Object.
- Parameters
-
fps_ParentName | name of parent window. |
fps_ChildName | Name of child object via fps_ParentObject given parent object. |
- Author
- Zoltan Hrabovszki
- Date
- 2014-10-10 FIXME: Prüfen, ob diese Methoden namentlich ok sind. Wird das Eltern Obejkt angelegt?
544 Logger.Instance.LogFunctionStartDebug(
"FrameObjectDictionary.CreateInstanceByObjectName",
"fps_ParentObject", fps_ParentObject,
"fps_ChildObject", fps_ChildObject);
546 object myParentObject = null;
547 object myChildObject = null;
553 myParentObject = this.GetObjectByName(fps_ParentObject);
557 if (myParentObject != null)
560 myChildObject = this.GetChildObjectByName(myParentObject, fps_ChildObject);
565 throw new OKWFrameObjectWindowNotFoundException(
"Frame Objekt des Fensters");
577 Logger.Instance.LogFunctionEndDebug(myChildObject.GetType().FullName);
582 Logger.Instance.LogFunctionEndDebug();
586 return myChildObject;
void OKW.FrameObjectDictionary.AddFrameInstancesToDictionary |
( |
List< Type > |
fpListOfOKWGuiTypes | ) |
|
|
private |
- Parameters
-
fps_ParentClassName | Name of the class |
- Author
- Zoltan Hrabovszki
- Date
- 2015.01.28
344 object lvTypeInstanceAsObject = null;
346 Logger.Instance.LogFunctionStartDebug(
"FrameObjectDictionary.AddFrameInstancesToDictionary");
351 foreach( Type lvOKWGuiClass
in fpListOfOKWGuiTypes )
356 string lvFunktionalname = this.GetFunktionlanameFromObjekt(lvTypeInstanceAsObject);
359 if (!
string.IsNullOrEmpty(lvFunktionalname))
361 string lvsKey = lvFunktionalname;
362 System.Console.WriteLine(
"\n Window Frame: >>" + lvsKey +
"<<" );
363 System.Console.WriteLine(
" Technisches Objekt: >>" + lvTypeInstanceAsObject.GetType().FullName +
"<<" );
365 this.__FrameObjectDictionary.Add(lvFunktionalname, lvTypeInstanceAsObject);
367 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"CreateInstanceByObjectName",
"InstanceWasCreated", lvTypeInstanceAsObject.GetType().FullName));
370 Scanfields(lvOKWGuiClass, lvTypeInstanceAsObject, lvFunktionalname);
376 Logger.Instance.LogFunctionEndDebug();
object CreateInstanceByType(Type fpParentType)
The method generates an instance of the frame class with the name given in 'fps_ParentClassName'.
Definition: FrameObjectDictionary.cs:480
object OKW.FrameObjectDictionary.CreateInstanceByType |
( |
Type |
fpParentType | ) |
|
|
private |
The method generates an instance of the frame class with the name given in 'fps_ParentClassName'.
- Note
- IMPORTANT: the class is forced to be exactly, as specified. Here is no 'frame prefix' added.
- Returns
- Delivers the instance of the class
- Parameters
-
fps_ParentClassName | Name of the class |
- Author
- Zoltan Hrabovszki
- Date
- 2014.10.10
482 object lvo_Obj = null;
485 Logger.Instance.LogFunctionStartDebug(
"FrameObjectDictionary.CreateInstanceByObjectName",
"fpParentClass", fpParentType.FullName);
489 lvo_Obj = Activator.CreateInstance(fpParentType, null);
491 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"CreateInstanceByObjectName",
"InstanceWasCreated", lvo_Obj.GetType().FullName));
494 catch (TargetInvocationException e)
497 throw new OKWFrameObjectWindowNotFoundException(this.LM.
GetMessage(
"CreateInstanceByObjectName",
"InstanceWasCreated", fpParentType.FullName), e);
506 Logger.Instance.LogFunctionEndDebug(lvo_Obj.GetType().FullName);
511 Logger.Instance.LogFunctionEndDebug();
string GetMessage(string MethodName, string TextKey)
Definition: LogMessenger.cs:145
object OKW.FrameObjectDictionary.GetChildObjectByName |
( |
object |
fpo_ParentObject, |
|
|
string |
fps_ChildName |
|
) |
| |
|
private |
Gets a public field value given its name
- Parameters
-
srcObj | object to inspect |
fieldName | Name of the field to retrieve the value from |
- Returns
- property value
- Author
- Zoltan Hrabovszki
- Date
- 2014-10-10
610 object lvo_Return = null;
612 Logger.Instance.LogFunctionStartDebug(
"FrameObjectDictionary.GetChildObjectByName",
"fpo_ParentObject", fpo_ParentObject.ToString(),
"fps_ChildName", fps_ChildName);
616 FieldInfo fieldInfoObj = fpo_ParentObject.GetType().GetField(fps_ChildName);
619 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"GetChildObjectByName",
"M1", fps_ChildName, fpo_ParentObject.GetType().Name));
620 if (fieldInfoObj == null)
623 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"GetChildObjectByName",
"M3"));
624 throw new OKWFrameObjectChildNotFoundException(this.LM.
GetMessage(
"GetChildObjectByName",
"ChildIsNotDefined_Exception", fps_ChildName, fpo_ParentObject.GetType().Name));
629 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"GetChildObjectByName",
"M2"));
632 lvo_Return = fpo_ParentObject.GetType().InvokeMember(
634 BindingFlags.GetField,
642 Logger.Instance.LogFunctionEndDebug();
string GetMessage(string MethodName, string TextKey)
Definition: LogMessenger.cs:145
string OKW.FrameObjectDictionary.GetFunktionlanameFromObjekt |
( |
object |
fpObject | ) |
|
|
private |
List dasAttribute Funktionalname das übergeben Objektes aus.
- Parameters
-
- Returns
- Wert aus Funtionalname
436 string lvsReturn =
"";
438 Attribute[] attrs = System.Attribute.GetCustomAttributes(fpObject.GetType());
441 foreach (System.Attribute attr in attrs)
445 OKWGUIAttribute a = (OKWGUIAttribute)attr;
446 lvsReturn = a.FunctionalName;
Definition: OKWGUIAttribute.cs:56
List<Type> OKW.FrameObjectDictionary.GetListOfOKWGuiClasses |
( |
| ) |
|
- Note
- IMPORTANT: the class is forced to be exactly, as specified. Here is no 'frame prefix' added.
- Returns
- Author
- Zoltan Hrabovszki
- Date
- 2014.10.10
306 string @
namespace = "OKW.Frames";
307 List<Type> lvLsReturn =
new List<Type>();
309 Type[] myTypes = Assembly.GetExecutingAssembly().GetTypes();
311 var q = from t in myTypes
312 where t.IsClass && t.Namespace == @
namespace
Definition: OKWGUIAttribute.cs:56
object OKW.FrameObjectDictionary.GetObjectByName |
( |
string |
fpsFunctionalnameOfWindow | ) |
|
The method delivers the frame object of the given window object.
Here the object can already be instantiated, in this case the reference will be taken from the Dictionary OKW_FrameObjectDictionary.cv_FrameObjectDictionary or the object is not yet instantiated, then an instance is to be laid and a reference to the object is stored.
- See also
- For the child object another markedness ist existing.: FrameObjectDictionary.GetObjectByName(string,string)
- Parameters
-
fps_ParentObject | Fachlicher Name des Fenster Objektes = Elternobjekt |
- Returns
- Todo:
- TODO: ZH Rückgabewert beschreiben
- Author
- Zoltan Hrabovszki
- Date
- 2014.10.10
156 object lvo_Return = null;
158 Logger.Instance.LogFunctionStartDebug(
"FrameObjectDictionary.GetObjectByName",
"fpsFunctionalnameOfWindow", fpsFunctionalnameOfWindow);
162 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"GetObjectByName",
"M1", fpsFunctionalnameOfWindow));
166 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"GetObjectByName",
"M2"));
167 lvo_Return = this.__FrameObjectDictionary[fpsFunctionalnameOfWindow];
173 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"GetObjectByName",
"M3"));
175 throw new OKWFrameObjectWindowNotFoundException(
"Fensterobjekt wurde nicht gefunden: " + fpsFunctionalnameOfWindow );
180 Logger.Instance.LogFunctionEndDebug();
Dictionary< string, object > __FrameObjectDictionary
Definition: FrameObjectDictionary.cs:87
object OKW.FrameObjectDictionary.GetObjectByName |
( |
string |
fps_ParentObject, |
|
|
string |
fps_ChildObject |
|
) |
| |
The method delivers the object of the given Childobjecttest.
- See also
- For the window object another markedness is existing. FrameObjectDictionary.GetObjectByName(string,string)
- Parameters
-
fps_ParentObject | Name des Fenster-Objektes = Elternobjekt. |
fps_ChildObject | Name des Kindobjektes-Objektes. |
- Returns
- Todo:
- TODO: JN Rückgabewert übersetzen/review
- Author
- Zoltan Hrabovszki
- Date
- 2014.10.10
- Todo:
- TODO: Exception/Try/Except/Finaly einbauen
215 object lvo_Return = null;
216 string lvs_ObjectName = fps_ParentObject +
"." + fps_ChildObject;
218 Logger.Instance.LogFunctionStartDebug(
"FrameObjectDictionary.GetObjectByName",
"fps_ParentObject", fps_ParentObject,
"fps_ChildObject", fps_ChildObject);
221 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"GetObjectByName",
"M1", lvs_ObjectName));
226 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"GetObjectByName",
"M2"));
228 lvo_Return = this.__FrameObjectDictionary[lvs_ObjectName];
234 Logger.Instance.LogPrintDebug(this.LM.GetMessage(
"GetObjectByName",
"M3"));
236 throw new OKWFrameObjectWindowNotFoundException(
"FrameObjekt wurde nicht gefunden: >>" + lvs_ObjectName +
"<<" );
239 Logger.Instance.LogFunctionEndDebug();
Dictionary< string, object > __FrameObjectDictionary
Definition: FrameObjectDictionary.cs:87
void OKW.FrameObjectDictionary.Init |
( |
| ) |
|
- Todo:
- TODO: JN Übersetzung/Review
- Author
- Zoltan Hrabovszki
- Date
- 2014.10.10
262 Logger.Instance.LogFunctionStartDebug(
"FrameObjectDictionary.Init");
267 this.LM =
new LogMessenger(
"FrameObjectDictionary");
269 Logger.Instance.LogPrint(this.LM.GetMessage(
"Init",
"InitClear", this.GetType().Name));
270 this.__FrameObjectDictionary.Clear();
274 this.AddFrameInstancesToDictionary(lvOKWGuiClasses );
278 Logger.Instance.LogFunctionEndDebug();
List< Type > GetListOfOKWGuiClasses()
Definition: FrameObjectDictionary.cs:304
Dictionary<string, object> OKW.FrameObjectDictionary.__FrameObjectDictionary = new Dictionary<string, object>() |
- Todo:
- TODO: JN Übersetzung/Review
- Author
- Zoltan Hrabovszki
- Date
- 2014.10.10
- Todo:
- TODO: Bedingte Kompilierung einfügen für "Test" Feld muss Public sein, wenn unittets durchgeführt werden soll.
The documentation for this class was generated from the following file:
- OKW/Develop/FrameObjectDictionary.cs