コード例 #1
0
ファイル: AssetMenuItems.cs プロジェクト: danielparkdp/Wedge
        static void AddMenuItems()
        {
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.PendingChangesPlasticMenu),
                PENDING_CHANGES_MENU_ITEM_PRIORITY,
                PendingChanges, ValidatePendingChanges);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.AddPlasticMenu),
                ADD_MENU_ITEM_PRIORITY,
                Add, ValidateAdd);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.CheckoutPlasticMenu),
                CHECKOUT_MENU_ITEM_PRIORITY,
                Checkout, ValidateCheckout);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.CheckinPlasticMenu),
                CHECKIN_MENU_ITEM_PRIORITY,
                Checkin, ValidateCheckin);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.UndoPlasticMenu),
                UNDO_MENU_ITEM_PRIORITY,
                Undo, ValidateUndo);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.DiffPlasticMenu),
                GetPlasticShortcut.ForAssetDiff(),
                DIFF_MENU_ITEM_PRIORITY,
                Diff, ValidateDiff);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.HistoryPlasticMenu),
                GetPlasticShortcut.ForHistory(),
                HISTORY_MENU_ITEM_PRIORITY,
                History, ValidateHistory);

            HandleMenuItem.UpdateAllMenus();
        }
コード例 #2
0
        void UpdateHiddenChangesMenuItems(FilterMenuActions actions)
        {
            RemoveHiddenChangesMenuItems();

            if (!actions.Operations.HasFlag(FilterMenuOperations.HideChanged))
            {
                HandleMenuItem.AddMenuItem(
                    mHiddenChangesSubmenuItem,
                    mHiddenChangesMenuItemsPriority,
                    DisabledMenuItem_Click, ValidateDisabledMenuItem);
                return;
            }

            mHiddenChangesByNameMenuItem      = GetHiddenChangesMenuItemName(actions.FilterByName);
            mHiddenChangesByExtensionMenuItem = GetHiddenChangesMenuItemName(actions.FilterByExtension);
            mHiddenChangesByFullPathMenuItem  = GetHiddenChangesMenuItemName(actions.FilterByFullPath);

            HandleMenuItem.AddMenuItem(
                mHiddenChangesByNameMenuItem,
                mIgnoredMenuItemsPriority,
                HiddenChangesByName_Click, ValidateEnabledMenuItem);

            if (actions.Operations.HasFlag(FilterMenuOperations.HideChangedByExtension))
            {
                HandleMenuItem.AddMenuItem(
                    mHiddenChangesByExtensionMenuItem,
                    mIgnoredMenuItemsPriority,
                    HiddenChangesByExtension_Click, ValidateEnabledMenuItem);
            }

            HandleMenuItem.AddMenuItem(
                mHiddenChangesByFullPathMenuItem,
                mIgnoredMenuItemsPriority,
                HiddenChangesByFullPath_Click, ValidateEnabledMenuItem);
        }
コード例 #3
0
        void UpdateIgnoredMenuItems(FilterMenuActions actions)
        {
            RemoveIgnoredMenuItems();

            if (!actions.Operations.HasFlag(FilterMenuOperations.Ignore))
            {
                HandleMenuItem.AddMenuItem(
                    mIgnoredSubmenuItem,
                    mIgnoredMenuItemsPriority,
                    DisabledMenuItem_Click, ValidateDisabledMenuItem);
                return;
            }

            mIgnoredByNameMenuItem      = GetIgnoredMenuItemName(actions.FilterByName);
            mIgnoredByExtensionMenuItem = GetIgnoredMenuItemName(actions.FilterByExtension);
            mIgnoredByFullPathMenuItem  = GetIgnoredMenuItemName(actions.FilterByFullPath);

            HandleMenuItem.AddMenuItem(
                mIgnoredByNameMenuItem,
                mIgnoredMenuItemsPriority,
                IgnoredByName_Click, ValidateEnabledMenuItem);

            if (!actions.Operations.HasFlag(FilterMenuOperations.IgnoreByExtension))
            {
                HandleMenuItem.AddMenuItem(
                    mIgnoredByExtensionMenuItem,
                    mIgnoredMenuItemsPriority,
                    IgnoredByExtension_Click, ValidateEnabledMenuItem);
            }

            HandleMenuItem.AddMenuItem(
                mIgnoredByFullPathMenuItem,
                mIgnoredMenuItemsPriority,
                IgnoredByFullPath_Click, ValidateEnabledMenuItem);
        }
コード例 #4
0
ファイル: PlasticMenuItem.cs プロジェクト: danielparkdp/Wedge
        internal static void Add()
        {
            HandleMenuItem.AddMenuItem(
                MENU_ITEM_NAME, MENU_ITEM_PRIORITY,
                ShowPanel, ValidateMenu);

            HandleMenuItem.UpdateAllMenus();
        }
コード例 #5
0
        static void AddMenuItems()
        {
            // TODO: Try removing this
            // Somehow first item always disappears. So this is a filler item
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.PendingChangesPlasticMenu),
                PENDING_CHANGES_MENU_ITEM_PRIORITY,
                PendingChanges, ValidatePendingChanges);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.PendingChangesPlasticMenu),
                PENDING_CHANGES_MENU_ITEM_PRIORITY,
                PendingChanges, ValidatePendingChanges);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.AddPlasticMenu),
                ADD_MENU_ITEM_PRIORITY,
                Add, ValidateAdd);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.CheckoutPlasticMenu),
                CHECKOUT_MENU_ITEM_PRIORITY,
                Checkout, ValidateCheckout);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.CheckinPlasticMenu),
                CHECKIN_MENU_ITEM_PRIORITY,
                Checkin, ValidateCheckin);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.UndoPlasticMenu),
                UNDO_MENU_ITEM_PRIORITY,
                Undo, ValidateUndo);

            UpdateFilterMenuItems();

            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.DiffPlasticMenu),
                GetPlasticShortcut.ForAssetDiff(),
                DIFF_MENU_ITEM_PRIORITY,
                Diff, ValidateDiff);
            HandleMenuItem.AddMenuItem(
                GetPlasticMenuItemName(PlasticLocalization.Name.HistoryPlasticMenu),
                GetPlasticShortcut.ForHistory(),
                HISTORY_MENU_ITEM_PRIORITY,
                History, ValidateHistory);

            HandleMenuItem.UpdateAllMenus();
        }