Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it possible to make C# app use external scripts? Luke if i make shell application and i want to allow pepole add their own scripts (type command to add script from file and then execute it by command (example: 'calculator') I'll accept all ways to do this.
Not sure if this is what you are looking for, but by using the dynamic language runtime in .net you can integrate dynamic languages like ruby into your application. You could then write scripts in that language and interpret them in your app. I have used this to implement a plug-in system for one application, in which plug-ins (scripts) could be dynamically (at run-time) loaded into it without the need to recompile everything.
Two options come to mind:
Roslyn: It's now possible to embed C# scripts using the Roslyn scripting API. There are some samples in the GitHub wiki to get you started.
DLR: Scripting via the DLR is also possible. Here's an example that illustrates how to run an IronPython script from inside your C# app. However, my (highly subjective) impression is that Roslyn is generating more developer interest than IronPython/DLR these days.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I was reading about the .NET framework and I read that ".NET provides language interoperability", and I also read the answer to the question What is language interoperability (basic concept) in .net framework?, but I don't have any idea about how to use this feature practically.
Create a simple project using C#, make a simple class and compile it. You will generate a .dll.
Then create a project using VB and import/include the one you compiled where you used C#. VB won´t take care of your C# code, but it can manage the class you created.
How? Because .NET is compiled in a common language. Does not matter if you have used C# or VB to generate the code.
Interoperability is a framework feature. Is rare that you need make use of this for small projects so I undestand you don't find a real way to carry out. But it is that simple as all what you do with C# in .NET you can reuse if you decide code in VB in the future or for some parts of a project.
In practice programmers decide to code in one language. But reusability is already there.
Feel free to ask what you need.
https://stackoverflow.com/a/43417187/7733724
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
What are the possible ways to convert a windows form application (c# , .net) to a cross platform project?
My GOAL is have a project that can run in both Linux base os and windows.
I really like .net but it's not compatible with all OS (for example Linux) because of .Net Framework installation.
what is your suggestions?
As #paqogomez pointed out, IronPython does not take away the need for some sort of .net since, as it's stated on the website http://ironpython.net/ : "IronPython is an excellent addition to the .NET Framework, providing Python developers with the power of the .NET framework."
Since your goal is to run your existing winforms-c#-application on both, windows and linux, you might get away by just using mono (http://www.mono-project.com/).
If this doesn't work out (please refer to http://mono-project.com/Compatibility for compatability issues), you could manually rewrite your existing C# application in pure python. But then, it might well be possible to use any other unmanaged, managed or scripted language which can be used on both systems and which is either easier to translate manually or for which even automated translators exist (however, I don't know if there are any for C#).
Thinking about the last point, I did a quick websearch for "c# cross compiler" which shows some esoteric results which might be interesting for you depending on your project type.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I know this is a difficult issue, but I'm asked to build an application that allows users to scan pages (from an Automatic Document Feeder) , and upload them into an FTP server. And I should integrate this into a PHP web application.
Any programming language will work, I just want to know how.
I have found a C# library called WIA. Is it the best option I have ?
Can I build a browser application (with Flash or Java) that can interact with the scanner ?
Thanks !
Perhaps you can check out the following sourceforge project called phpSANE.http://sourceforge.net/projects/phpsane/
Essentially need to setup and use SANE to work with your scanner. You can then use or modify (cause it's open source) phpSANE running on your web server which will then pick up the files and save them to an FTP server.
I'm not sure how you might automatically detect documents put into the Automatic Document Feeder, perhaps there is a way SANE is notified and you can get this use this to call a PH script?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am building a quiz program which can be personalized but I want to add a GUI to it. I have seen some pieces of software which implement C and C# into Python. Should I use Tkinter to make the GUI or should I use C or C#. Can you also please tell me a good book for beginners which I can use to learn Tkinter/C/C#.
Thanks.
When writing a program, you should avoid using multiple languages unless you really need to, especially for a simple GUI program.
In this case, learning C/C# specifically for the purpose of creating a GUI seems like overkill to me -- not only would you need to learn an entirely new programming language, but you would need to learn how to use whatever GUI library is popular from within C/C#! You'd be right back where you started -- having to learn how to use some library.
Instead, Python has several great GUI libraries that you can use. Tkinter is bundled by default within the Python standard, but there are other GUI libraries that are available, like wxPython or PyQt. Here's a comparison of different Python GUI libraries.
If you want to use .NET GUI components you'll have to switch to IronPython. You cannot use the standard CPython implementation and build a .NET GUI.
With the standard CPython you can use Tkinter, but I would suggest to take a look at PySide (or PyQt4). It's much nicer to work with, and it looks better.
PyQt4 Tutorial
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How can I make an interface for console applications to make them look like edit.com under Microsoft's operating systems. Target languages are C, C++ and C#.NET.
Have a look at curses:
e.g.:
http://sourceforge.net/projects/curses-sharp/
That would be based on a very simple framework which writes directly to the video to draw the underlying shadows, drop down menus, etc, not alone that, since 'Edit.com` would be written in assembler for speed in relation to drawing, this is quite ancient by today's standards, you can however take a look at PDCurses which will enable you to do this kind of thing.
The neat beauty is, PDCurses is compatible with the unix equivalent of Curses.
But, really, today, it is all about GUI and Windows....
What kind of application are you trying to do?
IIRC, from my old days, there was an object orientated framework for this using TurboVision, which has a port available with open source now, see this wikipedia entry on this TurboVision.
Today, console applications are either old DOS applications emulated more and less in Windows, or command-line interpreters.
Anyway, if you really want to do an editor, use the System.Console class in the System NameSpace and use the SetCursorPosition method to write what you want where you want
The edit.com window you are showing appear to be developed with Turbo Vision, an old console gui library written by Borland many years ago.
Borland put the software in public domain and release its C++ sources. There is also a porting to Pascal, developed by the community, called Free Vision.
Unfortunately ,I don't think there is a porting or a wrapper to dot.net, so you have to write your own. Or, at least, you can look at the sources to get inspired...