Ejemplo n.º 1
0
        private void OnAccordionElementClick(object sender, ElementClickEventArgs e)
        {
            if (e.Element == null)
            {
                return;
            }
            if (e.Element.Style == ElementStyle.Group)
            {
                return;
            }
            if (!(e.Element.Tag is CurrencyPair currencyPair))
            {
                return;
            }

            var existedDashboard = tabbedView.Documents.OfType <CurrencyPairDashboardControl>()
                                   .FirstOrDefault(control => control.Info.Id == currencyPair.Id);

            if (existedDashboard == null)
            {
                existedDashboard = CompositionRoot.Resolve <CurrencyPairDashboardControl>(new ConstructorArgument("info", currencyPair));
                tabbedView.AddDocument(existedDashboard);
                try
                {
                    existedDashboard.LoadData();
                }
                catch (Exception exception)
                {
                    MessageBox.Show(this, exception.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
            tabbedView.ActivateDocument(existedDashboard);
        }
        private void accordionControl_ElementClick(object sender, ElementClickEventArgs e)
        {
            var selected = e.Element;

            if (selected != null && selected.Style == ElementStyle.Item)
            {
                var name    = $"commentaryControl_" + selected.Name;
                var control = this.fluentDesignFormContainer.Controls.Find(name, true).FirstOrDefault();
                if (control != null)
                {
                    control.BringToFront();
                }
                else
                {
                    control = new CommentaryControl(Commentary, selected.OwnerElement.Tag as Book, Convert.ToInt32(selected.Tag))
                    {
                        Dock = DockStyle.Fill,
                        Name = name
                    };
                    fluentDesignFormContainer.Controls.Add(control);
                    control.BringToFront();
                    Application.DoEvents();
                    SetButtonsStatus();
                }
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Element클릭시 발생이벤트
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void accordionControl1_ElementClick(object sender, ElementClickEventArgs e)
 {
     if (e.Element.Name == "Calender")
     {
         User_Calendar user_Calendar         = new User_Calendar();
         DevExpress.XtraTab.XtraTabPage page = new DevExpress.XtraTab.XtraTabPage();
         page.Text = e.Element.Name;
         page.Controls.Add(user_Calendar);
         xtraTabControl1.TabPages.Add(page);
         user_Calendar.Dock = DockStyle.Fill;
         user_Calendar.BringToFront();
         xtraTabControl1.SelectedTabPage = page;
     }
     else if (e.Element.Name != "")
     {
         NotePad notePad = new NotePad(e.Element.Name); //Category의 이름을 매개변수로 넘긴다.
         DevExpress.XtraTab.XtraTabPage page = new DevExpress.XtraTab.XtraTabPage();
         page.Text = e.Element.Name;
         page.Controls.Add(notePad);
         xtraTabControl1.TabPages.Add(page);
         notePad.Dock = DockStyle.Fill;
         notePad.BringToFront();
         xtraTabControl1.SelectedTabPage = page;
     }
     else
     {
         return;
     }
 }
Ejemplo n.º 4
0
        private void AccordionMenu_ElementClick(object sender, ElementClickEventArgs e)
        {
            ((AccordionControl)sender).SelectedElement = null;
            ((AccordionControl)sender).SelectedElement = e.Element;

            accordionMenu.KeyNavHelperEx.SelectedElement = e.Element;
        }
Ejemplo n.º 5
0
 private void navStartup_ElementClick(object sender, ElementClickEventArgs e)
 {
     if (e.Element.Style == ElementStyle.Item && Convert.ToInt32(e.Element.Tag) != -12)
     {
         clickedMenuTitle = menuListCopy[Convert.ToInt32(e.Element.Tag)].Title;
         DesktopMenuClicked(e.Element, null);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 按鈕事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void accordionControl1_ElementClick(object sender, ElementClickEventArgs e)
 {
     if (e.Element.Style == DevExpress.XtraBars.Navigation.ElementStyle.Group)
     {
         return;
     }
     if (e.Element.Tag == null)
     {
         return;
     }
     ViewIndex = Convert.ToInt32(e.Element.Tag);
     if (navigationFrame.Pages.Count > Convert.ToInt32(e.Element.Tag))
     {
         navigationFrame.SelectedPageIndex = Convert.ToInt32(e.Element.Tag);
     }
 }
Ejemplo n.º 7
0
        private void Ac_LeftMenu_ElementClick(object sender, ElementClickEventArgs e)
        {
            string name = e.Element.Name;

            if (!string.IsNullOrEmpty(name))
            {
                if ("ace_all".Equals(name))
                {
                    LoadDataGridView(null);
                }
                else
                {
                    LoadDataGridView(name);
                }
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 按鈕事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void accordionControl1_ElementClick(object sender, ElementClickEventArgs e)
        {
            if (e.Element.Style == DevExpress.XtraBars.Navigation.ElementStyle.Group)
            {
                return;
            }
            if (e.Element.Tag == null)
            {
                return;
            }
            ButtonItemSetting button = (ButtonItemSetting)e.Element.Tag;

            ViewIndex = Convert.ToInt32(button.ItemTag);
            if (navigationFrame.Pages.Count > ViewIndex)
            {
                navigationFrame.SelectedPageIndex = ViewIndex;
            }
        }
 private void EasyAccordionToolboxService_ElementClick(object sender, ElementClickEventArgs e)
 {
     if (e.Element.Level == 1) this._SelectedElement = e.Element as EasyAccordionControlElement;
 }