C# File Browsing w/ Checkboxes - c#

Ok, so this question kind of builds on my last one. I am trying to build a "file browser" but it will do other things.
What I am trying to accomplish:
Have a tab dedicated to listing files just like "Browse Files" except I want to be able
check certain files and directories. I also want the functionality of "Browse Files" as
change location.
Get value's from checkboxes to apply elsewhere.

The question's kinda vague. We really need a basic implementation to build on or we might be giving you bad advice.
That said, here are some links that might help you get started:
SplitContainer control (in the toolbox)
ListView control (in the toolbox)
Get File Icon used by Shell

Related

making a TreeView of our own file explorer

I'm trying to get a file explorer on c# and I have found nothing about this. Is c# provide a file explorer already ready to work?
If not, is TreeView a good idea to create mine? Have you got some link to perform this?
Thanks in advance for these informations.
C# Doesn't provide file explorer tree as it is, but if you want to create a dialog for selecting the folder you can use FolderBrowserDialog(full dialog for folder selection)
However if you want to create one, yes, It is easy to do it with WPF TreeView.
As a hint
Take TreeView, write HiearchyDataProvider which provides files and folders and templates for each node to display icons and so on
P.S.
Simple google search shows a lot of ready-samples

What is 'TextFile' and where it is uses in WPF project

i want to know about the use of 'TextFile' item in wpf project-
1)I am Create a project in VS2010 .
2)write click on project(Or click on 'Project Tab in MenuBar')-->select 'Add New Item'--> in open dialog box,appear 'TextFile' option. see in picture.-
That's just a text file. It does nothing.
As with any other file, you are free to include it in your project as a resource, and perhaps load it at runtime via GetResourceStream() or something.
To expand on the previous answer, text files can be very useful in a number of ways, especially if you have multiple people working on a project. Adding a todo list or instructions to other developers in the project tree itself makes them more obvious.
It also helps to keep them up-to-date when using code revision control.
(Would have commented but not enough reputation... the previous answer sums it up)
I add 'TextFile' in project ,now problem is ,How to access it(Or Open it) on Button click Event.

How i can edit Elysium Theme from current project?

How i can edit Ellysium Theme from current project?
Need to edit all colors and other feaches!
I can't find place in my project, where i can edit soure code of current theme. this
All works great, but in standart Elysium controls.
thanks.
I'm not sure of what the exact filename is for the ellysium theme Resource Dictionary but if you open you App.xaml you should find its path reference under your Merged Dictionaries to find it. Once you have that, you can just open the file and edit the values accordingly.
If you're using Expression Blend this tasks is even easier since you should have the Resource Dictionary listed under your "Resources" tab (top right by default) and can individually edit each Style Template from there. Hope this helps.
(You might encourage them to address this under their actual CodePlex project since last time I checked all it had for Documentation was something like "Coming Soon" or something like that...)

How to avoid all code nodes to expand on project opening?

I have a C# project and some code pages have few thousand lines of code. I really like the idea of nodes in the code editor. I use it a lot and create many regions. But every time I open the project, all the nodes are expanded and I have to minimize them manually. It gets really annoying.
I have not found any help about this on internet nor in the options of VS. There must be a setting somewhere.
In the Options dialog onder Text Editor --> C# --> Advanced, there is an option "Enter outlining mode when files open". This should be checked.
In the IDE, from the Tools menu click Options. Alter default Outlining using
TextEditor->C#->Formatting->Advanced
There is a checkbox here you can use to set defaults for Outlining. This is VC# 10 Express but similar in other versions.
If you try the suggested change, you may be disappointed. According to this C# PM, who's responding to a similar complaint:
It is a bit confusing, but the
behavior you're seeing is intended.
The feedback that we received with VS
2003 was that we should persist the
outlining state of source files after
they have been closed and then
reopened. The option in Tools |
Option now effectively means what the
default behavior should be for a file
that you have never opened before. It
has no effect on files that you have
opened previously, since those files
already have a persisted outlining
state.
I don't want be a smart ass here, but often if you have that huge code in one file, you have more than one logical unit and might be able to (ans should) split it. (Single Responsibility Principle).
For my share, I don't like the regions because they are hiding code and I prefer to see all of it.

Syntax Highlighting in a ListBox

I've searched the web and I can't seem to find anything that will work for me. I've seen plenty of discussion, and even some fairly extensible open-source tools, for code editors that provide line numbers and syntax highlighting.
Here's my dilemma...
I'm working on a "digital code review" project in C#.NET that allows users to specify source files, add them to a particular session, and other users can make comments and line references to the files being reviewed.
Basic requirements:
Must be written in C#.NET
I don't need to be able to edit the text in the text box
Users need to be able to select a line (or multiple lines), to make line references.
It seems to me that I need some fancy implementation of a ListBox control (not a drop-down list) that has some OwnerDraw capabilities to add line numbers and syntax highlighting. Unfortunately, I haven't had any luck putting it together myself, and I can't seem to find a control that's already been written or a reference on how I might be able to accomplish this.
Any suggestions??
I suggest to try ScintillaNet. It has syntax highlight and line numbers (and so much more). However you cannot select more lines only one selection at the time.
I would use a text box control for this, just make it read only and put the line numbers in when you load it. Just a quick question, when you say:
Users need to be able to select a line (or multiple lines), to make line references.
Is this in a web app? How do the users indicate that they want to create a reference (some button somewhere?). Easier to do on windows with a context menu. Where does the user reference to the code go, how does it appear to other users viewing the code?

Categories