Load files using thread C# wpf [closed] - c#

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
I have a project in C#, it's called "Music Manager". When you choose a folder, the program will show all of music files in this folder, but if you have so much files in folder, the program will be crashes.
I think the solution is use thread, but I don't know how to use it? If anyone know, please help me. Thanks!

First of all, you should specify the error message, but I don't think a thread would help you in this one, because i guess it crashes for an outofmemory (as it happens when there are a lot of files).
I've had a quick look at your project and i see you have a List populated from DirectoryInfo. Do you need all the fileinfo in a List? I suggest you use just a List and store only filename/path.
P.S. How many files do you have in your directory when it crashes? Just curious

Related

How to create exe file to Program.cs file while running another program in C# [closed]

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 4 years ago.
Improve this question
I am a student and I am during my final project.
In my project I give an option to edit code and run it. The problem is, that I do not know how to create a new exe file after changing the code.
I would be happy if you can help me !!!
Thank you very much!
You can compile code into assemblies and then execute them as such.
This example should cover what I mean:
https://csharp.hotexamples.com/examples/System.CodeDom.Compiler/CodeDomProvider/CompileAssemblyFromFile/php-codedomprovider-compileassemblyfromfile-method-examples.html
You can access the compiled assembly from CompiledResults and run it directly in the current AppDomain like a script of some sorts or you can store it to an .exe

What happens when i press the run button in visual studio [closed]

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 only know html and css.
And now I need to study c#
Can someone please explain what happens when i click the run button on my visual studio?
When does translating the souce code into machine code happens?
when does visual studio create an .exe?
Does this executable is already MSIL code already?
I already read some introduction of c#. But still i dont understand a thing.
I only need idea on how things works.
Thank you so much.
When you press the run button, it compiles and build the assemblies and executable file from the source code.
You can find your exe in the bin folder.
Check this link

Is it possible to run an EXE from MVC site? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to call an exe from a MVC site?
I've seen this link. (I'll try it tomorrow in the morning when I get in the office)
Stackoverflow link
However I wanted to know if I cam barking up the wrong tree.
I have a 3rd party app that provides us a stand alone exe. Instead of sending this exe to x amount of clients. I would like to keep that exe on my web server so I can control who can use the exe.
Is this is viable option?.
You might find the responses to this old question helpful. If you are trying to run an exe file within your application, I think this would be the approach to take.
If I have understood your question wrong, and you are trying to provide users with a link to download an application, or a link to launch an application that already exists on their computer, then you will probably want to look into the html <href> tag.

Programmatically accessing TFS history [closed]

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
I have a solution under TFS source control and had written some sample code using an external library that was deleted a few months ago. I am certain that the code was checked in before that class file was deleted.
I am able to manually browse to previous versions of even deleted files and copy old code but the number of check-ins is massive since then.
Is there a way to programmatically access TFS history using C# so I can automate the process of "Find in historic/deleted files"?
I know people have written scripts in PowerShell for TFS but I'd prefer to write a C# utility if it is possible. Any hints in the right direction would be appreciated.
Shai Raiten's Blog is great for learning the TFS API.
For getting file history - read this post:
http://blogs.microsoft.co.il/shair/2014/09/10/tfs-api-part-55-source-control-get-history/

Add new winforms into a big application after shipping to the customer [closed]

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
Lets assume that we have developed and shipped an application to many customers. We would like to add new screens to that application without removing and re-installing from customers computers the entire application. We just want to send a DLL or an EXE file to the customer, then they will put that file and place it to application folder. Then application will find and recognize that DLL or EXE and let user use that WinForm?
How can I do that? Would you please give me an idea?
professional and complete solution is MEF if you want something simple, you could use something like Assembly.LoadFrom(filePath) and iterate types in it. check for if the type is derived from System.Windows.Forms.Form (you should use typeof(Form).IsAssignableFrom(loadedType))
This problem is why web-applications are so popular. A single install for everyone. Change without re-installing in multiple locations.
This problem is why SAAS exists. The true solution to this problem is get off the winform-gui model.
Think bigger!

Categories