//──────────────────────────────────────── public override void Translate_Step2( ConfigurationtreeToFunction_Item parentProcesser, Configurationtree_Node action_Conf, Expression_Node_Function parent_Expr_Func,//todo:何これ? MemoryApplication owner_MemoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports ) { Expression_Node_String ec_ArgListboxName; parent_Expr_Func.TrySelectAttribute(out ec_ArgListboxName, Expression_Node_Function20Impl.PM_NAME_CONTROL_LISTBOX, EnumHitcount.One_Or_Zero, log_Reports); if ("" == ec_ArgListboxName.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports)) { // 引数 listboxFcName が指定されていない場合は、その記述が書かれているコントロールの名前を入れる。 Configuration_Node cf_Event = action_Conf.GetParentByNodename( NamesNode.S_EVENT, EnumConfiguration.Unknown, true, log_Reports); if (log_Reports.Successful) { Configuration_Node parent_Configurationtree_Control = cf_Event.GetParentByNodename( NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports); string sName_Usercontrol; ((Configurationtree_Node)parent_Configurationtree_Control).Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Usercontrol, true, log_Reports); ec_ArgListboxName.AppendTextNode(sName_Usercontrol, action_Conf, log_Reports); } } }
//──────────────────────────────────────── #endregion #region アクション //──────────────────────────────────────── public override void Translate_Step2( ConfigurationtreeToFunction_Item parentProcesser, Configurationtree_Node action_Conf, Expression_Node_Function parent_Expr_Func,//todo:何これ? MemoryApplication owner_MemoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports ) { Expression_Node_String ec_ArgListboxName; parent_Expr_Func.TrySelectAttribute(out ec_ArgListboxName, Expression_Node_Function20Impl.PM_NAME_CONTROL_LISTBOX, EnumHitcount.One_Or_Zero, log_Reports); if ("" == ec_ArgListboxName.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports)) { // 引数 listboxFcName が指定されていない場合は、その記述が書かれているコントロールの名前を入れる。 Configuration_Node cf_Event = action_Conf.GetParentByNodename( NamesNode.S_EVENT, EnumConfiguration.Unknown, true, log_Reports); if (log_Reports.Successful) { Configuration_Node parent_Configurationtree_Control = cf_Event.GetParentByNodename( NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports); string sName_Usercontrol; ((Configurationtree_Node)parent_Configurationtree_Control).Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Usercontrol, true, log_Reports); ec_ArgListboxName.AppendTextNode(sName_Usercontrol, action_Conf, log_Reports); } } }
//──────────────────────────────────────── protected override void LinkToParent( Configurationtree_Node cur_Cf, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "LinkToParent", log_Reports); Usercontrol uct = null; if (log_Reports.Successful) { Configuration_Node cf_Control = cur_Cf.GetParentByNodename( NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports); if (log_Reports.Successful) { uct = Utility_XmlToConfigurationtree_NodeImpl.GetUsercontrol( (Configurationtree_Node)cf_Control, memoryApplication, log_Reports); } } uct.ControlCommon.Configurationtree_Control.List_Child.Add(cur_Cf, log_Reports); goto gt_EndMethod; // #region 異常系 //──────────────────────────────────────── gt_Error_UndefinedClass: if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー386!", log_Method); StringBuilder s = new StringBuilder(); s.Append("なんらかのエラー。"); s.Append(Environment.NewLine); // ヒント r.Message = s.ToString(); log_Reports.EndCreateReport(); } goto gt_EndMethod; //──────────────────────────────────────── #endregion // gt_EndMethod: log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── protected override void LinkToParent( Configurationtree_Node cur_Cf, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "LinkToParent", log_Reports); Usercontrol uct = null; if (log_Reports.Successful) { Configuration_Node cf_Control = cur_Cf.GetParentByNodename( NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports); if (log_Reports.Successful) { uct = Utility_XmlToConfigurationtree_NodeImpl.GetUsercontrol( (Configurationtree_Node)cf_Control, memoryApplication, log_Reports); } } uct.ControlCommon.Configurationtree_Control.List_Child.Add(cur_Cf, log_Reports); goto gt_EndMethod; // #region 異常系 //──────────────────────────────────────── gt_Error_UndefinedClass: if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー386!", log_Method); StringBuilder s = new StringBuilder(); s.Append("なんらかのエラー。"); s.Append(Environment.NewLine); // ヒント r.Message = s.ToString(); log_Reports.EndCreateReport(); } goto gt_EndMethod; //──────────────────────────────────────── #endregion // gt_EndMethod: log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── protected override void Parse_ChildNodes( XmlElement cur_X, Configurationtree_Node cur_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "Parse_ChildNodes",log_Reports); // XmlElement err_XADisplay = null; Usercontrol uct = null; if (log_Reports.Successful) { Configuration_Node cf_Control = cur_Cf.GetParentByNodename( NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports); if (log_Reports.Successful) { uct = Utility_XmlToConfigurationtree_NodeImpl.GetUsercontrol( (Configurationtree_Node)cf_Control, memoryApplication, log_Reports); } } if (log_Reports.Successful) { if (uct is UsercontrolListbox) { // // リストボックスなら。 UsercontrolListbox uctLst = (UsercontrolListbox)uct; // // <a-select-record>、<a-display>要素 // XmlNodeList child_XNl = cur_X.ChildNodes; foreach (XmlNode x_childNode in child_XNl) { if (XmlNodeType.Element == x_childNode.NodeType) { XmlElement xChild = (XmlElement)x_childNode; err_XADisplay = xChild; string child_SName_Fnc = xChild.GetAttribute(PmNames.S_NAME.Name_Attribute); // // if (NamesFnc.S_VLD_DISPLAY == child_SName_Fnc)//【変更 2012-07-19】 { XmlToConfigurationtree_C15_Elm to = XmlToConfigurationtree_Collection.GetTranslatorByFncName(child_SName_Fnc, log_Reports); to.XmlToConfigurationtree( xChild, cur_Cf, memoryApplication, log_Reports ); } else if (NamesFnc.S_VLD_SELECT_RECORD == child_SName_Fnc) { // Sf:Vld-SelectRecord; XmlToConfigurationtree_C15_Elm to = XmlToConfigurationtree_Collection.GetTranslatorByFncName(child_SName_Fnc, log_Reports); to.XmlToConfigurationtree( xChild, cur_Cf, memoryApplication, log_Reports ); } else { // // エラー。 goto gt_Error_UndefinedChild11; } } } } } goto gt_EndMethod; // #region 異常系 //──────────────────────────────────────── gt_Error_UndefinedChild11: if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー385!", log_Method); StringBuilder s = new StringBuilder(); s.Append("<f-list-box-validation>要素に、<a-display><a-select-record>要素以外の要素"); s.Append(Environment.NewLine); s.Append("["); s.Append(err_XADisplay.Name); s.Append("]が含まれていました。"); s.Append(Environment.NewLine); s.Append(Environment.NewLine); // ヒント r.Message = s.ToString(); log_Reports.EndCreateReport(); } goto gt_EndMethod; //──────────────────────────────────────── gt_Error_UndefinedClass: if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー386!", log_Method); StringBuilder s = new StringBuilder(); s.Append("なんらかのエラー。"); s.Append(Environment.NewLine); // ヒント r.Message = s.ToString(); log_Reports.EndCreateReport(); } goto gt_EndMethod; //──────────────────────────────────────── #endregion // gt_EndMethod: log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── #endregion #region アクション //──────────────────────────────────────── protected override void Parse_SAttribute( XmlElement cur_X, Configurationtree_Node cur_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0); log_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "Parse_SAttr", log_Reports); // // // // name属性は必須。 // string sName_Fnc = cur_X.GetAttribute(PmNames.S_NAME.Name_Attribute); if ("" == sName_Fnc) { goto gt_Error_UndefinedFncNameAttr; } XmlAttribute err_XAttr = null; if (NamesFnc.S_CELL == sName_Fnc) { foreach (XmlAttribute xAttr in cur_X.Attributes) { // ② // name,description PmName pmName = PmNames.FromSAttribute(xAttr.Name); if (null != pmName) { cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports); } else { err_XAttr = xAttr; goto gt_Error_UndefinedAttr; } } } else if (NamesFnc.S_SWITCH == sName_Fnc) { foreach (XmlAttribute xAttr in cur_X.Attributes) { // ③ // name,description PmName pmName = PmNames.FromSAttribute(xAttr.Name); if (null != pmName) { cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports); } else { err_XAttr = xAttr; goto gt_Error_UndefinedAttr; } } } else if (NamesFnc.S_CASE == sName_Fnc) { foreach (XmlAttribute xAttr in cur_X.Attributes) { // ④ // name,description PmName pmName = PmNames.FromSAttribute(xAttr.Name); if (null != pmName) { cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports); } else { err_XAttr = xAttr; goto gt_Error_UndefinedAttr; } } } else if (NamesFnc.S_VALUE_CONTROL == sName_Fnc) { foreach (XmlAttribute xAttr in cur_X.Attributes) { // ⑤ // name,description PmName pmName = PmNames.FromSAttribute(xAttr.Name); if (null != pmName) { cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports); } else { err_XAttr = xAttr; goto gt_Error_UndefinedAttr; } } // value属性の指定がなければ、このコントロールの名前を入れておく。 if (!cur_Cf.Dictionary_Attribute.ContainsKey(PmNames.S_VALUE.Name_Pm)) { Configurationtree_Node owner_Configurationtree_Control; if (!(cur_Cf.Parent is Configurationtree_Node)) { //todo:エラーか? owner_Configurationtree_Control = null; goto gt_Error_UndefinedClass; } else { Configurationtree_Node parent_Cf = (Configurationtree_Node)cur_Cf.Parent; if (NamesNode.S_CONTROL1 == parent_Cf.Name) { owner_Configurationtree_Control = parent_Cf; } else { Configuration_Node parent2 = parent_Cf.GetParentByNodename( NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports); if (log_Reports.Successful) { owner_Configurationtree_Control = (Configurationtree_Node)parent2; } else { owner_Configurationtree_Control = null; } } } if (null != owner_Configurationtree_Control) { if (owner_Configurationtree_Control.Dictionary_Attribute.ContainsKey(PmNames.S_NAME.Name_Pm)) { string sFcName; owner_Configurationtree_Control.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sFcName, true, log_Reports); cur_Cf.Dictionary_Attribute.Add(PmNames.S_VALUE.Name_Pm, sFcName, cur_Cf, true, log_Reports); } } } } else if (NamesFnc.S_RECORD_SET_SAVE_TO2 == sName_Fnc) { foreach (XmlAttribute xAttr in cur_X.Attributes) { string xName_AttrTrim = xAttr.Name.Trim(); if ( PmNames.S_REQUIRED.Name_Attribute == xAttr.Name || // 特にS→Eにパースは無い PmNames.S_FROM.Name_Attribute == xAttr.Name || // Xn_L07_SToE:SToE_F_5FElem/Xn_L07_SToE:SToE_F_A6FromImpl PmNames.S_STORAGE.Name_Attribute == xAttr.Name || // 特にS→Eにパースは無い PmNames.S_FIELD.Name_Attribute == xAttr.Name // 特にS→Eにパースは無い ) { // // 属性=”” cur_Cf.Dictionary_Attribute.Add(xAttr.Name, xAttr.Value, cur_Cf, true, log_Reports); } else { // // エラー。 err_XAttr = xAttr; goto gt_Error_UndefinedAttr; } }//foreach } else { foreach (XmlNode xAttr in cur_X.Attributes) { // とりあえず、どんな属性名でも受け入れる。 if (log_Method.CanDebug(1)) { log_Method.WriteDebug_ToConsole("<fnc name=”[" + sName_Fnc + "]”>の属性 " + xAttr.Name + "=”" + xAttr.Value + "”"); } // // value="" // // ⑥ PmName pmName = PmNames.FromSAttribute(xAttr.Name); if (null != pmName) { cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports); } else { cur_Cf.Dictionary_Attribute.Add(xAttr.Name, xAttr.Value, cur_Cf, true, log_Reports); } // // 子<arg1>は、ここでは処理しない。 // } } goto gt_EndMethod; // // #region 異常系 //──────────────────────────────────────── gt_Error_UndefinedAttr: if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー336!", log_Method); Log_TextIndented s = new Log_TextIndentedImpl(); s.Append("["); s.Append(cur_X.Name); s.Append("]要素を探索中に、未対応の属性が記述されていました。"); s.Newline(); s.Append("xAttr.Name=["); s.Append(err_XAttr.Name); s.Append("]"); s.Newline(); s.Newline(); // ヒント s.Append(r.Message_Configuration(cur_Cf)); r.Message = s.ToString(); log_Reports.EndCreateReport(); } goto gt_EndMethod; //──────────────────────────────────────── gt_Error_UndefinedFncNameAttr: if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー413!", log_Method); Log_TextIndented s = new Log_TextIndentedImpl(); s.Append("<fnc>要素に、name属性が指定されていませんでした。"); s.Newline(); s.Newline(); // ヒント s.Append(r.Message_Configuration(cur_Cf)); r.Message = s.ToString(); log_Reports.EndCreateReport(); } goto gt_EndMethod; //──────────────────────────────────────── gt_Error_UndefinedClass: if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー341!", log_Method); Log_TextIndented s = new Log_TextIndentedImpl(); s.Append("何らかのエラー。"); s.Newline(); // ヒント s.Append(r.Message_Configuration(cur_Cf)); r.Message = s.ToString(); log_Reports.EndCreateReport(); } goto gt_EndMethod; //──────────────────────────────────────── #endregion // // gt_EndMethod: log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── /// <summary> /// UsercontrolPerformerImpl#Perform_FcImpl で使用。 /// UsercontrolPerformerImpl#Perform で使用。 /// /// cf_Eventは、ucFc.ControlCommon.Configurationtree_Control.SDic_Event から取っている。 /// </summary> /// <param name="sender"></param> /// <param name="event_Conf"></param> /// <param name="moWorkbench"></param> /// <param name="log_Reports"></param> public void Execute2_Event( object sender, Configurationtree_Node event_Conf, MemoryApplication owner_MemoryApplication, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute2_Event", log_Reports); Configurationtree_Node cf_ThisMethod = new Configurationtree_NodeImpl("<" + log_Method.Fullname + ":>", null); if (log_Reports.CanStopwatch) { // コメント作成 { StringBuilder sb = new StringBuilder(); string sName_Control; { Configuration_Node owner_Configurationtree_Control = event_Conf.GetParentByNodename( NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports); ((Configurationtree_Node)owner_Configurationtree_Control).Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Control, false, log_Reports); } string sEventName; { event_Conf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sEventName, false, log_Reports); } int nActionCount; { nActionCount = event_Conf.List_Child.Count; } sb.Append(Info_Functions.Name_Library); sb.Append(":"); sb.Append(this.GetType().Name); sb.Append("#ToString: イベント計測 "); sb.Append(" FC["); sb.Append(sName_Control); sb.Append("].EV["); sb.Append(sEventName); sb.Append("]"); if (0 < nActionCount) { sb.Append("アクション数=["); sb.Append(nActionCount); sb.Append("]"); } log_Method.Log_Stopwatch.Message = sb.ToString(); log_Method.Log_Stopwatch.Begin(); } } // ステータスバーに表示する文字列。 { if (sender is Customcontrol) { Customcontrol ccFc = (Customcontrol)sender; if (null == ccFc.ControlCommon.Owner_MemoryApplication) { log_Method.WriteDebug_ToConsole("null==ccFc.ControlCommon.Owner_MemoryApplication がヌルでした。"); } else { ccFc.ControlCommon.Owner_MemoryApplication.MemoryForms.AddStatus_ActionUsercontrolNameBegin(log_Reports); string sName_Usercontrol = sName_Usercontrol = ccFc.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports); ccFc.ControlCommon.Owner_MemoryApplication.MemoryForms.AddStatus_ActionUsercontrolName(sName_Usercontrol, log_Reports); } } } event_Conf.List_Child.ForEach(delegate(Configurationtree_Node s_Action, ref bool bBreak) { Executer3_FunctionImpl exe2 = new Executer3_FunctionImpl(); // イベントハンドラーの作成 Expression_Node_Function expr_Func = exe2.ConfigurationtreeToFunction( s_Action, owner_MemoryApplication, log_Reports ); // システム定義関数の実行 exe2.Execute3_Function( expr_Func, sender, owner_MemoryApplication, log_Reports ); // 他の待機スレッドに、実行順番を譲る。 //TODO: System.Threading.Thread.Sleep(0); //if (Log_ReportsImpl.BDebugmode_Static) //{ // //.WriteLine(this.GetType().Name + "#:\n│\n│\n│\n│"); //} }); log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── /// <summary> /// UsercontrolPerformerImpl#Perform_FcImpl で使用。 /// UsercontrolPerformerImpl#Perform で使用。 /// /// cf_Eventは、ucFc.ControlCommon.Configurationtree_Control.SDic_Event から取っている。 /// </summary> /// <param name="sender"></param> /// <param name="event_Conf"></param> /// <param name="moWorkbench"></param> /// <param name="log_Reports"></param> public void Execute2_Event( object sender, Configurationtree_Node event_Conf, MemoryApplication owner_MemoryApplication, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute2_Event", log_Reports); Configurationtree_Node cf_ThisMethod = new Configurationtree_NodeImpl("<" + log_Method.Fullname + ":>", null); if (log_Reports.CanStopwatch) { // コメント作成 { StringBuilder sb = new StringBuilder(); string sName_Control; { Configuration_Node owner_Configurationtree_Control = event_Conf.GetParentByNodename( NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports); ((Configurationtree_Node)owner_Configurationtree_Control).Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Control, false, log_Reports); } string sEventName; { event_Conf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sEventName, false, log_Reports); } int nActionCount; { nActionCount = event_Conf.List_Child.Count; } sb.Append(Info_Functions.Name_Library); sb.Append(":"); sb.Append(this.GetType().Name); sb.Append("#ToString: イベント計測 "); sb.Append(" FC["); sb.Append(sName_Control); sb.Append("].EV["); sb.Append(sEventName); sb.Append("]"); if (0 < nActionCount) { sb.Append("アクション数=["); sb.Append(nActionCount); sb.Append("]"); } log_Method.Log_Stopwatch.Message = sb.ToString(); log_Method.Log_Stopwatch.Begin(); } } // ステータスバーに表示する文字列。 { if (sender is Customcontrol) { Customcontrol ccFc = (Customcontrol)sender; if (null == ccFc.ControlCommon.Owner_MemoryApplication) { log_Method.WriteDebug_ToConsole("null==ccFc.ControlCommon.Owner_MemoryApplication がヌルでした。"); } else { ccFc.ControlCommon.Owner_MemoryApplication.MemoryForms.AddStatus_ActionUsercontrolNameBegin(log_Reports); string sName_Usercontrol = sName_Usercontrol = ccFc.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports); ccFc.ControlCommon.Owner_MemoryApplication.MemoryForms.AddStatus_ActionUsercontrolName(sName_Usercontrol, log_Reports); } } } event_Conf.List_Child.ForEach(delegate(Configurationtree_Node s_Action, ref bool bBreak) { Executer3_FunctionImpl exe2 = new Executer3_FunctionImpl(); // イベントハンドラーの作成 Expression_Node_Function expr_Func = exe2.ConfigurationtreeToFunction( s_Action, owner_MemoryApplication, log_Reports ); // システム定義関数の実行 exe2.Execute3_Function( expr_Func, sender, owner_MemoryApplication, log_Reports ); // 他の待機スレッドに、実行順番を譲る。 //TODO: System.Threading.Thread.Sleep(0); //if (Log_ReportsImpl.BDebugmode_Static) //{ // //.WriteLine(this.GetType().Name + "#:\n│\n│\n│\n│"); //} }); log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── protected override void Parse_ChildNodes( XmlElement cur_X, Configurationtree_Node cur_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "Parse_ChildNodes", log_Reports); // XmlElement err_XADisplay = null; Usercontrol uct = null; if (log_Reports.Successful) { Configuration_Node cf_Control = cur_Cf.GetParentByNodename( NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports); if (log_Reports.Successful) { uct = Utility_XmlToConfigurationtree_NodeImpl.GetUsercontrol( (Configurationtree_Node)cf_Control, memoryApplication, log_Reports); } } if (log_Reports.Successful) { if (uct is UsercontrolListbox) { // // リストボックスなら。 UsercontrolListbox uctLst = (UsercontrolListbox)uct; // // <a-select-record>、<a-display>要素 // XmlNodeList child_XNl = cur_X.ChildNodes; foreach (XmlNode x_childNode in child_XNl) { if (XmlNodeType.Element == x_childNode.NodeType) { XmlElement xChild = (XmlElement)x_childNode; err_XADisplay = xChild; string child_SName_Fnc = xChild.GetAttribute(PmNames.S_NAME.Name_Attribute); // // if (NamesFnc.S_VLD_DISPLAY == child_SName_Fnc)//【変更 2012-07-19】 { XmlToConfigurationtree_C15_Elm to = XmlToConfigurationtree_Collection.GetTranslatorByFncName(child_SName_Fnc, log_Reports); to.XmlToConfigurationtree( xChild, cur_Cf, memoryApplication, log_Reports ); } else if (NamesFnc.S_VLD_SELECT_RECORD == child_SName_Fnc) { // Sf:Vld-SelectRecord; XmlToConfigurationtree_C15_Elm to = XmlToConfigurationtree_Collection.GetTranslatorByFncName(child_SName_Fnc, log_Reports); to.XmlToConfigurationtree( xChild, cur_Cf, memoryApplication, log_Reports ); } else { // // エラー。 goto gt_Error_UndefinedChild11; } } } } } goto gt_EndMethod; // #region 異常系 //──────────────────────────────────────── gt_Error_UndefinedChild11: if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー385!", log_Method); StringBuilder s = new StringBuilder(); s.Append("<f-list-box-validation>要素に、<a-display><a-select-record>要素以外の要素"); s.Append(Environment.NewLine); s.Append("["); s.Append(err_XADisplay.Name); s.Append("]が含まれていました。"); s.Append(Environment.NewLine); s.Append(Environment.NewLine); // ヒント r.Message = s.ToString(); log_Reports.EndCreateReport(); } goto gt_EndMethod; //──────────────────────────────────────── gt_Error_UndefinedClass: if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー386!", log_Method); StringBuilder s = new StringBuilder(); s.Append("なんらかのエラー。"); s.Append(Environment.NewLine); // ヒント r.Message = s.ToString(); log_Reports.EndCreateReport(); } goto gt_EndMethod; //──────────────────────────────────────── #endregion // gt_EndMethod: log_Method.EndMethod(log_Reports); }