|
Thanks! I will roll for my own. And I am very happy because I know C# language now.
Best regards
|
|
|
|
|
Member 13310103 wrote: Why do they not work for me? Most likely because you are doing something wrong. But unless you explain what you mean by "not work" it is impossible to give a useful answer.
|
|
|
|
|
Aug-03-2017
Hi everybody and thanks in advance.
I'm writing my own media player using c# and the windows media player.
It's all going ok while working in the VS2013 but when I tried to share the resulting .exe file, the application don't start, don't display anything, don't do anything...
Am I missing something..? Any ideas please...
Thank you all..
|
|
|
|
|
Have a look in the event log see if anything is being written there. That's generally the best place to start hunting for clues.
This space for rent
|
|
|
|
|
Hi,
As soon as you rely on external components (i.c. WMP) several things could go wrong: WMP may not be installed, or it may be disabled (maybe this[^] could help), or you are trying to use a WMP browser plug-in that isn't installed (possibly by using the WebBrowser Control).
As such possibilities exist, your code should be such that it gracefully degrades, so the least you should do is catch exceptions and report to the user in functional terms; what I tend to always do is include a log facility that reports to the programmer in technical terms. Furthermore, if you were to use some operation that may never terminate, you should figure out a way to give it a timeout anyway.
FWIW: if you access Controls on a thread that didn't create them, all kind of weird things may happen, and not necessarily in a reproducible way.
Hope this helps,
|
|
|
|
|
I believe you can also get to the Event-Logs in windows via Visual Studios Env; which is better, since it groups up items for you. The path I use is Server Explorer>Servers>[Computer]>Event Logs>Application>[Your App].
Ben Scharbach
Temporalwars.Com
YouTube:Ben Scharbach
|
|
|
|
|
Hi all of you...
Thanks for your replies, still can't figure out what's going on but yes, I'm looking into the log..
It's helping... thanks!
|
|
|
|
|
Hi, my office hire a vendor to develop MIS system for internal use. The system is develop and configured with Microsoft SharePoint and their code is written in C#.Net language. Everything is running fine but one thing that really concern me is the implication of wrong setting or functionality when we we ask them to update the new feature or fix any issue, the target feature/issue is developed or fixed. But their code is impact to the other module of the system that cause something wrong. I have discussed with them and found that they are modify some share function or code which work great for target request module but impact the function of other module which later on we found.
My question from here is: do anyone in here know any style or tool to help them to manage their code more efficiency so making the progress of updating some feature won't impact to the functionality of other feature. Thank in advance!
Best regards,
Kanel
|
|
|
|
|
All this is kind of vague: what's a specific example you have observed ?
Are you competent enough in C# and .NET architecture to understand the code base ? To judge how well it's put together ? Is it your job to deal with the code ?
The possible structural issue here ... your dependency on a 3rd. party's code which you can't maintain/fix yourself (evidently) ... well, that may be something you can't modify. And, the idea of giving the 3rd. party some magic tool that will change everything ... seems like a fantasy.
On a business level, do you have any form of leverage with the 3rd. party ? Are they willing, able, to change ? The best leverage, of course, is financial; can you take your business elsewhere; are there funds they have not been paid, yet, etc.
You'd really have to describe the full context of the business relationship to say much more.
«Differences between Big-Endians, who broke eggs at the larger end, and Little-Endians gave rise to six rebellions: one Emperor lost his life, another his crown. The Lilliputian religion says an egg should be broken on the convenient end, which is now interpreted by the Lilliputians as the smaller end. Big-Endians gained favor in Blefuscu.» J. Swift, 'Gulliver's Travels,' 1726CE
|
|
|
|
|
What i have found in here is when the vendor change/update one module to meet our requirement, there is an impact to the functionality of the other module in our MIS system. As talk with them, I found that the problem because they use the share code module that is why they change their code to fit with one module it is impact to the code in another module.
It is hard for me to raise to management for the support contract to fix an issue that is not produce during first system development but it is an issue of produced by another support task. I think if there is any method or tool that help them to manage their code efficiency so there is no impact from one module to another module when there is any change made in the code.
|
|
|
|
|
I don't think there is any such thing as a tool to fix bad design/programming. You need to get your management involved in this, it is a business issue not a technical one.
|
|
|
|
|
|
As Richard suggested you are suffering from bad design or probably undisciplined coding. There are various tools built into Visual Studio to help find dependencies, these have obviously not been used.
There are also various practices and strategies to avoid the situation you find yourself in. It is good and normal practice to create shared methods, what you are missing is the skill and discipline to support the application. You have a crappy vendor!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Don't know if your vendor is better or worse than average ("bug" wise); however, most "professionals" use "version control software" (VCS) that allows for maintaining a "history" of software changes so that one can always (or most of the time) "fall back" to a previous version of the "app" that worked.
"$ cost" is not a factor since there are open-source VCS: e.g. GIT, SVN.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Possibly a 3-rd party vendor like telerik. Use of the XAML Dictionary to group up the styles. Also, on the WPF Themes - Home[^] on CodePlex, there are additional toolkits that might help.
Ben Scharbach
Temporalwars.Com
YouTube:Ben Scharbach
|
|
|
|
|
The second time my program encounters this linq statement it changes the resolution of the application.
List<type> ZObjects = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(assembly => assembly.GetTypes())
.Where(x=> x.FullName.Contains("MyDataClasss") &&
x.Name.Substring(0,1) == "Z").ToList();
Can anyone explain why this would happen?
Thanks
|
|
|
|
|
Well, the first problem is what do you mean by "changes the resolution of the application". Also, what kind of application is this? Windows Forms, WPF, Console, ...?
On the surface, the only explanation is "not possible".
There is something else going on that's causing this, possibly very subtle, but it's not possible with the code shown.
|
|
|
|
|
It is a Windows Form application using DevExpress controls. I am running Windows 10 and a friend saw the same behavior on his Apple running a Windows emulator. Another friend did not see the same behavior on his Windows 7 machine. I am using a Surface and not in its highest resolution.
I am not sure how else to explain the action, but the form, which is maximized and takes up the full screen the first time its run shrinks to about 2/3's of the screen and shows maximized. If I click the normal / maximize button it toggles to non maximized and back, but never takes more than 2/3's of the display. Its like its in its own screen which is maximized at about 2/3's of the available display size. But the rest of my programs show underneath at their normal resolution.
I fixed the problem by using a different approach but remain interested in why this happened. I am trying to replicate it in a simple project that I can share but so far no luck. When I do I will post back to this thread.
Thanks
|
|
|
|
|
Do you mean that you get a different result the second time you run this statement to the first time you run it? If you do, the obvious answer is that the list of assemblies that are available at the second point are different to the first point. There could be many reasons for this, but they are all going to revolve around the fact that the application must be loading assemblies later on than the point you think it's finished loading them. As an example, your application might be using MEF and reacting to plugins being dropped into a plugin folder it's watching.
This space for rent
|
|
|
|
|
Hi. All i want to do is something like
...
foreach (string f in Directory.GetFiles(@"X:\someDir"))
{
Console.Write(f);
if (IsHardlink(f) == false) Console.WriteLine(" is real fileentry");
else Console.WriteLine(" is hardlink and the target is " + GetTargetName(f));
}
...
private bool IsHardLink(string filePath)
{
???
}
private string GetTargetName(string filePath)
{
???
}
I 'googled' for days, found tons of articles 'how to create hardlinks, junctions' etc, also many examples for 'get the linkcount of a given file" (the target), but nothing for my need.
Please help, give me advice, point me in a direction.
Thank you
|
|
|
|
|
Detecting a junction should be as simple as:
private static bool IsHardLink(string filePath)
{
var attributes = File.GetAttributes(filePath);
return attributes.HasFlag(FileAttributes.ReparsePoint);
}
Retrieving the target is more complicated, but Jeff Brown has a solution:
Manipulating NTFS Junction Points in .NET[^]
private static string GetTargetName(string filePath)
{
return JunctionPoint.GetTarget(filePath);
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
JunctionPoint deals with Directory.
My need is file symlink, espec HardLink, which means that the link resides on the same volume as the target but in another Directory.
|
|
|
|
|
With Windows all kinds of links are indicated by the FILE_ATTRIBUTE_REPARSE_POINT flag:
A file or directory that has an associated reparse point, or a file that is a symbolic link. To differentiate between file and directory links use the corresponding attribute flag. To check if a file is on the same drive (hard link), you have to resolve the resparse point to get the target (which you want anyway).
I have no solution for C# but the source of the article mentioned by Richard may contain useful information. A solution for C/C++ can be found at HowTo: Correctly read reparse data in Vista | Jochen Kalmbach's Blog[^].
|
|
|
|
|
For hard links, you can't do what you want. This Stack Overflow answer[^] explains why:
Quote: On NTFS all files are hard links. You can detect that a file has multiple hard links pointing to it, but there's no "real file" that it points to. You can think of hard links as just different names for the same file. So for example if you have file1.txt and you create a hard link file2.txt that points to the first file, both are hard links and the 'target' is the data on your disk.
What you can do, is detecting if a file is a symbolic link: c# - Check if a file is real or a symbolic link - Stack Overflow[^]
The quick brown ProgramFOX jumps right over the Lazy<Dog> .
|
|
|
|
|
I hope someone can help me abit. I have a customer that wants to sell his application only with a special tablet computer with windows as operating system. The application shall not be able to run on any other windows computer than the tablet that he is selling with the app. It's a very special project so please don't discuss if it is a good idea to bundle the app with the hardware.
My question is, how can I realise that? How can the app (C#, wpf) detect if it's the right computer?
For me this is a new area so I have no idea how this could work. How can I tell the application that this is the right computer? Where to store that information so that the app can compare during startup if it's still the same harware?
|
|
|
|