0

Samsung to develop software in-house

While the mobile phone market has long been based upon continuing hardware development, things are now changing and companies are having to keep up. The focus of the smartphone market is now moving towards software, rather than hardware and Samsung are taking note of this change. The South Korean technology company have decided to increase their game in order to be able to successfully compete with American technology giant, Apple. To do this, Samsung need to alter the way they create their products, by developing their own software as well as hardware.

Samsung have begun to recruit software engineers, mostly in India, with the intention of being able to start developing their own software and thus staying at the top of the market. While many people consume data through Apple products, such as talking to business customers on their iPhones or playing partycasino.com on their Mac computers, Samsung still have a good share of the mobile phone market. They are hoping that they will be able to create software to compete successfully with the iPhone, which is known for always being ahead of the game.

This move by Samsung to not only develop their own hardware, but their own software as well is a positive one for the company. They have announced that they are now open to mergers, as they are looking to combine with high-quality research and development companies.

The fact that Samsung’s own software ‘Bada’ has failed to become popular by consumers in the past, means that they have been running most of their devices on Google’s Android. Their plan now is to continue with this arrangement as well as working with several other software types and developing their own in the future. After Samsung overtook Nokia as leading phone manufacturer, their confidence no doubt increased and these new developments are only set to raise their prominence in the smartphone market.

0

Creating Info Tip Handlers with .NET

I have just added an article to the CodeProject that discusses how to create Info Tip shell extensions in .NET. These extensions are used by the shell to customise the tooltips shown over shell items.

ShellInfoTipHandler

The article shows how you can use SharpShell to very quickly create these extensions, you can find it at: http://www.codeproject.com/Articles/527058/NET-Shell-Extensions-Shell-Info-Tip-Handlers.

So just how easy does SharpShell make creating Shell Info Tip Handlers? The answer is pretty easy indeed. The code below shows the full implementation of a Shell Info Tip Handler that changes the tooltips for folders to show the name of the folder and the number of items it contains:

/// <summary>
/// The FolderInfoTip handler is an example SharpInfoTipHandler that provides an info tip
/// for folders that shows the number of items in the folder.
/// </summary>
[ComVisible(true)]
[COMServerAssociation(AssociationType.Directory)]
public class FolderInfoTipHandler : SharpInfoTipHandler
{
    /// <summary>
    /// Gets info for the selected item (SelectedItemPath).
    /// </summary>
    /// <param name="infoType">Type of info to return.</param>
    /// <param name="singleLine">if set to <c>true</c>, put the info in a single line.</param>
    /// <returns>
    /// Specified info for the selected file.
    /// </returns>
    protected override string GetInfo(RequestedInfoType infoType, bool singleLine)
    {
        //  Switch on the tip of info we need to provide.
        switch (infoType)
        {
            case RequestedInfoType.InfoTip:
 
                //  Format the formatted info tip.
                return string.Format(singleLine
                                       ? "{0} - {1} Items"
                                       : "{0}" + Environment.NewLine + "Contains {1} Items",
                                       Path.GetFileName(SelectedItemPath), Directory.GetFiles(SelectedItemPath).Length);
 
            case RequestedInfoType.Name:
                
                //  Return the name of the folder.
                return string.Format("Folder '{0}'", Path.GetFileName(SelectedItemPath));
                
            default:
 
                //  We won't be asked for anything else, like shortcut paths, for folders, so we 
                //  can return an empty string in the default case.
                return string.Empty;
        }
    }
} 

As you can see, all of the COM interfaces are hidden away and handled for you, there is no ugly pinvoke code and no use of strange structures imported from Win32. SharpShell handles all of the plumbing for you.

2

SharpShell

SharpShell is a project that I have recently uploaded to CodePlex. This class library, and set of tools and samples, is designed to be a framework to enable rapid development of Shell Extensions using the .NET Framework. In time it may grow to contain some functionality for using Shell entities within managed applications (for example, allowing an Explorer context menu to be built dynamically for a given path).

Anyway, the code is all at sharpshell.codeplex.com. You can also see a nice article on the CodeProject that show’s how to create a Shell Context Menu Extension using C#, the article is at: .NET Shell Extensions – Shell Context Menus.

Screenshot1_ExampleIconHandler

Above: An example of a Managed Shell Extension. This sample colours the icons for dlls differently, depending on whether they are native dlls or assemblies.

So far, in the repo on CodePlex there are also samples for Shell Icon Handlers (which customise icons in Explorer) and Shell Info Tip Handlers (which customise tooltips). Both of these extension types are fully supported in the current dev version and will be released in the next few days. There’s also a partially functioning Shell Property Sheet implementation which will be delivered in the subsequent version. The Shell Property Sheet introduces some particularly strange code – 32 and 64 bit C++ dlls are embedded as manifest resource streams and extracted as needed to provide access to C++ function pointers – ouch.

More to follow – check out the project and the article.