C#编译的exe可以集成到网站中吗?

发布于 2024-07-27 03:02:23 字数 378 浏览 0 评论 0原文

我是编程初学者。 我刚刚制作了一个名为“猜谜游戏”的程序。 而且看起来效果很好。 我可以将其集成到网站中吗? 我使用的 CMS 是 Mambo。

=== 附加信息

感谢您的所有建议。

我仍然没有任何关于 Silverlight、WPF 和 Java Script 的背景知识,但我认为听起来不错。 我使用的是 Windows,并使用 Microsoft Visual Studio 2008 编写了“猜谜游戏”,它使用的是 Windows 应用程序表单。

是的,我想,目前我就顺其自然并开始学习 Silverlight 或 Java Script,以便我可以将其集成到我的网站上:-) 感谢您提供的所有意见:-)

干杯

I'm a beginner in programming. I've just made a program called "Guessing Game". And it seems to work fine. Can I integrate it into a website? The CMS that I'm using is Mambo.

===
additional info's

Thanks for all your suggestions.

I still don't have any background about Silverlight, WPF and Java Script which I think sounds good. I'm using Windows and I programmed my "Guessing Game" from Microsoft Visual Studio 2008 and it's using Window application forms.

Yes I guess, for the moment I let it be and start to learn Silverlight or Java Script so that I can integrate it on my website:-)
Thanks for all your input guys:-)

Cheers

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

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

发布评论

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

评论(5

信愁 2024-08-03 03:02:24

是的 - 一般来说,当你谈论软件时,一切皆有可能。 问题是,这会有多困难?

要理解这一点,您必须向我们提供有关“猜谜游戏”的更多详细信息,包括它是如何设计的、它的接口是什么、它的可扩展性如何,以及您准备如何更改或扩展它。

例如,如果它是一个Windows Forms GUI应用程序,那么它将很难集成到Web应用程序中。 如果是控制台应用程序,那么会容易一些。 如果您可以将其修改为作为 Windows 服务运行,那就容易一些了。 如果您可以修改它以接受来自网络的输入(而不是仅从键盘+鼠标获取输入),那就更容易了。

Yes - in general, when you're talking about software, anything is possible. The question is, how difficult will it be?

To understand that, you have to give us more details about "Guessing Game" including how it is designed, what it's interfaces are, how readily extensible it is, and how prepared you are to change or extend it.

For example, if it is a Windows Forms GUI app, then it will be diifficult to integrate into a web app. If it is a console app, then it will be a little easier. If you can modify it to run as a Windows Service, then a little easier. If you can modify it to accept input from the network (as opposed to getting input solely from the keyboard + mouse), still easier.

手长情犹 2024-08-03 03:02:24

您也许能够使用反射将程序集加载到 Web 应用程序中,但很可能答案是否定的。

最好的解决方案可能是用 JavaScript 重写游戏。

You may be able to use reflection to load your assembly into the web application, but most likely, the answer is no.

Your best solution is probably to re-write the game in javascript.

苍风燃霜 2024-08-03 03:02:24

你的问题的简短答案是现在。 我假设由于您正在运行 Mambo,因此您的 Web 环境是一个 LAMP 堆栈。 然而,从声音上看,您的“猜谜游戏”很可能是一个 Windows 应用程序。 对于编程初学者来说,您无法采用任何集成路径来让您的游戏在您的网站上运行。

但是,您可以采取以下途径,这将需要大量时间来学习。 我并不是说你不应该花时间学习,无论如何你应该花时间学习! 我只是想说明这样一个事实:这不是几个小时内就能完成的事情。

  • Silverlight - 允许您在客户端浏览器上使用类似于 WPF 的界面运行 C# 代码,并可以通过 javascript 与您的网站集成。
  • 让您的客户从您的网站下载它并在他们的 PC 上运行它。 这实际上相当简单,并且是您最快的选择,但听起来这不是您正在寻找的集成类型。

The short answer to your question is now. I'm presuming that since you're running Mambo you're web environment is a LAMP stack. However, you're "Guessing Game" is most likely a Windows application from the sound of it. For a beginner in programming, there is no integration path you're going to be able to take that will allow you to have your game running on your website.

However, here are avenues you can take, which will require a significant amount of time to learn. I'm not saying you shouldn't take time to learn, by all means you should! I'm simply trying to illustrate the fact that this is not something that is going to be doable in a couple of hours.

  • Silverlight - allows you to run C# code with a WPF like interface on your client's browser and can integrate with your web site through javascript.
  • Let your client download it from your website and run it off of their PC. This would actually be fairly trivial and would be your quickest option, but it sounds like it's not the kind of integration you were looking for.
空心空情空意 2024-08-03 03:02:23

独立的可执行文件不能直接集成到网站中。 不过,您有几个选择:

  • 允许您的用户下载可执行文件并在本地自行运行
  • 用 Ja​​vaScript 重写您的程序,使其直接在 HTML 页面内运行,尽管这显然可能涉及大量的修改
  • 使用 Microsoft 的 Silverlight 技术,允许您使用 C# 进行编码并生成类似于 Adob​​e Flash 的基于 Web 的前端。 您的程序逻辑应该保持不变,您只需更改 UI 代码。 事实上,如果您已经在前端使用 WPF,那么转换会更加容易。

A standalone executable cannot be directly integrated into a website. You have a few choices though:

  • Allow your users to download the executable and run it locally for themselves
  • Rewrite your program in JavaScript to have it run directly inside of an HTML page, though this could obviously involve a fair amount of reworking
  • Use Microsoft's Silverlight technology, which allows you to code in C# and produce a web-based frontend similar to Adobe Flash. Your program logic should remain the same and you should only have to change the UI code. In fact if you're already using WPF for the front end, the transition will be even easier.
薯片软お妹 2024-08-03 03:02:23

您仍然需要回答几个问题。

  1. 你的服务器运行什么? 如果不是 Windows,您的 exe 将根本无法运行,除非它与 Mono 或服务器操作系统的类似框架兼容。
  2. 你的“猜谜游戏”如何与用户互动? 如果是通过 WinForms GUI,您将无法在 Web 上使用该 GUI。 如果您的游戏是 WPF 应用程序,您最简单的方法可能是将其移植到 Silverlight 并在网页上提供它。

让常规 Windows 应用程序在 Web 环境中运行通常并不简单,因为在 Web 上您实际上是在浏览器中运行,而不是在 Windows 上运行。

There are several questions that you still need to answer.

  1. What is your server running? If its not Windows, your exe will not run at all unless it is compatible with Mono or a similar framework for your server's operating system.
  2. How does your "Guessing game" interact with the user? If it is through a WinForms GUI, it will you will not be able to use that GUI on the web. If your game is a WPF application your easiest route may be to port it to Silverlight and serve it up on a web page.

It is typically not trivial to make a regular windows application run in a web environment since on on the web you are really running in the browser, not on Windows.

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