IconReference = new IconReference(Path.Combine(systemFolder, "taskmgr.exe"), 0) JumpList.AddUserTasks(new JumpListLink(Path.Combine(systemFolder, "taskmgr.exe"), "Open Task Manager") Var systemFolder = Environment.GetFolderPath() var jumpList = JumpList.CreateJumpList() Nice touch! A little polish there.Īlso easy to do with the Windows 7 APIs in the Windows API Code Pack. Jeff also adds some JumpLists to launch Task Manager or Resource Monitor on right-click as well. ((MainWindow)sender).SetTaskBarStatus((int)_counter.NextValue()) _counter.CounterName = "% Processor Time" Private readonly PerformanceCounter _counter = new PerformanceCounter() ((MainWindow)sender).SetTaskBarStatus((int)(available * 100)) Var available = (double)(_totalPhysicalMemory-_computerInfo.AvailablePhysicalMemory) / _totalPhysicalMemory Private void WhenTimerTick(object sender, EventArgs e) _totalPhysicalMemory = _computerInfo.TotalPhysicalMemory Protected override void OnStartup(StartupEventArgs e) Then he just sets up a little System.Timer love and sets the Progress Bar values appropriately for Memory. State = value < _settings.Red ? TaskbarProgressBarState.Paused : TaskbarProgressBarState.Error Var state = TaskbarProgressBarState.Normal To update the Taskbar (Superbar) Progress Bar he wrote a little helper because he wanted the colors to be green, yellow or red depending on the value of the CPU usage or Memory usage: public void SetTaskBarStatus(int value) MessageBox.Show("Sorry, but this app only works on Window 7.", "Aw snap!", MessageBoxButton.OK, MessageBoxImage.Error) Note that it IS very possible to make apps that work great from XP to Windows 7, but these apps are little Windows 7 showcases, so you can see why he'd want to check for this: if (!TaskbarManager.IsPlatformSupported) Pete Brown from my team has a great write-up on Showing Progress in the Windows 7 Taskbar with WPF 4 on his blog.įirst, since his apps are specific to Windows 7, he checks first to make sure it's OK to continue. NET 4 makes it even easier because it includes the new TaskbarItemInfo class that lets you do this from XAML. ) The Windows API Code Pack makes it easy.ĪSIDE:In fact, WPF on. Why would Jeff be so down on himself and say the code is "lame" when clearly people were (are) going bananas and downloading these little utils? Well, because it's so darn easy to do, this was likely the source of Jeff's intense guilt. Next, I returned to CodePlex and saw that it had 4152 downloads! Congrats to Jeff for being so "lame!" ) Then that tweet got picked up by (which I've heard of and whole gave credit to Jeff) Life Rocks 2.0 (which I've never heard of and who gave credit to no one) and then Lifehacker (which I have heard of and who "via'ed" Life Rocks). ![]() I visited his CodePlex site and saw it had 11 downloads. NET-based utilities out there asking for little else but our undying admiration and gratitude. Saw your Win7 features post yesterday, so whipped this up last night and posted it on codeplex this morning:įor years Jeff has lived the mantra "Talk is Cheap, Show Me the Code." And he does, with some of the most inspired little. ![]() See picture at left, in between his two "lame" creations."įirst, I did a post earlier this week called " Light it Up: List of Applications that use new Windows 7 Features." A day or two later I got an instant message from my former-roommate and part-time belay Jeff Key ( on Twitter ) (actually, that's all a complete lie, but, Jeff and I are friendly acquaintances for many years and have each other on IM) that said: ![]() Let's also make it complete clear that Jeff Key rocks. Here's what happened, but more importantly, we'll talk about the code. ![]() It's funny to watch things go viral, even just a little viral on the Internet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |