control a wpf from matlab by using a c# dll - c#

i would like to know weather it is possible to control some wpf application written in c# by using a c# dll out of matlab.
what i need is the possibility to start the MainWindow and i have to be able
to get some values into my controller.
What i found so far was things working from c# that use matlab, but the other way round seems not to be that much populatet, as i found nothing i could really use.
I allready tried to import a .net Library, but i dont seem to be able to open a external class from my dll.
So if you could help me on this it would be great.
Regards,
justSomeone

Ok, i did just find out, that i can also import my .exe file into Matlab instead of only dlls .
I am using the function NET.addAssebly('Path.exe') to do this.
Path.exe is just a symbol that it is directed to the place of the .exe file.
I achieved to be able to use my methods as i wanted i do have my instance of the class. So i am happy now. :D
But if you have other solutions which are more handy, dont hesitate to post them. There might still be interesting things to discover :)
Regards,
justSomeone

Related

How to pass images between C# and Ironpython with opencv (or Emgucv)

I'm working on a project which involves image processing being done in Python and finally the result must be displayed on a WPF UI. I've heard that it is possible to pass data (integer, string, ... etc) between C# and Python using Ironpython, but I couldn't find any solution for my problem. Can somebody help me out, I really appreciate it. Thank you !

Move data from one string to another

I am writing a calculator for a school project. I ran into a problem when parsing form in c# program using VBScript MSScriptControl.ScriptControl().Eval(). That is alright, except for logarithms. VBS cant do c# logarithms with custom base so I need to use an equation to reform it.
I need to get from log10(x) to (log(x)/log(10)) or from log(x, a) where a is base to (log(x)/log(a).
I've tried to search but I can't really find a way to grab two values and put them in a different way. And as I'm a little new to c#, I couldn't come up with better idea than RegEx
Thanks for help
If Eval in VBScript is your problem, try Mono.CSharp which has got Evaluator.Eval method and it pretty much Eval anything which you can in C#.
Here is the link to download David Ebbo's blog about Mono CSharp Compiler Service

How can I use GMap.NET dll in delphi?

I'm a C# programmer who use GMap.NET for C# for a long time!
Now I want to know if I can use its dll files in Delphi.
I've tried to import its dll files in a VCL Forms Application in Delphi EX3 and add GMapControl to a form. But I don't know how to use it now! For example GMapControl has lots of properties in C#. like Position, Zoom, etc. But now I can't see these properties in GMapControl that is imported into Delphi.
I'm looking for a way to use it in Delphi and if it's not possible, I would be glad to know this fact in order not to waste time on it anymore!
thanks in advance for any help.

Reading a File While Being Written to by Another Program(Windows)

So basically, I'm trying to read a log file from a game while that game is running in order to have my program react to it in dynamic ways. I know it's possible, as other programs such as Notepad(++) are able to do it. However, after searching for an answer, most of what I can come up with is only Linux related.
I have no idea as to how to go about this, help in doing so with either C++ or C# would be great. Even though I would prefer native C++ over C#.
The "native" winapi solution is CreateFile, and in particular its dwShareMode parameter.

Possible to inject resource files into .net assembly?

There's a .net program for students that I've been messing around with in Reflector and Reflexil, but it doesn't look like they can work with resource files. I want to replace the default background with a custom one. How feasible is this?
I've tried exporting the assembly as a C# project and maybe rebuilding with the resource files swapped, but a few classes won't decompile right when exporting and crashes Reflector when I try to view the full source code inside reflector (after clicking 'expand methods')
What type of applicaiton is it? WinForms, WPF, Silverlight, Web? You can do it with ILDasm round triping. If you let me know what type of app it is I'll post the steps you need to take.
Reflexil 1.3 is now able to handle resources.
Quite difficult, probably Hex Editor can help.
Resource Hacker can do it. Follow; Action > Add a new Resource
delphi.icm.edu.pl/ftp/tools/ResHack.zip
I just put out GrayWolf to edit programs, I don't have the ability to edit resource(s) (if you donate$:) yet
but I would think the easy change is to edit the program to load the background from disk (./back1.jpg)
I have others tools that would make it easy to change the background of the running program see
"Hacking .NET" at DefCon18
other tools "GrayDragon"
I have a payload that does just this, it is for DefCon19, but if you send me an e-mail...
Happy hunting

Categories