I'm using the fantastic project Script# (http://projects.nikhilk.net/ScriptSharp)
I can't seem to get the autocomplete feature in VisualStudio 2008 working
the .scriptlet files appear as plain text with no code formatting at all
the version of Script# I am using is 0.5.6
I am opening the samples project and looking at HelloWorld.scriptlet
Cheers
Sam
Yes, currently .scriptlet files don't have a custom editor, and as such are treated as regular text files.
In the next version of script#, the Scriptlet server control is going to work slightly differently. Two changes:
Its not going to support inline code. All code must be in a .scriptlet file if you want script code-behind.
The scriptlet server control will look for a .scriptlet file instead, and open it up when you choose to Edit Code from the script in design-view. At that point you'll get intellisense.
Of course over the long-term I actually want an editor experience for these. That is the desired implementation...
Related
I use visual studio at work but don't have it on my home computer, so I downloaded SharpDevelop. I recently found out visual studio is free for students anyway so I'll be using that from now on. However, while using SharpDevelop, I noticed that when you create a Label via the designer, the property that controls the text in that Label is not called Text like it is in visual studio, but I assumed it would be since they are both c#.
My understanding is that the designer is just a GUI version of XML code, and that it creates the XML code for you. If you navigate to that XML file, I thought maybe the name of that property was arbitrary and you could change it there, but that didn't work either.
Any thoughts?
It's correct that they are both c#, but probably one is WinForms and another is WPF. The designer use XAML that is an XML-based markup language developed by Microsoft. Instead of a Text property, the Label has a Content property, The reason for that is that the Label can host any kind of control directly inside of it, instead of just text. This content can be a string as well.
I'm trying to visit the webpage http://converter.telerik.com/ using a WebBrowser control in a WinForms application but the page contains script errors.
After ScriptErrorsSuppressed to True the main controls of the webpage are unable to load at this point i'm lost about using the WebBrowser control to this task so I've search other alternatives.
I've tried with the latest build of GeckoFX (29.0.X) from here: https://bitbucket.org/geckofx/
With the GeckoWebBrowser control the Telerik page loads perfectly but after pressing the "Convert" button from my GeckoWebBrowser the second "Textbox" gets crazy and is not properly displayed, so again I'm lost but I don't know what more alternatives I have.
In the past i've tried to use some builds of chrome for .Net but I was unable to compile them.
What I need to do to use the Telerik converter service using any kind of webbrowser from my app?
PS: Dependencies are not a problem for me, I just want to develop a personal application for my only usage to load/save snippets that I converted using the Telerik service accessing to its converter webpage from my app.
Personally I would take a look at SharpDevelop's NRefactory Library and see if I could utilize this in my application instead of using someone else's webservice which more than likely uses NRefactory as it's underlying engine.
The online version of the code converter is available at http://codeconverter.sharpdevelop.net/.
https://github.com/icsharpcode/SharpDevelop/wiki/Code-Converter
https://github.com/icsharpcode/SharpDevelop/wiki/NRefactory
About NRefactory:
ICSharpCode.NRefactory is freely available as a part of SharpDevelop IDE.
It is parser library for C# and VB.
It consists of a single Abstract Syntax Tree (AST) that can represent all constructs that are available in C# or VB (unlike System.CodeDom, which only represents constructs common to C# and VB).
By using the C# parser and a VB output visitor (or vice versa), you can do a code converter.
After parsing to AST, you can analyze and/or transform the AST and re-create source code from the (modified) AST, then re-insert the comments we saved from the parser into the output
For more info about NRefactory please see: sharpdevelop.net and NRefactory wiki.
You may try samples\NRefactoryDemo in the SharpDevelop source code to take a look how the AST parse source code.
Source: http://www.codeproject.com/Articles/262950/CodeConverter
I have an ASP.NET MVC application and I would need a Rich Text Editor which allows the user to add Code Snippets for HTML, JavaScript and C# codes.
Remember how Visual Studio formats such codes in term of indentation and colors. It doesn't have to be exact like what Visual Studio does but I mean just something that makes the reading of such codes easier for the user.
Something like a Syntax Highlighter for a Rich Text Editor.
Is there any free component that I could use?
I found this Rails plugin for CKEditor but it's not free: https://github.com/galetahub/rails-ckeditor
Thanks,
Quick google search, MVC helpers for CKEditor:
http://www.andrewbarber.com/post/CKEditor-Html-Helpers-ASPNET-MVC-Razor-Views.aspx
You can certainly use the ASP.Net Ajax control toolkits HTML editor or third party tools.
Following is the link to HTML editor that you might be already knowing;
http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/HTMLEditor/HTMLEditor.aspx
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/HTMLEditorExtender/HTMLEditorExtender.aspx
http://mvccontroltoolkit.codeplex.com/
http://richtexteditor.com/mvc/
http://www.obout.com is free for non commercial website.
I've begun using MonoTouch 5.x. I feel like I'm fighting NIB's to use inheritance.
I want to use inheritance. I want to use a designer to make my views. I want it all.
So I've been searching for a tool that generates xxx.designer.cs files like VS does it: inserting the controls in code on the fly when designing using IB. Reducing NIB's to a design-time feature.
As far as I can tell, this is the cleanest approach with the best performance that allows me to go full C#, "visual inheritance", etc.
Does anyone know of such an initiative? In any form or shape?
Thanks.
In Microsoft Visual Studio you are able to write an implementation of IVsSingleFileGenerator.
Which is then used as custom tool to generate files at design time.
Maybe there is a similar feature in monodevelop.
Feature explained below is available in Microsoft Dynamics AX (formerly known as Axapta), an ERP application. However, my question is related to Visual Studio 2010 and MVC 3 application. Please find my questions after this feature explanation.
Screenshot #1 shows a method written in X++ (language used in Microsoft Dynamics AX) using the MorphX editor. If I select a text within double quotes and right-click on them, I will get the options as shown in the screenshot. This is true if the text begins with an # character and is a valid id found in the label file.
If I click on the option Lookup Properties/Methods, a tool tip will appear showing the actual text associated with the selected label id. Here in this case the label id is #SYS67 and its associated label text is Transaction date. Refer screenshot #2.
If I click on the option Lookup Label/Text, the label editor will appear with the label id pre-filtered along with other languages of choice at the bottom section of the editor. I can change the translation text in different languages using the editor. Refer screenshot #3.
In Dynamics AX, the label texts are stored in text files with label id and separated by a tab. Label ids always begin with # symbol. Here in the example shown #SYS is the group prefix and the given number is a sequential index. Refer screenshot #4 that displays text found in an en-us label file.
I understand that this is similar to Resource editor in Visual Studio where the translation text are stored in .resx files for each language. I would like to do something similar for an ASP.NET MVC 3 application using SQL Server database as the data store for the translation text.
Here are my questions:
What would I need to create in Visual Studio 2010 to achieve this functionality so I can invoke the translation editor in the IDE? Would that be a plugin or extension?
Would a similar resource provider be possible to do in an ASP.NET MVC application, where I can just specify the label id within double quotes and have provider model fetch the data from database during runtime? Is the syntax Resources.MyResource.GetLabel("#SYS67"); the only available option in ASP.NET? Sorry, if the resources syntax is wrong.
Are there any similar tool set (plugin/extension) already available for Visual Studio?
I believe that one of the terms to do translation in ASP.NET application is making use of Resource Provider Model. Are there any other terms? I am interested to know the term of what I am trying to achieve so I can search on the web to read more about it.
Any inputs will be really appreciated.
Thanks in advance.
Screenshot #1:
Screenshot #2:
Screenshot #3:
Screenshot #4:
I'm going to jump in here and give you what I know. I apologize if it doesn't completely answer your question but I don't want to stray too far from what I am familiar with and thus give you bad advice.
From the way you describe your issue, it seems that you could use the resource files (RESX) for translations, the issue is more that you want to know how to edit them in a manner that is user friendly. Further, some users may want to edit the translations on the web.
To answer this part of your question, I would recommend that you look at this article:
http://blog.lavablast.com/post/2008/02/07/RESX-file-Web-Editor.aspx
The author seems to have a similar issue as you and the conclusion the author arrived at was similar to what you are thinking about. The source code is provided so you could get a head-start if you wanted to pursue this method.
If you are going to pursue rolling your own editor, I would suggest that you choose one interface and stick with it. Otherwise you will be increasing your development time on something that isn't your actual product. Since you want the web for some users, I would suggest you would stick with the web for everyone. However, if you really want to pursue an plugin for Visual Studio, I would recommend that you put as much code into a central business logic layer as possible so that your presentation layers don't take up much of your time.
As for currently-available options, I don't think any of the following are Visual Studio plugins, but they all do a good job at working with localization:
http://www.redpin.eu/index.html
http://www.lingobit.com/products/index.html
http://www.sdl.com/en/language-technology/products/software-localization/sdl-passolo.asp
If you want to learn more about the terminology and practices of localization, I would recommend the following site:
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/localization/localization.aspx
If you want to store information in a database instead of a .resx file, here is a resource that will show you how to do it:
http://msdn.microsoft.com/en-us/library/aa905797.aspx