//--------------------------------------------------------------------------- void __fastcall TEditorForm::GoToLine() { UnicodeString Str; if (InputDialog(LoadStr(EDITOR_GO_TO_LINE), LoadStr(EDITOR_LINE_NUMBER), Str)) { int Line = StrToIntDef(Str, -1); if (Line <= 0 || Line > EditorMemo->Lines->Count) { throw Exception(MainInstructions(LoadStr(EDITOR_INVALID_LINE))); } else { EditorMemo->CaretPos = TPoint(0, Line-1); } } }
//--------------------------------------------------------------------------- void __fastcall TWinInteractiveCustomCommand::Prompt( const UnicodeString & Prompt, UnicodeString & Value) { UnicodeString APrompt = Prompt; if (APrompt.IsEmpty()) { APrompt = FMTLOAD(CUSTOM_COMMANDS_PARAM_PROMPT, (FCustomCommandName)); } TStrings * History = CustomWinConfiguration->History[L"CustomCommandParam"]; if (InputDialog(FMTLOAD(CUSTOM_COMMANDS_PARAM_TITLE, (FCustomCommandName)), APrompt, Value, HELP_CUSTOM_COMMAND_PARAM, History)) { CustomWinConfiguration->History[L"CustomCommandParam"] = History; } else { Abort(); } }