background preloader

Developpement

Facebook Twitter

Visual Studio | MSDN. .NET Framework and .NET SDK Downloads. .NET Framework and .NET SDK Downloads. C# Xaml Windows & Android. Watch a Folder For Updates in WPF C# In this example I am using a file system watcher to detect updates in a Windows folder. If a new file is added to the specified folder then it will provide notification of it in a listbox and open it. And when some changes are made to the file then notification of that is also done and the modified file will be copied to another folder. If a rename of a file in the folder occurrs then notification also occurs in the listbox. Also if a file is deleted then notification of that also occurs. The file system watcher has options for all these purposes. The following example is mainly dealing with the images.

When an image is copy and pasted to a folder, it will get a statement in the listbox regarding that. When some modification is made to this image and it is saved, the statement regarding that will be put in the listbox and the file will be copied to another folder. Step 1: Create a WPF application Step 3: In the cs page, first declare the file system watcher, as in: Writing Notifications That Don’t Suck — Design/UX. Remember the Desktop Cleanup Wizard from Windows XP? It popped up regularly saying, “You have unused icons on your desktop.” To this day I have no idea what an unused icon is…and it probably gets my vote for worst notification ever.

Good notifications and error messages require care. They’re not necessarily hard, but they are often overlooked – to the detriment of your overall product experience. Not surprisingly, great notifications start with your product mantra, with an understanding – or at least a theory – of who’s using it, for what, and why. Do You Need a Notification At All? Sometimes there’s no need to bother the user. 1.

An error occurred. If a notification is useful, can you make it more so? 2. When I mute my Android phone from its lock screen, I get a notification: “Sound off.” 3. Something can be unexpected but still known. The app has already disappeared. 4. The right notification at the wrong time is disruptive, especially if it requires interaction. 5. 6. 7. 8. "Yoda Conditions", "Pokémon Exception Handling" and other programming classics. Just reading through some of the excellent answers to this question posed on StackOverflow.com by John K What programming terms have you coined that have taken off in your own circles (i.e. have heard others repeat it)?

It might be within your own team, workplace or garnered greater popularity on the Internet. Reposting some of the best ones below ... Yoda Conditions Using if(constant == variable) instead of if(variable == constant), like if(4 == foo). Because it's like saying "if blue is the sky" or "if tall is the man". by [zneak] Originally, yoda conditions might have been introduced to reduce the potential of coding errors in the form if (5 = count) which would be picked up at compile time.

Pokémon Exception Handling For when you just Gotta Catch 'Em All. try{ // do something}catch{ // catch em all} by [woot4moo] Egyptian brackets The style of brackets where the opening brace goes on the end of the current line ... if (a == b) { printf("hello");} by [computronium] Different kinds of bug reports.

Java

Shared Assembly Info in Visual Studio Projects - Random Musings of Jeremy Jameson. Yesterday I introduced the concept of linked files in Visual Studio solutions with a follow-up on my recommendation for configuring a custom dictionary to eliminate CA1704 code analysis warnings. Another practical application of linked files is what I refer to as "shared assembly info" -- referring to the assembly attributes that should be the same across all projects in the solution, such as AssemblyCompanyAttribute. To implement this, create a file in the solution folder named SharedAssemblyInfo.cs and then add a link in each project to SharedAssemblyInfo.cs. You can also move the linked SharedAssemblyInfo.cs into the Properties folder so that it sits side-by-side with the AssemblyInfo.cs that is specific to each project in the solution, as shown below. Figure 1: Linked SharedAssemblyInfo.cs files in a Visual Studio solution The AssemblyInfo.cs files typically have the following assembly attributes: AssemblyTitleAssemblyCultureGuid Here is a sample SharedAssemblyInfo.cs file:

Silverlight

WCF. VB. ASP.NET. WPF. C#