Title | Type of | Initial value |
---|---|---|
Param1 | Number | 0 |
Param2 | Line | "" |
Param3 | ReferenceLink.NomenClatura | Undefined |
Param4 | Boolean | Lying |
Param5 | date | Undefined |
_() = ; .("ChangeInfo", ); // .("ErrMsg", ""); // // , .("Set_1", ); // 1 .("Set_2", ); // 2 .("Set_3", ); // 3 .("Set_4", ); // 4 .("Set_5", ); // 5 ;
//////////////////////////////////////////////////////////////////////////////// // () // // // : // . // : // // _() = ; .("ChangeInfo", ); // .("ErrMsg", ""); // // , .("Set_1", ); // 1 .("Set_2", ); // 2 .("Set_3", ); // 3 .("Set_4", ); // 4 .("Set_5", ); // 5 ; // // // : // . // : // () - // _() = _(); // _SetDefAttr(); ; // - // // : // - // _() // . // // : // - // _SetDefAttr() .ErrMsg = ""; .Set_1 = 0; .Set_2 = ""; .Set_3 = ; .Set_4 = ; .Set_5 = ; // 2 1. // 1 . // // : // 1 - // 2 - // _Assign(1, 2) (1 <> ) (2 <> ) (_IsEqual(1, 2) = ) 1 (., "Set_") = 1 // ( ) 1[.] = 2[.] ; 1.ChangeInfo = // . // // : // 1 - // 2 - // // , 2 , // 1 - // _IsEqual(1, 2) = ; (1 <> ) (2 <> ) = ; 1 (., "Set_") = 1 // ( ) . <> 2[.] = ; ; = ; // . // // : // - // _GetErrorMsg() .ErrMsg // . // // : // - // PrmName - // // PrmName , // _GetPrm(, PrmName) = ; .ErrMsg = ""; = ["Set_" + PrmName]; .ErrMsg = "_GetPrm: : " + PrmName; ; // . // // : // - // PrmName - // PrmVal - // _SetPrm(, PrmName, PrmVal) .ErrMsg = ""; ["Set_" + PrmName] <> PrmVal ["Set_" + PrmName] = PrmVal; .ChangeInfo = .ErrMsg = "_SetPrm: : " + PrmName; // ( ). // // : // - // PrmName - // // PrmName , // _GetPrmStrVal(, PrmName) = ; .ErrMsg = ""; = ["Set_" + PrmName]; // PrmName = "1" // â„–1 () = (, "=0; =''") PrmName = "2" // â„–2 () = PrmName = "3" // â„–3 (.) () = . = PrmName = "4" // â„–4 () = (, "=0; =1") PrmName = "5" // â„–5 () = (, "=""yyyyMMddHHmmss""") .ErrMsg = "_GetPrmStrVal: : " + PrmName + " : " + ().; ; // // ( ). // // : // - // PrmName - // StrPrmVal - // _SetPrmFromStrVal(, PrmName, StrPrmVal) .ErrMsg = ""; = ; // PrmName = "1" // â„–1 () = (StrPrmVal) PrmName = "2" // â„–2 () = StrPrmVal PrmName = "3" // â„–3 (.) (StrPrmVal) = ..(StrPrmVal); () = PrmName = "4" // â„–4 () = ((StrPrmVal)) PrmName = "5" // â„–5 () = (StrPrmVal) ; // ["Set_" + PrmName] <> ["Set_" + PrmName] = ; .ChangeInfo = .ErrMsg = "_SetPrmFromStrVal: : " + PrmName + " : " + ().; // // // // : // - // // // _GetChangeInfo() .ChangeInfo // // // // : // - // ChangeInfo - // _SetChangeInfo(, ChangeInfo) .ChangeInfo = ChangeInfo // XML-, XML. // // : // - // XML - XML- // // , - // _LoadSettingsFromXML(, XML) = ; // .ErrMsg = ""; XML <> // _SetDefAttr(); // _settings = ; = ""; XML.() XML. = "settings" (_settings = ) (XML. = XML.) // _settings = // _settings = ; = ""; _settings // XML. = XML. // = XML.; XML. = XML. ( <> "") (.("Set_" + )) _SetPrmFromStrVal(, , XML.); XML. = XML. = "" ; // .ErrMsg = "" .ChangeInfo = ; // = // // XML .ErrMsg = "_LoadSettingsFromXML: " + ().; // .ErrMsg = "_LoadSettingsFromXML: "; ; // XML-, XML. // // : // - // XML - XML- // // , - // _SaveSettingsToXML(, XML) = ; // .ErrMsg = ""; XML <> // XML.XML(); XML.("settings"); // Item (Item., "Set_") = 1 = (Item., 5); <> "" XML.(); XML.((_GetPrmStrVal(, ))); XML.() // ; // XML- XML.(); // settings .ErrMsg = "" .ChangeInfo = ; // = // // XML .ErrMsg = "_SaveSettingsToXML: " + ().; // .ErrMsg = "_SaveSettingsToXML: "; ; // XML-, XMLStr. // // : // - // XMLStr - XML- // // , - // _LoadSettingsFromXMLStr(, XMLStr) = ; // .ErrMsg = ""; (XMLStr <> ) (XMLStr <> "") XML = XML(); XML.(XMLStr); // = _LoadSettingsFromXML(, XML); // XML .ErrMsg = "_LoadSettingsFromXMLStr: " + ().; // .ErrMsg = "_LoadSettingsFromXMLStr: "; ; // XML-, XMLStr. // // : // - // XMLStr - , XML- // // , - // _SaveSettingsToXMLStr(, XMLStr) = ; // .ErrMsg = ""; XML = XML(); XML.(); // = _SaveSettingsToXML(, XML); // XML- XMLStr = XML.(); // XML .ErrMsg = "_SaveSettingsToXMLStr: " + ().; ; // XML- FName. // // : // - // FName - XML- // // , - // _LoadSettingsFromFile(, FName) = ; // .ErrMsg = ""; (FName <> ) (FName <> "") XML = XML(); XML.(FName); // = _LoadSettingsFromXML(, XML); // XML .ErrMsg = "_LoadSettingsFromFile:" + ().; // .ErrMsg = "_LoadSettingsFromFile: "; ; // XML-, FName. // // : // - // FName - , XML- // // , - // _SaveSettingsToFile(, FName) = ; // .ErrMsg = ""; (FName <> ) (FName <> "") XML = XML("windows-1251",,,, " "); XML = XML(); XML.(FName, XML); // = _SaveSettingsToXML(, XML); // XML.(); // XML .ErrMsg = "_SaveSettingsToFile: " + ().; // .ErrMsg = "_SaveSettingsToFile: "; ;
// - " " . // . // // : // . // () // = _(); XMLStr = ("_"); XMLStr <> _LoadSettingsFromXMLStr(, XMLStr) ; // - " " . // . // . // // : // . // () // _GetChangeInfo() XMLStr = ""; _SaveSettingsToXMLStr(, XMLStr); ("_", XMLStr); ; _(); // - "" . // . // // : // - - // () ("1 = " + _GetPrm(, "1")); ("2 = " + _GetPrm(, "2")); ("3 = " + _GetPrm(, "3")); ("4 = " + _GetPrm(, "4")); ("5 = " + _GetPrm(, "5"));
//////////////////////////////////////////////////////////////////////////////// // ; // //////////////////////////////////////////////////////////////////////////////// // // - " " . // . // // : // . // () // = .1 // - "" OK. // . // // : // - // () CheckInput() .(.) //////////////////////////////////////////////////////////////////////////////// // // . // // : // // : // , - // CheckInput() = ; ErrMsg = ""; // - // ******************************** // ErrMsg = "" // ReadSettingsFromInterf(); // = (ErrMsg) ; // . // // : // // LoadSettingsToInterf() <> // 1 = _GetPrm(, "1"); 2 = _GetPrm(, "2"); 3 = _GetPrm(, "3"); 4 = _GetPrm(, "4"); 5 = _GetPrm(, "5"); // . // // : // // ReadSettingsFromInterf() <> // _SetPrm(, "1", 1); _SetPrm(, "2", 2); (3) _SetPrm(, "3", 3) _SetPrm(, "3", ) ; _SetPrm(, "4", 4); _SetPrm(, "5", 5); //////////////////////////////////////////////////////////////////////////////// // // // . // // : // - . // : // , , // // SetMainSettingsDlg() = ; // <> // = ; // LoadSettingsToInterf(); // .() = . // = ;
// - "" . // . // // : // - - // () // = _(); _Assign(, ); _SetChangeInfo(, ); // = .("", ); .SetMainSettingsDlg() // _IsEqual(, ) // _Assign(, ); ; _()
_() _SetDefAttr() _GetPrmStrVal(, PrmName) _SetPrmFromStrVal(, PrmName, StrPrmVal)
Source: https://habr.com/ru/post/272455/
All Articles