//──────────────────────────────────────── #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); } } }
//──────────────────────────────────────── /// <summary> /// 追加。 /// </summary> public void Add( Configurationtree_Node cur_Conf, Log_Reports log_Reports ) { this.list_Configurationtree_Node.Add(cur_Conf); }
//──────────────────────────────────────── /// <summary> /// 絶対パスが、ファイルシステムで使えるファイルパスの文字列の長さの制限を越えていれば真。 /// </summary> /// <param name="newDirectoryPath">指定するものがない場合は、System.Windows.Forms.StartupPath を入れてください。</param> /// <param name="newHumanInputFilePath"></param> /// <param name="cur_Conf"></param> public static bool IsTooLong_Path( string folderpath_New, string filepath_Humaninput_New, Log_Reports log_Reports, Configurationtree_Node cur_Conf ) { Log_Method log_Method = new Log_MethodImpl(0); log_Method.BeginMethod(Info_Syntax.Name_Library, "Utility_Configurationtree_Filepath", "IsTooLong_Path", log_Reports); // フラグ。 bool bFlagCheckPathTooLong = false; if (log_Reports.Successful) { // チェック。絶対パスにすることができればOK。 Utility_Configurationtree_Filepath.ToFilepathabsolute( folderpath_New, filepath_Humaninput_New, ref bFlagCheckPathTooLong, true, //ファイル名の長さが上限超過でも、正常処理扱いとします。 log_Reports, // out sErrorMsg, cur_Conf ); } goto gt_EndMethod; // // gt_EndMethod: log_Method.EndMethod(log_Reports); return(bFlagCheckPathTooLong); }
//──────────────────────────────────────── public static void ParseChild_InAnotherLibrary( Configurationtree_Node cur_Cf, Expression_Node_String parent_Expr,//nAcase,nFelemの両方の場合がある。 MemoryApplication memoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, "SToE_AbstractImpl", "ParseChild_InAnotherLibrary",log_Reports); ConfigurationtreeToExpression_F14n16 dammy = new ConfigurationtreeToExpression_F14_FncImpl_();//メソッドが使いたいだけなので、何でもいい。 dammy.ParseChild_InConfigurationtreeToExpression( cur_Cf, parent_Expr, memoryApplication, pg_ParsingLog, log_Reports ); goto gt_EndMethod; // // gt_EndMethod: if (Log_ReportsImpl.BDebugmode_Static) { //d_ParsingLog.Decrement(s_Cur.Name_Node); } log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── public TableUserformconfigImpl(string sName_Table, Configurationtree_Node cur_Conf) { this.name_Table = sName_Table; this.cur_Configurationtree = cur_Conf; this.list_RecordUserformconfig = new List<RecordUserformconfig>(); }
//──────────────────────────────────────── protected virtual Configurationtree_Node CreateMyself( XmlElement cur_X, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports) { Configurationtree_Node cf_Cur = new Configurationtree_NodeImpl(cur_X.Name, parent_Cf); return(cf_Cur); }
//──────────────────────────────────────── /// <summary> /// イベントハンドラーの作成。 /// </summary> /// <param name="s_Action"></param> /// <param name="log_Reports"></param> /// <returns></returns> public Expression_Node_Function ConfigurationtreeToFunction( Configurationtree_Node action_Conf, MemoryApplication owner_MemoryApplication, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_Functions.Name_Library, this, "ConfigurationtreeToFunction",log_Reports); if (log_Reports.CanStopwatch) { log_Method.Log_Stopwatch.Begin(); } // Expression_Node_Function expr_Func; if (log_Reports.Successful) { expr_Func = owner_MemoryApplication.MemoryForms.ConfigurationtreeToFunction.Translate( action_Conf, true, log_Reports ); } else { expr_Func = null; } goto gt_EndMethod; // gt_EndMethod: log_Method.EndMethod(log_Reports); return expr_Func; }
//──────────────────────────────────────── /// <summary> /// 親要素に、この要素を追加。 /// </summary> protected override void LinkToParent(Configurationtree_Node cur_Cf, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports) { string sAccess; cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_ACCESS, out sAccess, false, log_Reports); bool bHit = false; List <string> sList_Access = new CsvTo_ListImpl().Read(sAccess); foreach (string sAccess2 in sList_Access) { if (ValuesAttr.S_FROM == sAccess2) { // データソース用。 bHit = true; } else if (ValuesAttr.S_TO == sAccess2) { // データターゲット用。 bHit = true; } else { // access属性の有無は既にチェック済みのはず。 throw new Exception("未定義のaccess属性の値[" + sAccess2 + "]"); } } if (bHit) { parent_Cf.List_Child.Add(cur_Cf, log_Reports); } }
//──────────────────────────────────────── 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); } } }
//──────────────────────────────────────── public TableUserformconfigImpl(string sName_Table, Configurationtree_Node cur_Conf) { this.name_Table = sName_Table; this.cur_Configurationtree = cur_Conf; this.list_RecordUserformconfig = new List <RecordUserformconfig>(); }
//──────────────────────────────────────── #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); // // //string sIvtv = x_Cur.Attributes.GetNamedItem(AttrNames.S_ITEM_VALUE_TO_VARIABLE).Value; //string sIvtvTrim = ""; //if (null == sIvtv) //{ // sIvtvTrim = ""; //} //else //{ // sIvtvTrim = sIvtv.Trim(); //} cur_Cf.Dictionary_Attribute.Set(PmNames.S_NAME_VAR.Name_Pm, "", log_Reports);// PmNames.Z_ITEM_VALUE_TO_VARIABLE sIvtv; goto gt_EndMethod; // // gt_EndMethod: log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── /// <summary> /// 追加。 /// </summary> public void Add( Configurationtree_Node cur_Conf, Log_Reports log_Reports ) { this.list_Configurationtree_Node.Add(cur_Conf); }
//──────────────────────────────────────── public abstract void Translate( Configurationtree_Node cur_Cf, Expression_Node_String parent_Ec, MemoryApplication memoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports );
//──────────────────────────────────────── public static void ParseChild_InAnotherLibrary( Configurationtree_Node cur_Cf, Expression_Node_String parent_Expr,//nAcase,nFelemの両方の場合がある。 MemoryApplication memoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, "SToE_AbstractImpl", "ParseChild_InAnotherLibrary", log_Reports); ConfigurationtreeToExpression_F14n16 dammy = new ConfigurationtreeToExpression_F14_FncImpl_();//メソッドが使いたいだけなので、何でもいい。 dammy.ParseChild_InConfigurationtreeToExpression( cur_Cf, parent_Expr, memoryApplication, pg_ParsingLog, log_Reports ); goto gt_EndMethod; // // gt_EndMethod: if (Log_ReportsImpl.BDebugmode_Static) { //d_ParsingLog.Decrement(s_Cur.Name_Node); } log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── /// <summary> /// コンストラクター。 /// </summary> /// <param name="e_ParentNode"></param> /// <param name="s_ParentNode"></param> /// <param name="moOpyopyo"></param> public Expression_FparamImpl( Expression_Node_String parent_Expression_Node, Configurationtree_Node parent_Configurationtree_Node, MemoryApplication owner_MemoryApplication ) : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication) { }
//──────────────────────────────────────── protected override Configurationtree_Node CreateMyself( XmlElement cur_X, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports) { Configurationtree_Node cur_Cf; cur_Cf = new Configurationtree_NodeImpl(NamesNode.S_F_LISTBOX_VALIDATION, parent_Cf); return cur_Cf; }
//──────────────────────────────────────── #endregion #region アクション //──────────────────────────────────────── protected override void Parse_ChildNodes( XmlElement cur_X, Configurationtree_Node cf_Cur, MemoryApplication memoryApplication, Log_Reports log_Reports ) { }
//──────────────────────────────────────── protected override void Parse_ChildNodes( XmlElement cur_X, Configurationtree_Node cf_Cur, MemoryApplication memoryApplication, Log_Reports log_Reports ) { }
//──────────────────────────────────────── /// <summary> /// コンストラクター。 /// </summary> /// <param name="e_ParentNode"></param> /// <param name="s_ParentNode"></param> /// <param name="moOpyopyo"></param> public Expression_FparamImpl( Expression_Node_String parent_Expression_Node, Configurationtree_Node parent_Configurationtree_Node, MemoryApplication owner_MemoryApplication ) : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication) { }
//──────────────────────────────────────── protected override void Parse_SAttribute( XmlElement cur_X, Configurationtree_Node cur_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports ) { }
//──────────────────────────────────────── /// <summary> /// new された直後の内容に戻します。 /// </summary> public void Clear(string sName, Configurationtree_Node parent_Conf_OrNull, Log_Reports log_Reports) { Log_Method log_Method = new Log_MethodImpl(0); log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Clear", log_Reports); // // // // 親 // // // this.Parent = parent_Conf_OrNull; // // // // 自 // // // this.Name = sName; // // // // 属性 // // // this.Dictionary_Attribute.Clear(this, log_Reports); // // // // 子 // // // this.list_Child.Clear(log_Reports); // // // // 親への連結は維持。 // // // // // log_Method.EndMethod(log_Reports); }
//"f-listbox-for-items", //──────────────────────────────────────── public Expressionv_3FListboxValidationImpl( Expression_Node_String parent_Expression, Configurationtree_Node parent_Conf, MemoryApplication owner_MemoryApplication) : base(parent_Expression, parent_Conf, owner_MemoryApplication) { this.Owner_MemoryApplication = owner_MemoryApplication; this.list_Expressionv_ADisplay = new List<Expressionv_4ADisplay>(); this.list_Expressionv_ASelectRecord = new List<Expressionv_4ASelectRecord>(); }
//──────────────────────────────────────── public Expressionv_3FListboxValidationImpl( Expression_Node_String parent_Expression, Configurationtree_Node parent_Conf, MemoryApplication owner_MemoryApplication) : base(parent_Expression, parent_Conf, owner_MemoryApplication)//"f-listbox-for-items", { this.Owner_MemoryApplication = owner_MemoryApplication; this.list_Expressionv_ADisplay = new List <Expressionv_4ADisplay>(); this.list_Expressionv_ASelectRecord = new List <Expressionv_4ASelectRecord>(); }
//──────────────────────────────────────── /// <summary> /// 未実装。 /// </summary> /// <param name="oFStrNode"></param> /// <param name="nFAelem"></param> /// <param name="memoryApplication"></param> /// <param name="log_Reports"></param> public override void Translate( Configurationtree_Node cur_Cf,//<def-param> Expression_Node_String parent_Ec,//親<●●>要素。汎用。 MemoryApplication memoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports ) { }
//──────────────────────────────────────── protected override Configurationtree_Node CreateMyself( XmlElement cur_X, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports) { Configurationtree_Node cur_Cf; cur_Cf = new Configurationtree_NodeImpl(NamesNode.S_FNC, parent_Cf); return(cur_Cf); }
//──────────────────────────────────────── /// <summary> /// 未実装。 /// </summary> /// <param name="oFStrNode"></param> /// <param name="nFAelem"></param> /// <param name="memoryApplication"></param> /// <param name="log_Reports"></param> public override void Translate( Configurationtree_Node cur_Cf, //<def-param> Expression_Node_String parent_Ec, //親<●●>要素。汎用。 MemoryApplication memoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports ) { }
//──────────────────────────────────────── /// <summary> /// コンストラクター。 /// </summary> /// <param name="moOpyopyo"></param> /// <param name="s_ParentNode"></param> public Expression_ValuecontrolImpl( Expression_Node_String ec_FcName, MemoryApplication owner_MemoryApplication, Expression_Node_String parent_Expression_Node, Configurationtree_Node parent_Configurationtree_Node ) : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication) { this.expression_UsercontrolName = ec_FcName; }
//──────────────────────────────────────── public virtual void Translate_Step2( ConfigurationtreeToFunction_Item parentProcesser, Configurationtree_Node action_Conf, Expression_Node_Function parent_Ec_Sf,//todo:何これ? MemoryApplication owner_MemoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports ) { }
//──────────────────────────────────────── protected override void LinkToParent(Configurationtree_Node cur_Cf, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports) { Usercontrol uct = null; if (log_Reports.Successful) { uct = Utility_XmlToConfigurationtree_NodeImpl.GetUsercontrol(cur_Cf, memoryApplication, log_Reports); } uct.ControlCommon.Configurationtree_Control.List_Child.Add(cur_Cf, log_Reports); }
// //──────────────────────────────────────── public Expressionv_4ASelectRecordImpl(Expression_Node_String parent_Expression_Node, Configurationtree_Node parent_Configurationtree_Node, MemoryApplication owner_MemoryApplication) : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication) { this.expression_Field = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node); this.expression_LookupVal = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node); this.expression_Required = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node); this.expression_From = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node); this.expression_Storage = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node); this.expression_Description = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node); }
//──────────────────────────────────────── /// <summary> /// コンストラクター。 /// </summary> /// <param name="moOpyopyo"></param> /// <param name="s_ParentNode"></param> public Expression_ValuecontrolImpl( Expression_Node_String ec_FcName, MemoryApplication owner_MemoryApplication, Expression_Node_String parent_Expression_Node, Configurationtree_Node parent_Configurationtree_Node ) : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication) { this.expression_UsercontrolName = ec_FcName; }
//──────────────────────────────────────── /// <summary> /// 必須属性の有無テスト。 /// </summary> /// <param name="x_Cur"></param> /// <param name="s_Cur"></param> /// <param name="log_Reports"></param> protected virtual void Test_Attributes(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, "Test_Attributes", log_Reports); // // 必須属性の有無テスト // string err_SName_Attr; if (null != this.List_SName_RequiredPm) { foreach (string sName_Attr in this.List_SName_RequiredPm) { if (!cur_Cf.Dictionary_Attribute.ContainsKey(sName_Attr)) { // エラー。 err_SName_Attr = sName_Attr; goto gt_Error_NothingAttr; } } } goto gt_EndMethod; // // #region 異常系 //──────────────────────────────────────── gt_Error_NothingAttr: { Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl(); tmpl.SetParameter(1, cur_X.Name, log_Reports); //要素名 tmpl.SetParameter(2, err_SName_Attr, log_Reports); //属性名 tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Configuration(cur_Cf), log_Reports); //設定位置パンくずリスト memoryApplication.CreateErrorReport("Er:8009;", tmpl, log_Reports); } goto gt_EndMethod; //──────────────────────────────────────── #endregion // // gt_EndMethod: log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── #endregion #region アクション //──────────────────────────────────────── /// <summary> /// Exe_2ActionImpl#SToFc で使用。 /// </summary> /// <param name="s_Action"></param> /// <param name="bRequired"></param> /// <param name="log_Reports"></param> /// <returns></returns> public Expression_Node_Function Translate( Configurationtree_Node action_Conf, bool bRequired, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0); log_Method.BeginMethod(Info_Functions.Name_Library, this, "Translate", log_Reports); // // string sName_Fnc; if (action_Conf.Dictionary_Attribute.ContainsKey(PmNames.S_NAME.Name_Pm)) { action_Conf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, true, log_Reports); } else { sName_Fnc = "<エラー:" + log_Method.Fullname + ">"; } Expression_Node_Function expr_Func = Collection_Function.NewFunction2(sName_Fnc, null, action_Conf, this.Owner_MemoryApplication, log_Reports); if (log_Reports.Successful) { if (null != expr_Func) { Log_TextIndented_ConfigurationtreeToExpressionImpl pg_ParsingLog = new Log_TextIndented_ConfigurationtreeToExpressionImpl(); pg_ParsingLog.BEnabled = false; expr_Func = ((Expression_Node_FunctionAbstract)expr_Func).Functiontranslatoritem.Translate( sName_Fnc, action_Conf,//これは生成時に指定できない? pg_ParsingLog, this.Owner_MemoryApplication, log_Reports ); if (Log_ReportsImpl.BDebugmode_Static && pg_ParsingLog.BEnabled) { log_Method.WriteInfo_ToConsole(" pg_ParsingLog=" + Environment.NewLine + pg_ParsingLog.ToString()); } } } goto gt_EndMethod; // gt_EndMethod: log_Method.EndMethod(log_Reports); return(expr_Func); }
//──────────────────────────────────────── protected override void LinkToParent(Configurationtree_Node cur_Cf, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports) { Usercontrol uct = null; if (log_Reports.Successful) { uct = Utility_XmlToConfigurationtree_NodeImpl.GetUsercontrol(cur_Cf, memoryApplication, log_Reports); } uct.ControlCommon.Configurationtree_Control.List_Child.Add(cur_Cf, log_Reports); }
//──────────────────────────────────────── /// <summary> /// コンストラクター。 /// </summary> public Expression_TexttemplateP1pImpl(Expression_Node_String parent_Expr, Configurationtree_Node cur_Conf) { this.parent_Expression = parent_Expr; this.cur_Configurationtree = cur_Conf; this.requestItems = EnumHitcount.Unconstraint; this.dictionary_P1p = new Dictionary<int, string>(); this.list_Expression_Child = new List_Expression_Node_StringImpl(this);//使いません。 this.dictionary_Expression_Attribute = new Dictionary_Expression_Node_StringImpl(this.Cur_Configuration); }
//──────────────────────────────────────── 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_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "LinkToParent", log_Reports); log_Method.WriteWarning_ToConsole("親要素に、連結。"); parent_Cf.List_Child.Add(cur_Cf, log_Reports); log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── /// <summary> /// コンストラクター。 /// </summary> public Expression_TexttemplateP1pImpl(Expression_Node_String parent_Expr, Configurationtree_Node cur_Conf) { this.parent_Expression = parent_Expr; this.cur_Configurationtree = cur_Conf; this.requestItems = EnumHitcount.Unconstraint; this.dictionary_P1p = new Dictionary <int, string>(); this.list_Expression_Child = new List_Expression_Node_StringImpl(this);//使いません。 this.dictionary_Expression_Attribute = new Dictionary_Expression_Node_StringImpl(this.Cur_Configuration); }
//──────────────────────────────────────── protected virtual void Parse_ChildNodes( XmlElement cur_X, Configurationtree_Node cur_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports ) { XmlToConfigurationtree_C14_Hub to = new XmlToConfigurationtree_C14_HubImpl(); to.XmlToConfigurationtree(cur_X, cur_Cf, memoryApplication, log_Reports); }
/// <summary> /// クリアーします。 /// </summary> public void Clear(MemoryApplication owner_MemoryApplication) { this.name_SubFolder = ""; this.backupKeptbackups = 0; Configurationtree_Node s_ParentNode_Null = null; this.givechapterandverse_Name_SubFolder = new Configurationtree_NodeImpl(NamesNode.S_F_SET_VAR, s_ParentNode_Null); this.givechapterandverse_BackupKeptbackups = new Configurationtree_NodeImpl(NamesNode.S_F_SET_VAR, s_ParentNode_Null); this.owner_MemoryApplication = owner_MemoryApplication; }
//──────────────────────────────────────── protected override Configurationtree_Node CreateMyself( XmlElement cur_X, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports ) { Configurationtree_Node cf_Cur; cf_Cur = new Configurationtree_NodeImpl(NamesNode.S_FNC, parent_Cf); return cf_Cur; }
//──────────────────────────────────────── /// <summary> /// new された直後の内容に戻します。 /// </summary> public void Clear( string sName, Configurationtree_Node parent_Conf_OrNull, Log_Reports log_Reports) { Log_Method log_Method = new Log_MethodImpl(0); log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Clear", log_Reports); // // // // 親 // // // this.Parent = parent_Conf_OrNull; // // // // 自 // // // this.Name = sName; // // // // 属性 // // // this.Dictionary_Attribute.Clear( this, log_Reports); // // // // 子 // // // this.list_Child.Clear(log_Reports); // // // // 親への連結は維持。 // // // // // log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── public static bool IsTooLong_Path( string filepath_Humaninput_New, Log_Reports log_Reports, Configurationtree_Node cur_Conf ) { return(Utility_Configurationtree_Filepath.IsTooLong_Path( "", filepath_Humaninput_New, log_Reports,// out sErrorMsg, cur_Conf )); }
//──────────────────────────────────────── public static bool IsTooLong_Path( string filepath_Humaninput_New, Log_Reports log_Reports, Configurationtree_Node cur_Conf ) { return Utility_Configurationtree_Filepath.IsTooLong_Path( "", filepath_Humaninput_New, log_Reports,// out sErrorMsg, cur_Conf ); }
//──────────────────────────────────────── /// <summary> /// Exe_2ActionImpl#SToFc で使用。 /// </summary> /// <param name="s_Action"></param> /// <param name="bRequired"></param> /// <param name="log_Reports"></param> /// <returns></returns> public Expression_Node_Function Translate( Configurationtree_Node action_Conf, bool bRequired, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0); log_Method.BeginMethod(Info_Functions.Name_Library, this, "Translate",log_Reports); // // string sName_Fnc; if (action_Conf.Dictionary_Attribute.ContainsKey(PmNames.S_NAME.Name_Pm)) { action_Conf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, true, log_Reports); } else { sName_Fnc = "<エラー:" + log_Method.Fullname + ">"; } Expression_Node_Function expr_Func = Collection_Function.NewFunction2( sName_Fnc, null, action_Conf, this.Owner_MemoryApplication, log_Reports); if (log_Reports.Successful) { if (null != expr_Func) { Log_TextIndented_ConfigurationtreeToExpressionImpl pg_ParsingLog = new Log_TextIndented_ConfigurationtreeToExpressionImpl(); pg_ParsingLog.BEnabled = false; expr_Func = ((Expression_Node_FunctionAbstract)expr_Func).Functiontranslatoritem.Translate( sName_Fnc, action_Conf,//これは生成時に指定できない? pg_ParsingLog, this.Owner_MemoryApplication, log_Reports ); if (Log_ReportsImpl.BDebugmode_Static && pg_ParsingLog.BEnabled) { log_Method.WriteInfo_ToConsole(" pg_ParsingLog=" + Environment.NewLine + pg_ParsingLog.ToString()); } } } goto gt_EndMethod; // gt_EndMethod: log_Method.EndMethod(log_Reports); return expr_Func; }
//──────────────────────────────────────── #endregion #region アクション //──────────────────────────────────────── /// <summary> /// 定型処理。 /// </summary> public void P101_LoadAatoolxml( Configurationtree_Node cf_CallerMethod, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "P101_LoadAatoolxml", log_Reports); // // this.Owner_MemoryApplication.MemoryAatoolxml.Clear(this.Owner_MemoryApplication); if (log_Reports.Successful) { // ツール設定ファイルへのパスは固定とします。 Expression_Node_Filepath ec_Fpath; { Configurationtree_NodeFilepath cf_Fpath = new Configurationtree_NodeFilepathImpl("ファイルパス出典未指定L09Mid_5", cf_CallerMethod); cf_Fpath.InitPath( ValuesAttr.S_FPATHR_AATOOLXML, log_Reports); if (!log_Reports.Successful) { // 既エラー。 goto gt_EndMethod; } ec_Fpath = new Expression_Node_FilepathImpl(cf_Fpath); } this.Owner_MemoryApplication.MemoryAatoolxml.LoadFile(ec_Fpath, log_Reports); if (!log_Reports.Successful) { // 既エラー。 goto gt_EndMethod; } } else { // エラー終了処理 } goto gt_EndMethod; // // gt_EndMethod: log_Method.EndMethod(log_Reports); return; }
//──────────────────────────────────────── 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); }
//──────────────────────────────────────── /// <summary> /// new された直後の内容に戻します。 /// </summary> public void Clear(Configurationtree_Node owner_Conf, Log_Reports log_Reports) { Log_Method log_Method = new Log_MethodImpl(0); log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Clear", log_Reports); // // this.owner = null; this.dictionary_Attribute.Clear(); // // log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── /// <summary> /// コンストラクター。 /// </summary> public ControlCommonImpl() { Log_Method log_Method = new Log_MethodImpl(); Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method); log_Method.BeginMethod(Info_Controls.Name_Library, this, "ControlCommonImpl", log_Reports_ThisMethod); // コントロールを作った時に、必ずnameプロパティを設定してください。 // ただし、直接 Visual Studio のビジュアルエディターで配置した場合は設定できません。 Configurationtree_Node cur_Cf = new Configurationtree_NodeImpl(log_Method.Fullname+"<init>", null); this.configurationtree_Control = new Configurationtree_NodeImpl(NamesNode.S_CONTROL1, cur_Cf);//ダミーのデフォルト・オブジェクト? this.expression_Name_Control = new Expression_Node_StringImpl(null, cur_Cf); log_Method.EndMethod(log_Reports_ThisMethod); log_Reports_ThisMethod.EndLogging(log_Method); }
//──────────────────────────────────────── 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 Configurationtree_Node CreateMyself( XmlElement cur_X, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports) { Configurationtree_Node cur_Cf; if (NamesNode.S_CODEFILE_TOGETHERS == parent_Cf.Name) { cur_Cf = new Configurationtree_NodeImpl(NamesNode.S_TOGETHER, parent_Cf); cur_Cf.Dictionary_Attribute.Set(PmNames.S_IN.Name_Pm, "", log_Reports); } else { cur_Cf = new Configurationtree_NodeImpl(NamesNode.S_TOGETHER, parent_Cf); } return(cur_Cf); }
//──────────────────────────────────────── 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); // // goto gt_EndMethod; // // gt_EndMethod: log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── /// <summary> /// 未実装の場合。 /// </summary> /// <param name="parent_Conf"></param> /// <param name="log_Reports"></param> /// <returns></returns> public static List<Expression_Node_String> NoImpl_Expression_GetChildList( Configurationtree_Node parent_Conf, Log_Reports log_Reports ) { // // エラー。 Log_Method log_Method = new Log_MethodImpl(); log_Method.BeginMethod(Info_Syntax.Name_Library, "Util_Expression_Node_String", "NoImpl_Expression_GetChildList", log_Reports); // // // // if (log_Reports.CanCreateReport) { Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error); r.SetTitle("▲エラー361!", log_Method); StringBuilder sb = new StringBuilder(); sb.Append("Expression_GetChildList メソッドは、未実装です。"); sb.Append(Environment.NewLine); sb.Append(Environment.NewLine); // ヒント sb.Append(r.Message_Configuration(parent_Conf)); r.Message = sb.ToString(); log_Reports.EndCreateReport(); } // // // // log_Method.EndMethod(log_Reports); return null; }
//──────────────────────────────────────── /// <summary> /// 【追加 2012-07-05】 /// </summary> /// <param name="s_Cur"></param> /// <param name="e_Cur"></param> /// <param name="bRequired_NameAttr"></param> /// <param name="bRequired_ValueAttrIsChild"></param> /// <param name="log_Reports"></param> public static void ParseAttr_InAnotherLibrary( Configurationtree_Node cur_Cf, Expression_Node_String cur_Ec, bool bRequired_NameAttr,//name属性が必須な場合、真。 bool bRequired_ValueAttrIsChild,//value属性を、子<f-str>にする場合、真。 Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, "SToE_F14n16_AbstractImpl_", "ParseAttr_InAnotherLibrary",log_Reports); if (log_Method.CanDebug(1)) { //d_ParsingLog.Increment("(5.FElem汎用)"+s_Cur.Name_Node); } ConfigurationtreeToExpression_F14_FncImpl_ dammy = new ConfigurationtreeToExpression_F14_FncImpl_();//メソッドが使いたいだけなので、何でもいい。 dammy.ParseAttr_InConfigurationtreeToExpression( cur_Cf, cur_Ec, bRequired_NameAttr, bRequired_ValueAttrIsChild, log_Reports ); goto gt_EndMethod; // // gt_EndMethod: if (Log_ReportsImpl.BDebugmode_Static) { //d_ParsingLog.Decrement(s_Cur.Name_Node); } 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); }
//──────────────────────────────────────── 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); // // //string sIvtv = x_Cur.Attributes.GetNamedItem(AttrNames.S_ITEM_VALUE_TO_VARIABLE).Value; //string sIvtvTrim = ""; //if (null == sIvtv) //{ // sIvtvTrim = ""; //} //else //{ // sIvtvTrim = sIvtv.Trim(); //} cur_Cf.Dictionary_Attribute.Set(PmNames.S_NAME_VAR.Name_Pm, "", log_Reports);// PmNames.Z_ITEM_VALUE_TO_VARIABLE sIvtv; goto gt_EndMethod; // // gt_EndMethod: log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── public override void XmlToConfigurationtree( XmlElement cur_X,//<event> Configurationtree_Node parent_Cf,//<control> 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, "XmlToConfigurationtree", log_Reports); // // // // // // 自 // // // Configurationtree_Node cur_Cf = this.CreateMyself(cur_X, parent_Cf, memoryApplication, log_Reports); // // // // 属性 // // // this.Parse_SAttribute(cur_X, cur_Cf, memoryApplication, log_Reports); // // // // 子 // // // XmlElement err_XAction; Exception err_Excp; if (log_Reports.Successful) { // // // actionノードを列挙 // XmlNodeList child_XNl = cur_X.ChildNodes; foreach(XmlNode xChild in child_XNl) { if (XmlNodeType.Element == xChild.NodeType) { XmlElement xAction = (XmlElement)xChild; try { XmlToConfigurationtree_C15_Elm to = this.Dic_XmlToConfigurationtree[xChild.Name]; to.XmlToConfigurationtree( xAction, cur_Cf, memoryApplication, log_Reports ); } catch(KeyNotFoundException e) { err_XAction = xAction; err_Excp = e; goto gt_Error_NotFound; } catch (Exception e) { err_Excp = e; goto gt_Error_Excp; } } } } // // // // 親へ連結 // // // if (log_Reports.Successful) { parent_Cf.List_Child.Add(cur_Cf, log_Reports); } goto gt_EndMethod; // // #region 異常系 //──────────────────────────────────────── gt_Error_NotFound: { Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl(); tmpl.SetParameter(1, err_XAction.Name, log_Reports);//ノード名 tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Configuration(cur_Cf), log_Reports);//設定位置パンくずリスト tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Exception(err_Excp), log_Reports);//例外メッセージ memoryApplication.CreateErrorReport("Er:8023;", tmpl, log_Reports); } goto gt_EndMethod; //──────────────────────────────────────── gt_Error_Excp: { Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl(); tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(cur_Cf), log_Reports);//設定位置パンくずリスト tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Exception(err_Excp), log_Reports);//例外メッセージ memoryApplication.CreateErrorReport("Er:8024;", tmpl, log_Reports); } goto gt_EndMethod; //──────────────────────────────────────── #endregion // // gt_EndMethod: log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── /// <summary> /// 読取。 /// </summary> /// <param name="s_View"></param> /// <param name="ef_View"></param> /// <param name="moOpyopyo"></param> /// <param name="log_Reports"></param> public void Translate( Configurationtree_Node cur_Cf,//<view> Expression_Node_String parent_Ec,//「E■form-component」 MemoryApplication memoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports ) { Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static); log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE",log_Reports); if (log_Method.CanDebug(1)) { pg_ParsingLog.Increment("(3)"+cur_Cf.Name); } // // // // // // // // 自 // // // Expression_Node_StringImpl cur_Ec = new Expression_Node_StringImpl(parent_Ec, cur_Cf); // // // // 子 // // // { //<●●>要素を全検索。<f-list-box-labels>があることが期待されます。 cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node cf_Child, ref bool bBreak) { if (cf_Child is Configurationtree_Node) { Configurationtree_Node cf_Node = (Configurationtree_Node)cf_Child; string sName_Node = cf_Node.Name; string sName_Fnc = ""; { bool bRequired; if (NamesNode.S_FNC == sName_Node) { bRequired = true; } else { bRequired = false; } // todo; 子要素のnameも取りたい。 cf_Node.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, bRequired, log_Reports); } if (NamesNode.S_FNC == sName_Node && NamesFnc.S_LISTBOX_LABELS == sName_Fnc) { // 「S■fnc name=”Sf:f-listbox-labels;”」 ConfigurationtreeToExpression_F91_FListboxLabelsImpl_ to = new ConfigurationtreeToExpression_F91_FListboxLabelsImpl_(); to.Translate( cf_Child, cur_Ec, memoryApplication, pg_ParsingLog, log_Reports ); } else { // エラー { Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl(); tmpl.SetParameter(1, sName_Node, log_Reports);//設定ノード名 tmpl.SetParameter(2, sName_Fnc, log_Reports);//関数名 memoryApplication.CreateErrorReport("Er:7003;", tmpl, log_Reports); } bBreak = true; } } }); } // // // // 親へ連結 // // // { parent_Ec.List_Expression_Child.Add(cur_Ec, log_Reports); } goto gt_EndMethod; // // gt_EndMethod: if (Log_ReportsImpl.BDebugmode_Static) { pg_ParsingLog.Decrement(cur_Cf.Name); } log_Method.EndMethod(log_Reports); }
//──────────────────────────────────────── /// <summary> /// クリアーします。 /// </summary> public void Clear(MemoryApplication owner_MemoryApplication) { this.owner_MemoryApplication = owner_MemoryApplication; this.xToConfigurationtree_V = new XmlToConfigurationtree_Validator_ConfigImpl(); this.givechapterandverseToExpression_V = new ConfigurationtreeToExpression_V51_ConfigImpl(); this.givechapterandverse_Validatorsconfig = new Configurationtree_NodeImpl(NamesNode.S_CODEFILE_VALIDATORS, new Configurationtree_NodeImpl(this.GetType().Name + "#<init>", null)); }
//──────────────────────────────────────── public void Translate( Configurationtree_Node cur_Cf,//コントロール Expression_Node_String ec_Cur,//「E■form-component」 MemoryApplication memoryApplication, Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog, Log_Reports log_Reports ) { List<Configurationtree_Node> cfList_Data = cur_Cf.GetChildrenByNodename(NamesNode.S_DATA, false, log_Reports); foreach (Configurationtree_Node cf_Data in cfList_Data) { string sAccess; cf_Data.Dictionary_Attribute.TryGetValue(PmNames.S_ACCESS, out sAccess, false, log_Reports); List<string> sList_Access = new CsvTo_ListImpl().Read(sAccess); if (sList_Access.Contains(ValuesAttr.S_FROM)) { // <data>要素(access="from")を S→E。 ConfigurationtreeToExpression_F12_ to = new ConfigurationtreeToExpression_F12_DataImpl_(); to.Translate( cf_Data, ec_Cur, memoryApplication, pg_ParsingLog, log_Reports ); } // fromとtoは、両方持つこともある。 if (sList_Access.Contains(ValuesAttr.S_TO)) { // <data>(access="to")要素要素を S→E。 ConfigurationtreeToExpression_F12_ to = new ConfigurationtreeToExpression_F12_DataImpl_(); to.Translate( cf_Data, ec_Cur, memoryApplication, pg_ParsingLog, log_Reports ); } } // // <view>要素を S→E。 List<Configurationtree_Node> sList_View = cur_Cf.GetChildrenByNodename(NamesNode.S_VIEW, false, log_Reports); if(1<sList_View.Count) { // <view>要素は1個だけあるという前提。 throw new Exception("<[" + NamesNode.S_VIEW + "]>要素が2個以上あるのはエラー。"); } else if (0 < sList_View.Count) { Configurationtree_Node cf_View = sList_View[0]; ConfigurationtreeToExpression_F12_ViewImpl_ to = new ConfigurationtreeToExpression_F12_ViewImpl_(); to.Translate( cf_View, ec_Cur,//.E_View, memoryApplication, pg_ParsingLog, log_Reports ); } else { } }
//──────────────────────────────────────── public override void XmlToConfigurationtree( XmlElement cur_X, 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, "XmlToConfigurationtree", log_Reports); // // // // // // 自 // // // log_Method.WriteWarning_ToConsole("①自 [" + log_Reports.Successful + "]"); Configurationtree_Node cur_Cf; if (log_Reports.Successful) { cur_Cf = this.CreateMyself(cur_X, parent_Cf, memoryApplication, log_Reports); } else { cur_Cf = null; } // // // // 属性 // // // log_Method.WriteWarning_ToConsole("②属性 [" + log_Reports.Successful + "]"); if (log_Reports.Successful) { this.Parse_SAttribute(cur_X, cur_Cf, memoryApplication, log_Reports); } // // // // 属性テスト // // // log_Method.WriteWarning_ToConsole("③属性テスト [" + log_Reports.Successful + "]"); if (log_Reports.Successful) { this.Test_Attributes(cur_X, cur_Cf, memoryApplication, log_Reports); } // // // // 子 // // // log_Method.WriteWarning_ToConsole("④子 [" + log_Reports.Successful + "]"); if (log_Reports.Successful) { this.Parse_ChildNodes(cur_X, cur_Cf, memoryApplication, log_Reports); } // // // // 子テスト // // // log_Method.WriteWarning_ToConsole("⑤子テスト [" + log_Reports.Successful + "]"); if (log_Reports.Successful) { this.Test_ChildNodes(cur_X, cur_Cf, log_Reports); } // // // // 親へ連結。 // // // log_Method.WriteWarning_ToConsole("⑥親へ連結 [" + log_Reports.Successful + "]"); if (log_Reports.Successful) { this.LinkToParent(cur_Cf, parent_Cf, memoryApplication, log_Reports); } goto gt_EndMethod; // // // // gt_EndMethod: log_Method.EndMethod(log_Reports); }