带有超链接的.net 控制台应用程序?

发布于 2024-07-30 06:25:36 字数 423 浏览 1 评论 0原文

是否可以 ? 关于如何进行的任何示例/模式或想法?

更新 - 这本质上成为一个文本浏览器,它根据提示上的各种命令显示各种信息表,例如

现在在浏览器中键入 url,而不是键入各种命令,例如

提示>命令 arg1 arg2 如果你可以在某个“列”/“行”中的文本上说“单击”,它将执行命令说提示

>commandX arg1,

它会更快/更容易

现在,在有人提到执行典型的浏览器/asp之前.net mvc/无论什么应用程序,我已经运行了,但遇到了一些限制,特别是。 访问网络文件。 现在已经使用读取文件等的服务代理服务来处理了,但是已经添加了许多扩展,如果您可以使用 mvc 模式将应用程序作为控制台提示符运行并添加,那么会更容易一些 !

如果只有文本是可点击的,它会使其更易于使用

is it possible ? any samples/patterns or ideas on how to go about it ?

Update -
this essentially becomes a text browser which displays various tables of information based on various commands on the prompt like typing the url in a browser

now instead of typing various commands like

prompt>command arg1 arg2
if only you could say "click" on the text in a certain "column"/"row" which would execute the command say

prompt>commandX arg1

it'd be somewhat faster/easier

Now, before someone mentions doing a typical browser/asp.net mvc/whatever app, i already have that running but have encountered some limitations esp. with accesing network files. etc. Now that's taken care of using a service-broker service which reads the file etc. but having added numerous extensions to it, it'd be somewhat easier if you could just run the app as a console prompt with a mvc pattern and add extensions to it etc. etc.

if only the text is clickable, it'd make it more friendly for use !!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

没企图 2024-08-06 06:25:37

如果您希望在控制台应用程序中具有可点击的元素,您可以从控制台访问鼠标。 当然,您必须自己为可点击区域构建逻辑。

http://cboard.cprogramming.com/windows -programming/38680-win32-console-app-mouse-input.html

you can access the mouse from the console, if you wish to have clickable elements in your console application. you'll have to build the logic yourself of course for the clickable areas.

http://cboard.cprogramming.com/windows-programming/38680-win32-console-app-mouse-input.html

裂开嘴轻声笑有多痛 2024-08-06 06:25:36

要了解它的外观,请获取链接的副本。 它是一种文本模式网络浏览器,可以在多种操作系统中正常运行。

For an idea of what it can look like, get your hands on a copy of links. It's a text-mode web browser that works just fine in several operating systems.

梦与时光遇 2024-08-06 06:25:36

假设没有鼠标,我将根据某些键盘触发器将 URL 作为新进程启动。

// this will launch the default browser    
ProcessStartInfo psi = new ProcessStartInfo("https://stackoverflow.com");
Process p = new Process(psi);
p.Start();

VB 语法:

// this will launch the default browser
Dim psi = New ProcessStartInfo("https://stackoverflow.com")
Dim p As Process = Process.Start(psi)

Assuming no mouse, I would just launch the URL as a new process based on some keyboard trigger.

// this will launch the default browser    
ProcessStartInfo psi = new ProcessStartInfo("https://stackoverflow.com");
Process p = new Process(psi);
p.Start();

VB syntax:

// this will launch the default browser
Dim psi = New ProcessStartInfo("https://stackoverflow.com")
Dim p As Process = Process.Start(psi)
梦中楼上月下 2024-08-06 06:25:36

窗口的外壳不支持可点击的超链接,所以不,这是不可能的。

您正在尝试做什么以保证在命令 shell 中需要超链接? 也许这个应用程序更适合构建为 WinForms/WPF 或 ASP.NET 应用程序。

The window's shell doesn't support clickable hyperlinks, so no, this isn't possible.

What are you trying to do that warrants the need for hyperlinks in the command shell? Perhaps this application would be better built as a WinForms/WPF or ASP.NET application.

无力看清 2024-08-06 06:25:36

我不知道“超链接”对您来说是什么,但在控制台应用程序的上下文中,您可以在

包含您希望用户按下的数字或字母(想象一个带有 3 个选项的简单菜单)

Press one option

1 - Open ServerFault
2 - Open StackOverflow 
3 - Open SuperUser

阅读行中 您有一个开关启动 IExplorer 进程示例并打开网页。

这就是您所谓的“控制台应用程序中的超链接”吗?

I don't know what a "hyperlink" is for you, but in the context of a Console Application, you can have numbers or letters that you are expecting the user to press

(imagine a simple menu with 3 options)

Press one option

1 - Open ServerFault
2 - Open StackOverflow 
3 - Open SuperUser

and in the readline you have a switch that start the IExplorer process for example and opens the webpage.

Is that what you call regarding "hyperlinks in a console application"?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文