public NavigateBarButtonEventArgs(NavigateBarButton tNavigateBarButton)
        {
            if (tNavigateBarButton == null)
                throw new NullReferenceException("Cannot null tNavigateBarButton");

            navigateBarButton = tNavigateBarButton;
        }
        public NavigateBarOverFlowPanelMenuItem(NavigateBarButton tNavigateBarButton, bool tCheckMenu)
        {
            navigateBarButton = tNavigateBarButton;

            if (navigateBarButton == null)
                return;

            this.Text = navigateBarButton.CaptionOrjinal;
            this.Image = navigateBarButton.Image;

            if (tCheckMenu)
            {
                this.CheckOnClick = true;
                this.CheckState = tNavigateBarButton.IsDisplayed ? CheckState.Checked : CheckState.Unchecked;
                this.ToolTipText = navigateBarButton.CaptionDescription;
            }
        }
 public CheckedListItem(NavigateBarButton tNavigateBarButton)
 {
     navigateBarButton = tNavigateBarButton;
     isChecked = navigateBarButton.IsDisplayed;
 }
        void InitNavigateBarOverFlowPanel()
        {
            // Control

            Dock = DockStyle.Fill;
            MinimumSize = new Size(NavigateBar.OVER_FLOW_BUTTON_WIDTH, NavigateBar.BUTTON_HEIGHT);
            Height = NavigateBar.BUTTON_HEIGHT;

            // Arrow button

            panelArratNavBtn = new NavigateBarButton(SoftLogik.Win.Properties.Resources.TEXT_CONFIGURE_BUTTONS, SoftLogik.Win.Properties.Resources.ArrowMenu);
            panelArratNavBtn.NavigateBar = NavigateBar;
            panelArrowBtn = new NavigateBarOverFlowPanelButton(panelArratNavBtn);
            panelArrowBtn.Left = Width - panelArrowBtn.Width - 1;
            panelArrowBtn.IsSelected = false;
            panelArrowBtn.Visible = true;
            panelArrowBtn.Tag = "__ARROW";
            panelArrowBtn.Click += delegate(object sender, EventArgs e)
                {
                    // OK tıklandığında okun yanında context menü açılması sağlanıyor
                    // Click arrow button show context menu near arrow button
                    mnContextMenu.Show(this, (Left + Width), panelArrowBtn.Top + Height / 2);
                };

            //
        }
 public NavigateBarOverFlowPanelButton(NavigateBarButton tNavigateBarButton)
 {
     navigateBarButton = tNavigateBarButton;
     InitOverFlowButton();
 }
Example #6
0
        void NavigateBarButton_Selected(NavigateBarButtonEventArgs e)
        {
            // Zaten seçili ise
            // If already selected return

            if (selectedButton != null && SelectedButton.Equals(e.NavigateBarButton))
                return;

            // Control içerisindeki tüm butonların IsSelected ayarla
            // set IsSelected state for all buttons in collection

            foreach (NavigateBarButton nvb in navigateBarButtonCollection)
                nvb.IsSelected = nvb.Equals(e.NavigateBarButton);

            overFlowPanel.Refresh();

            // Seçili NavigateBarButtonun özelliklerini aktar
            // Set new caption and image info for selected button

            navigateBarCaption.Caption = e.NavigateBarButton.CaptionOrjinal;
            navigateBarCaption.Image = e.NavigateBarButton.IsShowCaptionImage ? e.NavigateBarButton.Image : null;
            navigateBarCaptionDesc.Caption = e.NavigateBarButton.CaptionDescription;

            navigateBarCaption.Visible = e.NavigateBarButton.IsShowCaption;
            navigateBarCaptionDesc.Visible = e.NavigateBarButton.IsShowCaptionDescription;

            // Seçili buttonu bar üzerindeki değişkenede atama
            // Set selected button var

            selectedButton = e.NavigateBarButton;

            // Seçilen NavigateBarButton için Controlü göster
            // display releated control for selected button

            SetControlForNavigateBarButton(e.NavigateBarButton.RelatedControl);

            //
            if (OnNavigateBarButtonSelected != null)
                OnNavigateBarButtonSelected(e.NavigateBarButton);
        }
Example #7
0
        /// <summary>
        /// If changed IsDisplayed state NavigateBarButton
        /// </summary>
        /// <param name="tOldValue"></param>
        /// <param name="tNewValue"></param>
        void NavigateBarButton_DisplayChanged(bool tOldValue, bool tNewValue)
        {
            displayedButtonCount = GetVisibleButtonCount(VisibleType.Visible);
            lastDisplayedButtonCount = displayedButtonCount;

            bool existsDisplay = false;

            // Tüm butonlar eğer görünmüyorsa Control görünüm alanını ve
            // overflow kontrol analını temizle
            // selectedButton null olarak ata

            // If all buttons is not displayed then clear overflowpanel and set null selectedbutton

            foreach (NavigateBarButton nvb in navigateBarButtonCollection)
            {
                if (nvb.IsDisplayed)
                {
                    existsDisplay = true;
                    break;
                }
            }

            // Eğer seçili button IsDisplayed değilse olan ilk tabı seç
            // If selected new button not isdisplayed then select possible first button

            if (existsDisplay && selectedButton != null)
            {
                if (!this.selectedButton.IsDisplayed)
                {
                    foreach (NavigateBarButton nvb in this.NavigateBarButtons)
                    {
                        if (nvb.IsDisplayed)
                        {
                            this.SelectedButton = nvb;
                            break;
                        }
                    }
                }

            }
            else
            {
                relatedControlPanel.Controls.Clear();
                displayedButtonCount = GetVisibleButtonCount(VisibleType.Visible);
                navigateBarCaption.Caption = "";
                navigateBarCaptionDesc.Caption = "";
                selectedButton = null;
            }

            // NavigateBarı yenile
            // Refresh items on navigatebar

            ChangeSplitterPosition();
            ReDisplayNavigateBarButtons();

            // OverFlowPaneli yenile
            // Refresh items on overflowpanel

            ReFreshOverFlowPanel();
            ReSizeControlPanel();
        }
 public SPNavigatorFormOptionsChangedEventArgs(NavigateBarButton NavButton)
 {
     _navButton = NavButton;
 }
 protected virtual void OnNavigateBarButtonSelected(NavigateBarButton tNavigationButton)
 {
     if (NavigationChangedEvent != null)
             NavigationChangedEvent(this, new SPNavigatorFormOptionsChangedEventArgs(tNavigationButton));
 }
 void PerformClick(NavigateBarButton tNavigateBarButton)
 {
     // Eğer gösterilen bir button ise click olayını çalıştır
     // Run button click
     if (tNavigateBarButton.IsDisplayed)
     {
         if (OnNavigateBarButtonSelected != null)
             OnNavigateBarButtonSelected(new NavigateBarButtonEventArgs(tNavigateBarButton));
     }
 }