Mini BASIC IDE from C# [closed] - c#

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
How could I approach this and are there any libraries out there to simplify it?
Users need to be able to write “Macros” in a VB like language which is stored in a plain text file.
These Macros are then attached to a given button in a C# App and executed when the button is clicked.
This is to be a windows forms app (could be WPF) using .net 4
I need to support popping up forms with controls on them such as text boxes, dropdown lists, labels, buttons & possibly a picture boxes too.
Basic functions like IF THEN ELSE, *, -, %, +, /, =, contains, yes no cancel message boxes…
Passing data from one script to another and getting any data returned.
I know what you are thinking tell them to install VB.net free edition! But I can’t as I need to add some bespoke functionality to extend the language also that allows communication with an in house system providing read and write to and from the system via existing COM objects.
Also the hosting c# app needs to contain many buttons each with the own script attached.
If this wasn’t bad enough the uses need to be able to write their own scripts so ideally some form of basic IDE is needed also.
Any suggestion?

Various technologies come to my mind which allow to implement parts of your requirements.
1.) Use Lightswitch for RAD forms
If you want to have a simple tool for rapidly building simple UIs you could use Lightswitch.
You could provide your own assemblies added as references in Lightswitch that act as a code Framework for the LightSwitch Application.
2.) Windows Workflow Foundation RuleEngine
The RuleEngine allows you to modify/store businessrules. You can bind your internal assembly to the RuleEngine and then you have the possbility to script code based on the bound assembly.
The rules are simple "If" "then" "else" statements.
http://karlreinsch.com/2010/10/18/wf-rules-unleashing-the-rule-engine-within-dot-net/
3.) Load XAML dynamically
With WPF you can serialize/deserialize UIs and load them from an file during runtime. With Blend or own tools you are able to create UIs and bind them to your business logic.
See http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/a53ff197-8703-4c6c-8726-45570304fb7b/

In the case your describing, I would suggest looking into already existing scripting techniques (perhaps such as LUA). You can then hook this sort of script up to existing code (such as an API you have built to leverage the functionality you desire).
The reason I suggest using an existing scripting system is because it has already been tried and tested, and it means you don't have to define a new language yourself and build the parsing engine.

Related

Will a .cs file work in a .java software? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
So I'm thinking about making a GUI. My friend told me he knew how to do it in C#, so I went that method in setting the GUI up. Is there anyway to get a C# made GUI usable in java?
Yes you can. You absolutely should not.
I once wrote a perl application that used a VB GUI that i made, they communicated via OLE.
This is probably the worst construct you could ever do so don't :)
Not practically. You can't just give the C# compiler a Java file, or vice versa.
If you're really determined though, you can use IKVM to expose Windows Forms to Java.
There's also J# but it's not being actively developed anymore.
I think you should learn how to make a GUI in Java if you are coding in Java. However if you want both of C# and Java to interoperate, then you need a new layer which acts like a bridge between a C# program runs on CLR and Java program runs on JVM. The following link has a good explanation about how to call Java routines directly from a C# program over runtime bridges:
http://www.devx.com/interop/Article/19945/1954
You need to bind something on GUI with an appropriate logic. Such as File>New menu selection might exist for creating a new file. Therefore this menu command needs to be bound to a logic. You can not run away without writing these logic, the event handlers or without defining some other functionalities inside of GUI classes. Strictly speaking, you always need to write a lot of code on presentation layer which consists of GUI classes. So that, your friend does also need to build up the presentation layer itself. Because a useless user interface is called a prototype not a program. And also do not forget about that runtime bridges significantly decrease the performance. Eventually, I suggest you to go and learn how to make GUI in Java.
No! It would not work. Java's GUI classes are different, so even if you renamed your .cs files to .java files and made slight modifications, the code would not work.
No. It won't work. You can't compile Java and C# into a single executable package.
No. The way Java and .NET interact with the GUI is totally different.

.net 2.0 winform control in asp.net [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to use .net winform control in asp.net.I wrote the control and displays in asp.net.Is it necessary I have to create a package and deploy in client machine? or since .net framework available in client machine without package it will work.
While this is possible, by hosting a UserControl as Active-X - I generally don't recommend it for a variety of reasons:
It's basically an Active-X control. There have been a lot of security concerns around this technology.
It will only work in Internet Explorer. Internet Explorer has been hemorrhaging market share over the past few years.
Generally it's possible to achieve what you want using JavaScript + HTML. What specific example can you think of where current web standards cannot solve it?
You can learn more about using a WinForm UserControl as an Active-X object here.
In reality, you are better off using browser-based technologies, such as HTML, JavaScript, SVG, etc. If that isn't good enough - then alternative technologies like Silverlight are a much better choice. It's cross-platform, more modern, and designed to run in the browser.
This blog explains how to do it, especially how to package the dll and deploy it (using gacutil).
And, obviously, you will have to have the .net framework on the client computer.
However, in the 2010's I'd would highly suggest you to use more manageable tools, like SilverLigth, Flash, or event Html + Javascript (jQuery is your friend)
You can not do what you are wanting to do. WinForms controls have no way to render as HTML.
You can't use a WinForms control in ASP.Net.
ASP.Net controls render to html on a webpage. WinForms controls run in a message loop on the client machine.

How to write another Debugger for .NET using CLR [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to implement another debugger (language) for .NET (it's just for academic reason, so that it can implement just a part of a language). I myself like to implement NS2 (network Simlator 2) script for .NET in which anybody can write ns2 script and debug it with .NET
I read this article in stackoverflow and it is far from what I'm looking for.
Here is the requirement
have some predefined keywords (e.g: for, while, if ...)
check the correct form of the statements (e.g: for(start;end;counter){commands} ...)
diffferent colour for different types of statements
ability to add to any IDE (e.g: implementatin like add-in or as a dll or ...(I have no idea))
many other thing that is not necessary for now
How can I do this?
Update : I'm not sure that you got my point, take a look at this, it is very close to what I am looking for.
It will not be an easy task. However: The Dragon Book is probably a good place to start (assuming you've got sufficient computer science background for a compiler theory book to make much sense to you). Compiler Construction: Principles and Practice is also a good text.
You'll want to compile to CIL (common intermediary language). This handy wiki article outlines the CIL instruction set. Debugging your intermediate code against the CLR... well, that's where the StackOverflow article you've linked will come in handy =)
That'll cover your first two bullets (and consume a big chunk of your life).
The next two are different issues, but the easiest way to 'make it go' would probably be to define a syntax for an existing text editor, and set up a macro in the program to call your compiler. I'd recommend TextPad, though I'm sure opinions on a configurable general-purpose text editor will vary among the community ;)
Designing a full IDE with all of the features you've come to know and love in your environment could be quite a task ... or you could try to build an eclipse plugin. Personally (assuming you can design your language and learn something from it), I'd just stick with syntax highlighting in TextPad.
There is more and more interest in this area and in fact there is an active project by Microsoft Research that is looking at this on building a common infrastructure to build compiler (and debugger) for custom languages targetting .NET
http://cciast.codeplex.com/
I have used the infrastructure myself but not an expert in compiler technology. Hope this gives you a good starting point and you may find the discussion forum useful to share idea with like minded people.

How to build a web design program in C# [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I would like to build my own html gui editor, but I can't figure out the basic structure for the application.
Does anyone know of any sample code for building an editor? I would like to use Visual Studio 2010.
The part I don't know is how to build a wysiwyg area to display a page that is being designed.
Any help is appretiated
Most editors are based on the WebBrowser control that comes with Visual Studio. For more info see:
http://www.codeproject.com/KB/miscctrl/csEXWB.aspx
Or if you are more adventurous there are also solutions involving WebKit and Gecko browser engines discussed here:
Is it possible to Embed Gecko or Webkit in a Windows Form just like a WebView?
There is also MSHTML : http://msdn.microsoft.com/en-us/library/aa753630(VS.85).aspx
The editor provided with MSHTML offers
a "what you see is what you get"
(WYSIWYG) HTML editing environment
with a rich set of capabilities. It
can be activated from C++, Visual
Basic, and script. You can use a
number of techniques to customize the
MSHTML Editor. These techniques are
available in C++ only.
Here is a .net wrapper: http://www.itwriting.com/htmleditor/index.php
The HTMLEditor is written in C#.
Unlike the .Net webbrowser control, in
versions prior to .NET 2.0, this is
not an ActiveX control. Rather it is
an ActiveX Document. Even if you are
not interested in MSHTML, you may be
interested in the HTMLEditor as an
example of advanced .NET / COM
interop. It's also not suitable for
embedded web browsing - use the
ActiveX for that.
However, it is a pretty cool control.
It allows editing as well as read-only
display, supports advanced features
like print templates and edit
designers, gives easy access to the
HTML DOM, and lets you load HTML
simply by assigning a string to a
property.
SO user leppie made a very nice editor xacc.ide.

Improve the design of GUI/website [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
So i am using visual studio 2008, asp.net 3.5, with the basic toolkit provided.
Now i have made the gui which a lot of functionality but the design is very basic.
and looks too old.
I need to give it a new look, a new feeling new designs....
like the gridview, the buttons the textboxes, the menus look basic...
this is not working for me.
Please let me how should i go about doing this.??
1) i have herd about tool kits but dont kno which ones are good..(dont want the really expensive ones) but if it is really good my company is ready to spend.
2) will the new VS 2010 or asp.net 4.0 make a difference.
3) The ajax toolkit or silverlight toolkit is any good?
4) i also need to show Charts and graphs now, currently using MS charts.. but now i need
which is good.
Your best bet is to ask very specific questions at a more appropriate forum.
For ideas on designs, look for examples online and do something similar to what you like.
http://www.thecssawards.com/
http://www.csselite.com/
For questions on how to implement a specific design in html/asp.net/whatever, post a very specific question here.
For UI guidance on how to make something specific look better, post a question on http://ui.stackexchange.com. Include a SMALL screen shot of the applicable controls (not the whole page, just the part you're asking about, or at least highlight the part you're asking about).
.NET 3.5 vs .NET 4 will have no real effect on the design of your site. Whether your choose HTML or Silverlight will have a huge effect, but neither is generally better for all sites and switching between them basically means rewriting everything, so you wouldn't do it just for design reasons.
I assume you are referring to UI control libraries.
Some of the commercial libraries that I know off and widely used include:
Telerik RAD Controls
Infragistics
DevExpress
They all have a good range of controls from Menu to Charting.

Categories