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
How would one go about making a custom text editor? I am thinking of a visual studio- like editor where things other than text can appear within the text area, such as drop-down menus, buttons images etc.
For example,
This sentence is __ a word.
I need to be able to click the "__" and have a dropdown or window open in its place, much like visual studio allows you to select functions of classes and have some things auto filled in for you.
To my knowledge, this can not be achieved conventionally in windows forms or wpf. How would you go about this?
I have C#, C++ and Java knowledge and would like to make this a native application.
If you would like to do it in C++, you could look at the source code of Notepad++. It's a text editor written around the Scintilla editing component. It supports features such as auto-complete/tab-complete, function parameter hints, etc. It sounds like you want to do something similar, so I would say looking at the source code of Notepad++ would be a good place to start.
Note: As mentioned in some comments above, this is one way to go about it. There are other libraries like Scintilla, and also other ways of doing this. This is just the first one I thought of.
Okay, here are some other ideas. You might look at using Eclipse's text editing component (Java). You could also look at what SharpDevelop or MonoDevelop use (C#). Look around at various open-source text editors and see how they do it.
I have some experience of developing text editors and would like to share the same here . However mine has been on Java but still might help you take the decision . Well you havent really said if you are making the text editor for an any existing language or a new language.
My text editor was for a customized language . Hence i had to write the grammar of the language and only then make the text editor for that . To do so I used Xtext framework which is very useful for developing customized langauges and the tools like editors for the same . It has good support for the following
i) Syntax highlighting
ii) Dropdown buttons with content assists
iii) Excellent java integration
iv) Excellent IDE support as it can be installed as an eclipse plugin .
However it might be an overkill if you do it just for plain text editor ! ! !
Xtext official documentation
Related
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
First of all, I've searched like all the forums in internet and haven't found my ideal answer, SO before you mark it as duplicate question plz read the question.
We're creating an application which contains a simple visual studio RichTextBox.
The problem is it's too simple for our application and we need an advanced one!
So we tried some advanced components such as Telerik, DevComponents and ComponentOne enhanced RichTextBoxes,
But they don't seem to be our ideal control! and we REALLY need a RichTextBox which be just the same as the one Microsoft Word uses it.
For example: The Righ-To-Left capability for some languages like hebrew and arabic, creating tables, and an approperiate Paste function was some of the lacks which are in those components.
So we're desperately asking for your suggestion about an advanced RichTextBox component that offers just the same capabilities as the one Microsoft office uses and we'd appreciate your help.
EDIT:
I solved my problem by using EDOffice Viewer Component
Anyways, by closing this Question, you just ignored what u couldn't answer. n u could just admit that u weren't expert enough to answer this!
You can use microsoft word itself in your application. You can embed word document itself on the windows form, but required word to be installed in all the PCs where your application is running.
The other solution is, you can browser control. You can use jQuery and any jQuery rich textbox plugins which suits your needs.
Hey Go through the Given link RichTextBox Demo
It's so Simple to integarte with your Application,If you are using Web based application.
The links contain Source code also.
Cheers
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Where can I find a control for WinForms that will highlight source code pasted into it? I would like one that has syntax highlighting support for many different languages but if it only works with C# I would be fine with that also.
Scintilla.NET is probably what you're looking for
Just recently have found a nice control from codeproject Fast Colored TextBox for syntax highlighting.
The only issue with using Rich Text Box as highlighter is slow performance on coloring, in cases when the size of the document is big. For a medium size documents this issue can be fixed by delayed highlighting.
As Open Source alternatives, give a look to:
dotNetFireball
ICSharpCode.TextEditor from SharpDevelop
Add ICSharpCode.TextEditor assembly reference to a project, choose assembly and controls for Visual Studio Toolbox. After that, you can put control to the Form. Surprisingly, you will not see Property to choose syntax highlight schema. Instead of this, you have to use method SetHighlighting. String parameter sets highlighting schema from available schemas list. These schemas are embedded into the control.
How to use, change schemas and download sample, look following article
If you're willing to pay for a control, I highly recommend this one: QWhale Syntax Edit. It's got a ton of features, comes with source code, and supports a lot of languages. I use it myself for C#, VB.NET, SQL (MS & Oracle), and it's got everything that VS provides.
Not sure if there is any out of the box non-thirdparty solution to this.
But, have you looked at Actipro SyntaxEditor component. LinqPad, the ubercool linq tool uses it for syntax highlighting and intellisense.
Check out the AvalonEdit control. There is a good article on CodeProject explaining how to use it.
you can try this http://www.codeproject.com/KB/edit/SyntaxHighlighting.aspx
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 5 years ago.
Improve this question
I am building the documentation for our C# API containing:
A general overview and description of the current state as a doc/pdf file.
A class library API in a .chm file using Sandcastle.
Questions:
Should I merge these two into the same .chm file? What is a good way to merge them?
I need to exclude certain classes/packages. How can I specify that in SandCastle?
It generates documentation for the VB code and the Visual C++ code. How can I change this? Or should I leave it, knowing that I am only using safe code?
Where can I find HTML Help 2.x Viewer Path on my system?
Edit:
The comments I make above methods, fields and classes are not generated in the documentation.
What should I do?
I recommend that you use Sandcastle Help File Builder from Codeplex. You can easily include and exclude namespaces, but I am unsure how to go about excluding a single class. You can set the option to only generate documentation for public/protected classes, but I do not know if that will fit your scenario.
You can also target a specific language in SHFB, as to your second question.
Additionally, you can use MAML within SHFB for conceptual documentation, such as you mention as being in the doc/pdf file. You should be able to use Doc2Maml for to migrate your existing documentation. Doc2Maml is a part of DocProject, but it appears that you might be able to run it standalone.
Edit in response to comment:
Directions are for SHFB 1.8.0.1. I do not remember the exact way to do it in 1.7, but I believe it is similar:
Under "Comments" group in the Project Properties tab, click the ellipsis to the right of "NamespaceSummaries".
In the checkbox list in the top left, uncheck any namespace you want to exclude.
This is also the screen where you put namespace summaries in.
In addition to Sand Castle as mentioned above, I would also recommend looking at FxCop and StyleCop to help make sure your code and documentation is up to CLS Compliance standards.
Sandcastle Help File Builder (SHFB) itself has a .chm file where you can find the answers to questions like "how can I exclude certain namespaces or classes from the generated doc?"
You may think I know the answer and I am being snarky by not telling you. Not true. But I was skimming the doc last night and saw an entry on this very topic.
I don't know why you wouldn't just leave in the VB and C++ stuff; there may in the future be someone who uses a language that is (shockingly) not C# with your library. The language is normally settable by the help viewer, so C# devs can ignore the VB syntax.
As for merging, SHFB has a mechanism to add in arbitrary HTML in an arbitrary hierarchy. In the GUI it is here:
http://www.freeimagehosting.net/uploads/7de19ea568.jpg
Using this, you could convert the PDF/DOC to HTML and then just embed it in the .chm.
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
Is there a library that has a class to extract the text from a pdf file in c#.net? I've tried a few but documentation is terrible, so I haven't been able to get it off the ground. Also if it provides a class to extract images that would be a plus. Any suggestions? Thx in advance.
Also I need to be able to implement it into an existing application.
Have you tried PDFKit.NET? It has reasonable docs and some good examples. It is designed for a server environment, so it is a little expensive.
EDIT Here is an open source library on SourceForge called iTextSharp. It is free for open source projects. I haven't used it, but it looks promising. Here is a tutorial for it that has lots of code examples.
There are a couple of ways you can go here -- a lot of it will depend on whether you want to retain the formattting (i.e., paragraphs and other layout elements) of the original PDF.
If you're considering commercial solutions, we do offer two products that might meet your requirements. One is EasyPDF SDK which has single shot ExtractText() and ExtractText2() calls that pull text out of your PDFs as plain text.
Note that the output from these calls is pretty simplistic and you will lose a lot of the original layout elements. They're nice for simple text extraction but might not be great if your PDF contains tabular data.
If you're dealing with tables, a nicer alternative could be to pull it out as rich text instead. We a have a tool called EasyConverter SDK geared for business documents which does just that using a single function call.
With EasyConverter SDK, the layout of your original PDF will be retained.
Both support C# so feel free to check out the eval versions at www.pdfonline.com if you're interested. I do work for the vendor so do take this suggestion as kind of a mother loving her own child :-) I've been browsing stackoverflow.com for code snippets for a long time, but have only recently started posting, so if you have any questions with either API just let me know and I can help. Cheers!
Docotic.Pdf library can extract text and images from PDF files.
You can extract text from whole document of from some pages only. The library can extract plain text and also text chunks with coordinates.
You can extracted images from PDFs (as JPEG and TIFF files).
Here is a couple of samples for your task:
Extract text from PDFs
Extract images from a PDF
Disclaimer: I work for Bit Miracle, vendor of the library.
we've used snowbound software at work for image conversion. it apparently supports text extraction too. however, it's not free.
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
Can anyone recommend a good application that could be used to convert VB.NET projects to C#, without having to do too much manual work?
We've used Reflector to do small libraries manually, but some of the larger projects will be too slow and complex to do this manually.
You can use Lutz Roeders Reflector (http://www.red-gate.com/products/reflector) which can decompile whole Assemblies into Visual Studio projects. This way you can convert from ANY .NET Langauge into one of the supported languages of this program (C#.VB.NET,MC++,Delphi,Chrome)
Tangible Software do various converters, including VB to C#.
I've played with it a little bit as they're kind enough to give me a copy for free, but I can't say I've stress-tested it. When I've used it it's been fine though - certainly worth a try.
A few things to keep in mind...
1) Depending on how the VB.Net code was written, automatic conversion may or may not be 100% possible. VB.Net allows a "looser" coding style that would be ambiguous to C#. So, some manual intervention may be needed.
2) If the VB.Net code functions correctly, you may want to just leave it as VB.Net. Both VB.Net and C# projects can co-exist within the same solution.
The far best tool for this is Econ Netvert which can be found on CodePlex
http://www.codeplex.com/econnetvert
SharpDevelop has this feature, but I haven't used it enough to know if works reliably. It seems to be a pretty good otherwise, so it's worth a try though.
The best and fast converter I have seen so far is http://converter.telerik.com/
Nicely presented using RAD AJAX Controls.
Note: It converts only code snippets and not projects as a whole.
There's also the free online converters up at developerfusion :)
SharpDevelop is quite good, but at my company we've found VBConversions to provide a much more complete conversion. It's a commerical app though, but for the time saved over SharpDevelop it was a no-brainer for us.
As a specific example, one thing we found that SharpDevelop didn't convert correctly was VB indexes, which use curvy brackets. It seemed unable to distinguish between indexes and method calls so didn't convert the indexes to square brackets. VBConversions converted them fine. This one thing made it worth its purchase for us.
It looks like the Tangible Software product works very similarly to VBConversions.