Search Results

Search found 35291 results on 1412 pages for 'start menu'.

Page 3/1412 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Not able to create screenshot of when menu is active [closed]

    - by gotqn
    Possible Duplicate: Screenshot of active window doesn’t work I am using Ubuntu 12.04 and I am searching for a program that will let me to do screenshot of my menus too. Also, it will be very useful if I am able to "cut" only part of the new screenshot and save it as a new image. At this moment, when a menu is shown (for example I click on my clock and the calendar is shown) the "print screen" button is not working. This happens to with applications launchers menus in the left navigation panel. On windows I am using Gadwin Pro. Is there any alternative on Linux?

    Read the article

  • Can't boot into ubuntu 12.04, grub menu wont show

    - by Marcus
    Today i downloaded the ubunto 12.04 64bit and installed it on a 115gb partition next to a 15 gb swap alongside windows 7. (I have 2 drives. One with only windows (500gb) and another with a partition for (250gb) windows and (115gb) the ubunto and (15gb) swap partitions.) But after the installation i can't find out how to run ubuntu. It just run windows. I read that it should show a grub menu. i tried: Holding both shift keys at boot up. Running the cd-ubundu and edit the grub file. Also pressing the esc and some funtion button during boot. Nothing seems to work.

    Read the article

  • How do I underline parent menu item but not children?

    - by Steven
    Using Wordpress menu "builder", I get the following code: //Pseaudo code <ul id="main-menu-main"> <li class="menu-item"><a></a></li> <li class="menu-item current-menu-ancestor"> <a></a> <ul class="sub-menu"> <li class="menu-item"><a></a></li> <li class="menu-item current-menu-item"><a></a></li> </ul> </li> </ul> // and I use the following CSS #menu-main-menu a:hover { text-decoration: underline; } #menu-main-menu .current-menu-ancestor a { text-decoration: underline; } The problem with my last css line, is that all a elements under current-menu-ancestor are underlined. I only want the link in current-menu-ancestor to be underlined. I think this should be pretty simple, but right now my head is not focused :-/ The full code for parent / child looks like this: <ul id="menu-main-menu" class="menu"> <li id="menu-item-401" class="menu-item-first menu-item menu-item-type-post_type menu-item-object-page current-page-ancestor current-menu-ancestor current-menu-parent current-page-parent current_page_parent current_page_ancestor menu-item-401"> <a>menu 1</a> <ul class="sub-menu"> <li id="menu-item-444" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-415 current_page_item menu-item-444"> <a> sub 1</a> </li> </ul> </li>

    Read the article

  • Set item.selected in ASP.NET Menu Control

    - by BillB
    ASP.NET newbie here. When on a page I'd like to set the corresponding menu item to selected. My approach is this: On Home.aspx.cs: Menu menu = (Menu)Master.FindControl("Menu1"); if (menu.Items.Count > 0) { menu.FindItem("Home").Selected = true; } Trouble is, menu.item.count == 0. My menu is bound to a sitemap, if that matters. Thanks, Bill

    Read the article

  • Submenu within menu within menu ?

    - by abhishek mishra
    On pressing menu button , I have 2 options : Add & more. On click of more i have 3 options : Organize ,Export & Exit On click of Organize i want other 5 options. On click of more i get my submenu. But i want other 5 options on click of organize.How do i proceed??? My code in parts is as follows : XML file------------------------------- <item android:id="@+id/more" android:title="@string/moreMenu" android:icon="@drawable/icon"> <menu> <item android:id="@+id/Organize" android:title="@string/Organize" /> <item android:id="@+id/Export" android:title="@string/Export" /> </menu> </item> android:id="@+id/add" android:title="@string/addMenu" android:icon="@drawable/add"/ Java------------------------- package com.tcs.QuickNotes; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.Toast; public class ToDoList extends Activity { Menu menu; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.todolist); } public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.layout.categorymenu, menu); return true; } public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.more: Toast.makeText(this, "You pressed more!", Toast.LENGTH_LONG).show(); //(What needs to be done from here) return true; case R.id.add: Toast.makeText(this, "You pressed add!", Toast.LENGTH_LONG).show(); return true; } return false; } public boolean onPrepareOptionsMenu(Menu menu) { return true; } }

    Read the article

  • Clean Up the New Ubuntu Grub2 Boot Menu

    - by Trevor Bekolay
    Ubuntu adopted the new version of the Grub boot manager in version 9.10, getting rid of the old problematic menu.lst. Today we look at how to change the boot menu options in Grub2. Grub2 is a step forward in a lot of ways, and most of the annoying menu.lst issues from the past are gone. Still, if you’re not vigilant with removing old versions of the kernel, the boot list can still end up being longer than it needs to be. Note: You may have to hold the SHIFT button on your keyboard while booting up to get this menu to show. If only one operating system is installed on your computer, it may load it automatically without displaying this menu. Remove Old Kernel Entries The most common clean up task for the boot menu is to remove old kernel versions lying around on your machine. In our case we want to remove the 2.6.32-21-generic boot menu entries. In the past, this meant opening up /boot/grub/menu.lst…but with Grub2, if we remove the kernel package from our computer, Grub automatically removes those options. To remove old kernel versions, open up Synaptic Package Manager, found in the System > Administration menu. When it opens up, type the kernel version that you want to remove in the Quick search text field. The first few numbers should suffice. For each of the entries associated with the old kernel (e.g. linux-headers-2.6.32-21 and linux-image-2.6.32-21-generic), right-click and choose Mark for Complete Removal. Click the Apply button in the toolbar and then Apply in the summary window that pops up. Close Synaptic Package Manager. The next time you boot up your computer, the Grub menu will not contain the entries associated with the removed kernel version. Remove Any Option by Editing /etc/grub.d If you need more fine-grained control, or want to remove entries that are not kernel versions, you must change the files located in /etc/grub.d. /etc/grub.d contains files that hold the menu entries that used to be contained in /boot/grub/menu.lst. If you want to add new boot menu entries, you would create a new file in this folder, making sure to mark it as executable. If you want to remove boot menu entries, as we do, you would edit files in this folder. If we wanted to remove all of the memtest86+ entries, we could just make the 20_memtest86+ file non-executable, with the terminal command sudo chmod –x 20_memtest86+ Followed by the terminal command sudo update-grub Note that memtest86+ was not found by update-grub because it will only consider executable files. However, instead, we’re going to remove the Serial console 115200 entry for memtest86+… Open a terminal window Applications > Accessories > Terminal. In the terminal window, type in the command: sudo gedit /etc/grub.d/20_memtest86+ The menu entries are found at the bottom of this file. Comment out the menu entry for serial console 115200 by adding a “#” to the start of each line. Save and close this file. In the terminal window you opened, enter in the command sudo update-grub Note: If you don’t run update-grub, the boot menu options will not change! Now, the next time you boot up, that strange entry will be gone, and you’re left with a simple and clean boot menu. Conclusion While changing Grub2’s boot menu may seem overly complicated to legacy Grub masters, for normal users, Grub2 means that you won’t have to change the boot menu that often. Fortunately, if you do have to do it, the process is still pretty easy. For more detailed information about how to change entries in Grub2, this Ubuntu forum thread is a great resource. If you’re using an older version of Ubuntu, check out our article on how to clean up Ubuntu grub boot menu after upgrades. Similar Articles Productive Geek Tips Clean Up Ubuntu Grub Boot Menu After UpgradesReinstall Ubuntu Grub Bootloader After Windows Wipes it OutChange the GRUB Menu Timeout on UbuntuHow To Switch to Console Mode for Ubuntu VMware GuestSet Windows as Default OS when Dual Booting Ubuntu TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips VMware Workstation 7 Acronis Online Backup DVDFab 6 Revo Uninstaller Pro Daily Motivator (Firefox) FetchMp3 Can Download Videos & Convert Them to Mp3 Use Flixtime To Create Video Slideshows Creating a Password Reset Disk in Windows Bypass Waiting Time On Customer Service Calls With Lucyphone MELTUP – "The Beginning Of US Currency Crisis And Hyperinflation"

    Read the article

  • How to Skip the Start Screen and Boot to the Desktop in Windows 8.1

    - by Mark Wilson
    For almost everyone who made the upgrade, Windows 8 proved to be something of a disappointment for one reason or another. Windows 8.1 (or Windows Blue) was released to address many of the issues users had complained about including reintroducing the ability to boot straight to the desktop. Being able to boot to the desktop rather than the Start screen is something that people have been clammering for ever since the first preview versions of Windows 8 were unveiled. There have been various third-party tools released as numerous workarounds used to get around the problem, but now it is an option that is built directly into the operating system. You’ll need to have downloaded and installed the update in order to proceed, but once you have done this, things are very simple. When you have Windows up and running after the upgrade, right click an empty section of the taskbar and select properties to bring up the newly named “Taskbar and Navigation properties” dialog.  Move to the Navigation tab and look in the “Start screen” section in the lower half of the dialog. Check the box labelled ‘Go to the desktop instead of Start when I sign in” and click OK.    

    Read the article

  • Windows 7 automatically rearranges the start menu

    - by Brice
    I've seen so many messages on how to rearrange the Windows Start Menu and none mentioning the real problem in doing so which has been around since XP at least. I go to ProgramData/Microsoft/Windows/Start Menu and have a day making everything the way I want. For one thing, their Maintenance menu, the Accessories menu and the Administrative Tools menu, I like to put under a Tools folder that I've created. And they seem to move OK. However, within a few hours, I see some of the shortcuts have been moved back or copied back and a new copy of these folders suddenly appears again on my Start Menu at the root. This is maddening and no one seems to even notice in all the tutorials I've read. Anyone know how to change this behavior?

    Read the article

  • WPF - Bind Menu Item

    - by Miguel
    Hello, I am creating a menu and binding the menu items ate runtime as follows but I am not able to make it work. I am creating the menu as follows: Menu menu = new Menu(); menu.Items.Add(new MenuItem { Command = new PackCommand(), Header = "Pack" }); DockPanel.SetDock(menu, Dock.Top); content.Children.Add(menu); And I am implementing ICommand: public static class PackCommand : ICommand { Boolean CanExecute(object parameter) { return true; } void Execute(object parameter) { Packer packer = new Packer(); packer.Run(); } } I am not sure how to bind the menu item. Why CanExecute? Shouldn't it always? I only want to run packer.Run when the buttom is clicked. I think I should implement ICommand but I am not even sure I should do this? Could someone please help me out? Thanks, Miguel

    Read the article

  • How to build unlimited level of menu through PHP and mysql

    - by Starx
    Well, to build my menu my menu I use a db similar structure like this To assign another submenu for existing submenu I simply assign its parent's id as its value of parent field. parent 0 means top menu now there is not problem while creating submenu inside another submenu now this is way I fetch the submenu for the top menu <ul class="topmenu"> <? $list = $obj -> childmenu($parentid); //this list contains the array of submenu under $parendid foreach($list as $menu) { extract($menu); echo '<li><a href="#">'.$name.'</a></li>'; } ?> </ul> What I want to do is. I want to check if a new menu has other child menu and I want to keep on checking until it searches every child menu that is available and I want to display its child menu inside its particular list item like this Home ........

    Read the article

  • Joomla changing menu from Component

    - by Bobz
    My component is always shown on the Default menu, I want to be able to change the menu from my component. I have found that: $currentMenuId = JSite::getMenu()-getActive()-id ; Returns the current active Menu item However, $menu-setActive( $menuitemid ); Does not do anything, Whether I use, $app = JFactory::getApplication(); $menu = $app-getMenu(); $menu-setActive( $menuitemid ); or, $menu = JSite::getMenu(); $menu-setActive( $menuitemid ); How can I change the menu? As I do not want it to always be shown on the default menu.

    Read the article

  • ASP.Net 4.0 and tableless menu control

    - by nikolaosk
    One of the issues I really like to read and learn is client side technologies. I am an ASP.Net guy at heart but I find CSS particular useful and I have been blogging about CSS in my other blog. Have a look here if you want for some interesting posts on CSS I believe designing web applications and sites according to web standards. I do not think designing our websites with tables is correct. Tables should be used for what they are good at doing, Display tabular data . So if we are in charge of our...(read more)

    Read the article

  • How can menu bars that require a right click be activated?

    - by Amos Annoy
    I've noticed that NetworkManager only has a single, left or right, click menu and no longer has an About menu option to show it's splash screen. In fact all the top bar mini short cut icons have been amputated and crippled leaving them with no rights. This severely impacts on our custom aps., similar to FireFox bookmarks, which can no longer be right clicked to bring up a context menu. It is possible to disengage FF's File|Edit|... menu bar from the top by running it in safe-mode so the menu bar is resident in a window, restoring right clicks, but our aps. do not have "safe modes". How can right clicks in menu bars be restored? reference

    Read the article

  • How can menu bars that require a right click be activated like Ubuntu versions <10.10?

    - by Amos Annoy
    I've noticed that NetworkManager only has a single, left or right, click menu and no longer has an About menu option to show it's splash screen. In fact all the top bar mini short cut icons have been amputated and crippled leaving them with no rights. This severely impacts on our custom aps., similar to FireFox bookmarks, which can no longer be right clicked to bring up a context menu. It is possible to disengage FF's File|Edit|... menu bar from the top by running it in safe-mode so the menu bar is resident in a window, restoring right clicks, but our aps. do not have "safe modes". How can right clicks in menu bars be restored? reference

    Read the article

  • Android: changing drawable states of option menu items seems to have side-effects

    - by pjv
    In my onCreateOptionsMenu() I have basically the following: public boolean onCreateOptionsMenu(Menu menu) { menu.add(Menu.NONE, MENU_ITEM_INSERT, Menu.NONE, R.string.item_menu_insert).setShortcut('3', 'a').setIcon(android.R.drawable.ic_menu_add); PackageManager pm = getPackageManager(); if(pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) && pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS)){ menu.add(Menu.NONE, MENU_ITEM_SCAN_ADD, Menu.NONE, ((Collectionista.DEBUG)?"DEBUG Scan and add item":getString(R.string.item_menu_scan_add))).setShortcut('4', 'a').setIcon(android.R.drawable.ic_menu_add); } ... } And in onPrepareOptionsMenu among others the following: final boolean scanAvailable = ScanIntent.isInstalled(this); final MusicCDItemScanAddTask task = new MusicCDItemScanAddTask(this); menu.findItem(MENU_ITEM_SCAN_ADD).setEnabled(scanAvailable && (tasks == null || !existsTask(task))); As you see, two options items have the same drawable set (android.R.drawable.ic_menu_add). Now, if in onPrepareOptionsMenu the second menu item gets disabled, its label and icon become gray, but also the icon of the first menu item becomes gray, while the label of that fist menu item stays black and it remains clickable. What is causing this crosstalk between the two icons/drawables? Shouldn't the system handle things like mutate() in this case? I've included a screenshot:

    Read the article

  • How to increase contrast of Windows 7 Menu Item highlight

    - by Barry Kelly
    The Windows 7 menu item highlight effect is quite subtle - on my machine, menu items go from light grey to having a light blue shading. This makes it quite hard to tell at a glance which exact menu item is highlighted at any one time. You can see an example (from Firefox) here: Is there an easy way to increase the contrast of the menu item highlight effect, without having to go all-out to an over the top high-contrast color scheme?

    Read the article

  • How to enable default Start-menu in Windows XP

    - by jthomascarey
    The default Windows Xp Start menu has been disabled by the system administrator where I work. When you right-click on the Start-menu, and select properties, the only option is the Classic Start-menu. I work in IT and have the complete freedom to change whatever I want, I just don't know how. How do I enable to option to select the default Start-Menu in XP?

    Read the article

  • Start Time & Calculated Column Wonkiness in a SharePoint Event Calendar

    - by _zekeMouseOver
    I was creating some custom rollups on some of our event calendars and came across a very odd bug when trying to grab only the date component of the built-in Start Time field. One's first inclination will be to create a calculated column and give it the formula... =[Start Time]... and then assign its output type to be "Date Only." This works well until a user adds an All Day Event. For reasons unexplainable, the All Day Event flag causes your =[Start Time] to display the date minus one day. Here is an example of this in action:  Start Date and Time, Duration, Start Date Value and Start Day are all calculated fields. Notice how the Start Date and Time (=[Start Time]) is reporting 6:00PM of the previous day. The Start Date Value (=[Start Time] - Output Type: Number) confirms this (.75 = 6:00 PM.) Curiously enough, the Duration (=[End Time]-[Start Time]) is properly reporting the duration between 12:00AM and 11:59PM. Why? I don't know. Perhaps it's somehow bound to the regional settings on the site, but I'm not interested in changing a global site setting for the sake of one calculated field.With this information at our disposal, our calculated column to display the date part of the start date needs to be modified to add one day to the [Start Time] field if an All Day Event is selected. To determine this, we use the Duration above to assume the item is an all-day event and change our formula to be:=IF(TEXT(([End Time]-[Start Time])-TRUNC(([End Time]-[Start Time]),0),"0.000000000")="0.999305556",[Start Time] + 1, [Start Time])This will work, but what happens when the user de-selects the "All Day Event" checkbox? The duration stays the same, but all other values begin reporting the correct time: Since our formula above is strictly based on an expected duration, it will add one to the correct date, causing the date 5/11/2010 to appear. Notice though that the raw value of the start time (in this case) is a non-fractional number (40,308) whereas the all-day event was being represented as 6:00 PM (.75) of the previous day. We can use this to add one more nested branch of logic to our calculation:=IF(TEXT(([End Time]-[Start Time])-TRUNC(([End Time]-[Start Time]),0),"0.000000000")="0.999305556",IF([Start Time]=ROUND([Start Time],0),[Start Time],[Start Time]+1),[Start Time]) I feel somewhat... dirty about having to resort to this kind of calculation in what SHOULD have been a simple =[Start Time] to extract the date part of the Start Time field, but there you have it. Make sure to shower extra longer after having used it.

    Read the article

  • Restore monitor detection to one only or restore start menu to bottom

    - by Mark
    I have a co-worker that is no longer able to see his start menu. He used to have it pinned to the left edge of his screen. I tried to troubleshoot it a bit and discovered if we do Windows + R then "cmd" [enter] the command prompt opens (but we don't see the start menu or run box), meaning the start menu is somewhere, just off screen. Restarting doesn't help. Is there some way to force Windows to think it only has a single monitor? It seems to "think" it has two but there's only one and we can get the Start menu back. Or, is there a way to restore the start menu to the bottom? Additional info We are able to right-click the desktop for display settings, etc. We can also get into Windows Explorer (via Ctrl + E) so if we need any of that to restore settings we can do it.

    Read the article

  • Restore monitor detection to one only or restore start menu to bottom [Windows 7]

    - by Mark
    I have a co-worker that is no longer able to see his start menu. He used to have it pinned to the left edge of his screen. I tried to troubleshoot it a bit and discovered if we do Windows + R then "cmd" [enter] the command prompt opens (but we don't see the start menu or run box), meaning the start menu is somewhere, just off screen. Restarting doesn't help. Is there some way to force Windows to think it only has a single monitor? It seems to "think" it has two but there's only one and we can get the Start menu back. Or, is there a way to restore the start menu to the bottom? Additional info We are able to right-click the desktop for display settings, etc. We can also get into Windows Explorer (via Ctrl + E) so if we need any of that to restore settings we can do it.

    Read the article

  • Make Your Menu Item Highlighted

    - by Shaun
    When I was working on the TalentOn project (Promotion in MSDN Chinese) I was asked to implement a functionality that makes the top menu items highlighted when the currently viewing page was in that section. This might be a common scenario in the web application development I think.   Simple Example When thinking about the solution of the highlighted menu items the biggest problem would be how to define the sections (menu item) and the pages it belongs to rather than making the menu highlighted. With the ASP.NET MVC framework we can use the controller – action infrastructure for us to achieve it. Each controllers would have a related menu item on the master page normally. The menu item would be highlighted if any of the views under this controller are being shown. Some specific menu items would be highlighted of that action was invoked, for example the home page, the about page, etc. The check rule can be specified on-demand. For example I can define the action LogOn and Register of Account controller should make the Account menu item highlighted while the ChangePassword should make the Profile menu item highlighted. I’m going to use the HtmlHelper to render the highlight-able menu item. The key point is that I need to pass the predication to check whether the current view belongs to this menu item which means this menu item should be highlighted or not. Hence I need a delegate as its parameter. The simplest code would be like this. 1: using System; 2: using System.Collections.Generic; 3: using System.Linq; 4: using System.Web; 5: using System.Web.Mvc; 6: using System.Web.Mvc.Html; 7:  8: namespace ShaunXu.Blogs.HighlighMenuItem 9: { 10: public static class HighlightMenuItemHelper 11: { 12: public static MvcHtmlString HighlightMenuItem(this HtmlHelper helper, 13: string text, string controllerName, string actionName, object routeData, object htmlAttributes, 14: string highlightText, object highlightHtmlAttributes, 15: Func<HtmlHelper, bool> highlightPredicate) 16: { 17: var shouldHighlight = highlightPredicate.Invoke(helper); 18: if (shouldHighlight) 19: { 20: return helper.ActionLink(string.IsNullOrWhiteSpace(highlightText) ? text : highlightText, 21: actionName, controllerName, routeData, highlightHtmlAttributes == null ? htmlAttributes : highlightHtmlAttributes); 22: } 23: else 24: { 25: return helper.ActionLink(text, actionName, controllerName, routeData, htmlAttributes); 26: } 27: } 28: } 29: } There are 3 groups of the parameters: the first group would be the same as the in-build ActionLink method parameters. It has the link text, controller name and action name, etc passed in so that I can render a valid linkage for the menu item. The second group would be more focus on the highlight link text and Html attributes. I will use them to render the highlight menu item. The third group, which contains one parameter, would be a predicate that tells me whether this menu item should be highlighted or not based on the user’s definition. And then I changed my master page of the sample MVC application. I let the Home and About menu highlighted only when the Index and About action are invoked. And I added a new menu named Account which should be highlighted for all actions/views under its Account controller. So my master would be like this. 1: <div id="menucontainer"> 2:  3: <ul id="menu"> 4: <li><% 1: : Html.HighlightMenuItem( 2: "Home", "Home", "Index", null, null, 3: "[Home]", null, 4: helper => helper.ViewContext.RouteData.Values["controller"].ToString() == "Home" 5: && helper.ViewContext.RouteData.Values["action"].ToString() == "Index")%></li> 5:  6: <li><% 1: : Html.HighlightMenuItem( 2: "About", "Home", "About", null, null, 3: "[About]", null, 4: helper => helper.ViewContext.RouteData.Values["controller"].ToString() == "Home" 5: && helper.ViewContext.RouteData.Values["action"].ToString() == "About")%></li> 7:  8: <li><% 1: : Html.HighlightMenuItem( 2: "Account", "Account", "LogOn", null, null, 3: "[Account]", null, 4: helper => helper.ViewContext.RouteData.Values["controller"].ToString() == "Account")%></li> 9: 10: </ul> 11:  12: </div> Note: You need to add the import section for the namespace “ShaunXu.Blogs.HighlighMenuItem” to make the extension method I created below available. So let’s see the result. When the home page was shown the Home menu was highlighted since at this moment it was controller = Home and action = Index. And if I clicked the About menu you can see it turned highlighted as now the action was About. And if I navigated to the register page the Account menu was highlighted since it should be like that when any actions under the Account controller was invoked.   Fluently Language Till now it’s a fully example for the highlight menu item but not perfect yet. Since the most common scenario would be: highlighted when the action invoked, or highlighted when any action was invoked under this controller, we can created 2 shortcut method so for them so that normally the developer will be no need to specify the delegation. Another place we can improve would be, to make the method more user-friendly, or I should say developer-friendly. As you can see when we want to add a highlight menu item we need to specify 8 parameters and we need to remember what they mean. In fact we can make the method more “fluently” so that the developer can have the hints when using it by the Visual Studio IntelliSense. Below is the full code for it. 1: using System; 2: using System.Collections.Generic; 3: using System.Linq; 4: using System.Web; 5: using System.Web.Mvc; 6: using System.Web.Mvc.Html; 7:  8: namespace Ethos.Xrm.HR 9: { 10: #region Helper 11:  12: public static class HighlightActionMenuHelper 13: { 14: public static IHighlightActionMenuProviderAfterCreated HighlightActionMenu(this HtmlHelper helper) 15: { 16: return new HighlightActionMenuProvider(helper); 17: } 18: } 19:  20: #endregion 21:  22: #region Interfaces 23:  24: public interface IHighlightActionMenuProviderAfterCreated 25: { 26: IHighlightActionMenuProviderAfterOn On(string actionName, string controllerName); 27: } 28:  29: public interface IHighlightActionMenuProviderAfterOn 30: { 31: IHighlightActionMenuProviderAfterWith With(string text, object routeData, object htmlAttributes); 32: } 33:  34: public interface IHighlightActionMenuProviderAfterWith 35: { 36: IHighlightActionMenuProviderAfterHighlightWhen HighlightWhen(Func<HtmlHelper, bool> predicate); 37: IHighlightActionMenuProviderAfterHighlightWhen HighlightWhenControllerMatch(); 38: IHighlightActionMenuProviderAfterHighlightWhen HighlightWhenControllerAndActionMatch(); 39: } 40:  41: public interface IHighlightActionMenuProviderAfterHighlightWhen 42: { 43: IHighlightActionMenuProviderAfterApplyHighlightStyle ApplyHighlighStyle(object highlightHtmlAttributes, string highlightText); 44: IHighlightActionMenuProviderAfterApplyHighlightStyle ApplyHighlighStyle(object highlightHtmlAttributes); 45: IHighlightActionMenuProviderAfterApplyHighlightStyle ApplyHighlighStyle(string cssClass, string highlightText); 46: IHighlightActionMenuProviderAfterApplyHighlightStyle ApplyHighlighStyle(string cssClass); 47: } 48:  49: public interface IHighlightActionMenuProviderAfterApplyHighlightStyle 50: { 51: MvcHtmlString ToActionLink(); 52: } 53:  54: #endregion 55:  56: public class HighlightActionMenuProvider : 57: IHighlightActionMenuProviderAfterCreated, 58: IHighlightActionMenuProviderAfterOn, IHighlightActionMenuProviderAfterWith, 59: IHighlightActionMenuProviderAfterHighlightWhen, IHighlightActionMenuProviderAfterApplyHighlightStyle 60: { 61: private HtmlHelper _helper; 62:  63: private string _controllerName; 64: private string _actionName; 65: private string _text; 66: private object _routeData; 67: private object _htmlAttributes; 68:  69: private Func<HtmlHelper, bool> _highlightPredicate; 70:  71: private string _highlightText; 72: private object _highlightHtmlAttributes; 73:  74: public HighlightActionMenuProvider(HtmlHelper helper) 75: { 76: _helper = helper; 77: } 78:  79: public IHighlightActionMenuProviderAfterOn On(string actionName, string controllerName) 80: { 81: _actionName = actionName; 82: _controllerName = controllerName; 83: return this; 84: } 85:  86: public IHighlightActionMenuProviderAfterWith With(string text, object routeData, object htmlAttributes) 87: { 88: _text = text; 89: _routeData = routeData; 90: _htmlAttributes = htmlAttributes; 91: return this; 92: } 93:  94: public IHighlightActionMenuProviderAfterHighlightWhen HighlightWhen(Func<HtmlHelper, bool> predicate) 95: { 96: _highlightPredicate = predicate; 97: return this; 98: } 99:  100: public IHighlightActionMenuProviderAfterHighlightWhen HighlightWhenControllerMatch() 101: { 102: return HighlightWhen((helper) => 103: { 104: return helper.ViewContext.RouteData.Values["controller"].ToString().ToLower() == _controllerName.ToLower(); 105: }); 106: } 107:  108: public IHighlightActionMenuProviderAfterHighlightWhen HighlightWhenControllerAndActionMatch() 109: { 110: return HighlightWhen((helper) => 111: { 112: return helper.ViewContext.RouteData.Values["controller"].ToString().ToLower() == _controllerName.ToLower() && 113: helper.ViewContext.RouteData.Values["action"].ToString().ToLower() == _actionName.ToLower(); 114: }); 115: } 116:  117: public IHighlightActionMenuProviderAfterApplyHighlightStyle ApplyHighlighStyle(object highlightHtmlAttributes, string highlightText) 118: { 119: _highlightText = highlightText; 120: _highlightHtmlAttributes = highlightHtmlAttributes; 121: return this; 122: } 123:  124: public IHighlightActionMenuProviderAfterApplyHighlightStyle ApplyHighlighStyle(object highlightHtmlAttributes) 125: { 126: return ApplyHighlighStyle(highlightHtmlAttributes, _text); 127: } 128:  129: public IHighlightActionMenuProviderAfterApplyHighlightStyle ApplyHighlighStyle(string cssClass, string highlightText) 130: { 131: return ApplyHighlighStyle(new { @class = cssClass }, highlightText); 132: } 133:  134: public IHighlightActionMenuProviderAfterApplyHighlightStyle ApplyHighlighStyle(string cssClass) 135: { 136: return ApplyHighlighStyle(new { @class = cssClass }, _text); 137: } 138:  139: public MvcHtmlString ToActionLink() 140: { 141: if (_highlightPredicate.Invoke(_helper)) 142: { 143: // should be highlight 144: return _helper.ActionLink(_highlightText, _actionName, _controllerName, _routeData, _highlightHtmlAttributes); 145: } 146: else 147: { 148: // should not be highlight 149: return _helper.ActionLink(_text, _actionName, _controllerName, _routeData, _htmlAttributes); 150: } 151: } 152: } 153: } So in the master page when I need the highlight menu item I can “tell” the helper how it should be, just like this. 1: <li> 2: <% 1: : Html.HighlightActionMenu() 2: .On("Index", "Home") 3: .With(SiteMasterStrings.Home, null, null) 4: .HighlightWhenControllerMatch() 5: .ApplyHighlighStyle(new { style = "background:url(../../Content/Images/topmenu_bg.gif) repeat-x;text-decoration:none;color:#feffff;" }) 6: .ToActionLink() %> 3: </li> While I’m typing the code the IntelliSense will advise me that I need a highlight action menu, on the Index action of the Home controller, with the “Home” as its link text and no need the additional route data and Html attributes, and it should be highlighted when the controller was “Home”, and if it’s highlighted the style should be like this and finally render it to me. This is something we call “Fluently Language”. If you had been using Moq you will see that’s very development-friendly, document-ly and easy to read.   Summary In this post I demonstrated how to implement a highlight menu item in ASP.NET MVC by using its controller – action infrastructure. We can see the ASP.NET MVC helps us to organize our web application better. And then I also told a little bit more on the “Fluently Language” and showed how it will make our code better and easy to be used.   Hope this helps, Shaun   All documents and related graphics, codes are provided "AS IS" without warranty of any kind. Copyright © Shaun Ziyan Xu. This work is licensed under the Creative Commons License.

    Read the article

  • PowerShell, Start-Job, -ScriptBlock = sad panda face

    - by AaronBertrand
    I am working on a project where I am using PowerShell to collect a lot of performance counters from a lot of servers. More on that later. For now I wanted to highlight an important lesson I learned when trying to use Start-Job to call a PS script using -ScriptBlock and passing in parameters. This could be a comedy of errors if you haven't come across it before, so I thought it might be useful to throw up a quick post about it. To keep things simple, let's say I am calling a script with two parameters,...(read more)

    Read the article

  • Add the Recycle Bin to Start Menu in Windows 7

    - by Matthew Guay
    Have you ever tried to open the Recycle Bin by searching for “recycle bin” in the Start menu search, only to find nothing?  Here’s a quick trick that will let you find the Recycle Bin directly from your Windows Start menu search. The Start menu search may be the best timesaver ever added to Windows.  In fact, we use it so much that it seems painful to manually search for a program when using Windows XP or older versions of Windows.  You can easily find files, folders, programs and more through the Start menu search in both Vista and Windows 7. However, one thing you cannot find is the recycle bin; if you enter this in the start menu search it will not find it. Here’s how to add the Recycle Bin to your Start menu search. What to do To access the Recycle Bin from the Start menu search, we need to add a shortcut to the start menu.  Windows includes a personal Start menu folder, and an All Users start menu folder which all users on the computer can see.  This trick only works in the personal Start menu folder. Open up an Explorer window (Simply click the Computer link in the start menu), click the white part of the address bar, and, enter the following (substitute your username for your_user_name) and hit Enter. C:\Users\your_user_name\AppData\Roaming\Microsoft\Windows\Start Menu Now, right-click in the folder, select New, and then click Shortcut. In the location box, enter the following: explorer.exe shell:RecycleBinFolder When you’ve done this, click Next. Now, enter a name for the shortcut.  You can enter Recycle Bin like the standard shortcut, or you could name it something else such as Trash…if that’s easier for you to remember.  Click Finish when your done. By default it will have a folder icon.  Let’s switch that to the standard Recycle Bin icon.  Right-click on the new shortcut and click Properties. Click Change Icon… Type the following in the “Look for icons in this file:” box, and press the Enter key on your keyboard: %SystemRoot%\system32\imageres.dll Now, scroll and find the Recycle Bin icon and click Ok. Click Ok in the previous dialog, and now your Recycle Bin shortcut has the correct icon.   You can even have multiple shortcuts with different names, so when you searched either Recycle Bin or Trash it would come up in the Start menu.  To do that, simply repeat these directions, and enter another name of your choice at the prompt.  Here we have both a Recycle Bin and a Trash icon. Now, when you enter Recycle Bin (or trash, depending on what you chose) in your Start menu search, you will see it at the top of your Start menu.  Simply press Enter or click on the icon to open the Recycle Bin.   This trick will work in Windows Vista too!  Simply follow these same directions, and you can add the Recycle Bin to your Vista Start menu and find it via search. This is a simple trick, but may make it  much easier for you to open your Recycle Bin directly from your Windows Vista or 7 Start menu search.  If you’re using Windows 7, you can also check out our directions on how to Add the Recycle Bin to the Taskbar in Windows 7. Similar Articles Productive Geek Tips Hide, Delete, or Destroy the Recycle Bin Icon in Windows 7 or VistaDisable Deletion of the Recycle Bin in Windows VistaHide the Recycle Bin Icon Text on Windows VistaAdd the Recycle Bin to the Taskbar in Windows 7Resize the Recycle Bin in XP TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional StockFox puts a Lightweight Stock Ticker in your Statusbar Explore Google Public Data Visually The Ultimate Excel Cheatsheet Convert the Quick Launch Bar into a Super Application Launcher Automate Tasks in Linux with Crontab Discover New Bundled Feeds in Google Reader

    Read the article

  • Start a Mapping or Process Flow from OWB Browser

    - by Dong Ruirong
    Basically, we start a Mapping or Process Flow from Oracle Warehouse Builder (OWB) Design Client. But actually we can also start a Mapping or Process Flow from OWB Browser. This paper will introduce the Start Report first and then introduce how to start/rerun a Mapping or Process Flow from OWB Browser. Start Report Start Report is used to start an execution of a Mapping or Process Flow. So there are two kinds of Start Report: Mapping Start Report (See Figure 1) and Process Flow Start Report (See Figure 2). Start Report shows the Mapping or Process Flow identification properties, including latest deployment and latest execution, lists all execution parameters for the Mapping or Process Flow, which were specified by the latest deployment, and assigns parameter default values from the latest deployment specification. You can do a couple of things from Start Report: Sort execution parameters on name, category. Table 1 lists all parameters of a Mapping. Table 2 lists all parameters of a Process Flow. Change values of any input parameter where permitted. For some parameters, selection lists are provided. For example, Mapping’s parameter Audit Level has a selection list. Reset all parameter settings to their default values. Apply basic validation to parameter values before starting an execution. Start the Mapping or Process Flow, which means it is executed immediately. Navigate to Deployment Report for latest deployment details of the Mapping or Process Flow. Navigate to Execution Job Report for latest execution of current Mapping or Process Flow Link to on-link help Warehouse Report Page, Deployment Report, Execution Report, Execution Schedule Report and Execution Summary Report. Figure 1 Mapping Start Report Table 1 Execution Parameters and default values for a Mapping Category Name Mode Input Value System Audit Level In Error Details System Bulk Size In 1000 System Commit Frequency In 1000 System EXECUTE_RESUME_TASK In FALSE System FORCE_RESUME_OPTION In FALSE System Max No of Errors In 50 System NUMBER_OF_TIMES_TO_RETRY In 2 System Operating Mode In Set Based Fail Over to Row Based System PARALLEL_LEVEL In 0 System Procedure Name In main System Purge Group In WB Figure 2 Process Flow Start Report Table 2 Execution Parameters and default values for a Process Flow Category Name Mode Input Value System EVAL_LOCATION In   System Item Key In-Out   System Item Type In PFPKG_1 Start a Mapping or Process Flow To navigate to Start Report, it’s better to login OWB Browser with Control Center option; if not, after logging in OWB Browser, go to Control Center first. Then you can follow the ways introduced in this section to navigate to Start Report. One more thing you need to pay attention to is that you are not allowed to deploy any Mappings and Process Flows from OWB Browser as it’s not supported. So it’s necessary to deploy the Mappings and Process Flows first before starting them from OWB Browser. If you have deployed a Mapping or Process Flow but have not started it, please navigate from Object Summary Report or Deployment Schedule Report to Start Report. 1. Navigating from Object Summary Report to Start Report Open the Object Summary Report to see all deployed Mappings and Process Flows. Click the Mapping Name or Process Flow Name link to see its Deployment Report. Select the Start link in the Available Reports tab for the given Mapping or Process Flow to display a Start Report for the Mapping or Process Flow. The execution parameters have the default deployment-time settings. Change any of the input parameter values as required. Click Start Execution button to execute the Mapping or Process Flow. 2. Navigating from Deployment Schedule Report to Start Report Open the Deployment Schedule Report to see deployment details of Mapping and Process Flow. Expand the project trees to find the deployed Mappings and Process Flows. Click the Mapping Name or Process Flow Name link to see its Deployment Report. Select the Start link in the Available Reports tab for the given Mapping or Process Flow to display a Start Report for the Mapping or Process Flow. The execution parameters have the default deployment-time settings. Change any of the input parameter values as required. Click Start Execution button to execute the Mapping or Process Flow. Re-run a Mapping or Process Flow If you have executed a Mapping or Process Flow, you can navigate from Object Summary Report, Deployment Schedule Report, Execution Summary Report or Execution Schedule Report to Start Report. 1. Navigating from the Execution Summary Report to Start Report Open the Execution Summary Report to see all execution jobs including Mapping jobs and Process Flow jobs. Click on the Mapping Name or Process Flow Name to see its Execution Report. Select the Start link in the Available Reports tab for the given Mapping or Process Flow to display a Start Report for the Mapping or Process Flow. The execution parameters have the default deployment-time settings. Change any of the input parameter values as required. Click Start Execution button to execute the Mapping or Process Flow. 2. Navigating from the Execution Schedule Report to Start Report Open the Execution Schedule Report to see list of all executions of Mapping and Process Flow. Click on the Mapping Name or Process Flow Name to see its Execution Report. Select the Start link in the Available Reports tab for the given Mapping or Process Flow to display a Start Report for the Mapping or Process Flow. The execution parameters have the default deployment-time settings. Change any of the input parameter values as required. Click Start Execution button to execute the Mapping or Process Flow. If the execution of a Mapping or Process Flow is successful, you will see this message from the Start Report: Start Execution request successful. (See Figure 3) Figure 3 Execution Result You can also confirm the execution of the Mapping or Process Flow by referring to Execution Report of the current Mapping or Process Flow by clicking the link in the Available Reports tab for the given Mapping or Process Flow. One new record of execution job details is added to Execution Report of the Mapping or Process Flow which shows the details of the execution such as Start Time, Elapsed Time, Status, the number of records selected, inserted, updated, deleted etc.

    Read the article

  • Custom CSS menu, "Active" tab remains on 'Home' not the actual page

    - by user1690254
    I created this custom css menu, but when switching tabs, the "Active" tab design remains on the 'Home' link on the menu, rather than the actual page I'm on. Any idea how I an fix this? Here's the code: .menu{margin:0 auto; padding:0; height:30px; width:100%; display:block; background:url('http://media.datahc.com/Affiliates/43817/Brands/Image/topmenuimages.png') repeat-x;} .menu li{padding:0; margin:0; list-style:none; display:inline;} .menu li a{float:left; padding-left:15px; display:block; color:rgb(255,255,255); text-decoration:none; font:12px Verdana, Arial, Helvetica, sans-serif; cursor:pointer; background:url('http://media.datahc.com/Affiliates/43817/Brands/Image/topmenuimages.png') 0px -30px no-repeat;} .menu li a span{line-height:30px; float:left; display:block; padding-right:15px; background:url('http://media.datahc.com/Affiliates/43817/Brands/Image/topmenuimages.png') 100% -30px no-repeat;} .menu li a:hover{background-position:0px -60px; color:rgb(255,255,255);} .menu li a:hover span{background-position:100% -60px;} .menu li a.active, .menu li a.active:hover{line-height:30px; font:12px Verdana, Arial, Helvetica, sans-serif; background:url('http://media.datahc.com/Affiliates/43817/Brands/Image/topmenuimages.png') 0px -90px no-repeat; color:rgb(255,255,255);} .menu li a.active span, .menu li a.active:hover span{background:url('http://media.datahc.com/Affiliates/43817/Brands/Image/topmenuimages.png') 100% -90px no-repeat;} <ul class="menu"> <li><a href="http://caribbeantl.com/"; class="active"><span>Home</span></a></li> <li><a href="http://caribbeantl.com/hotels/"><span>Testing post</span></a></li> </ul>

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >