コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: fzhenmei/study
        private void BindMenuItem()
        {
            LeftMenu.Items.Clear();

            var dropTagets = new List<DropTarget>();

            foreach (var node in MenuDataList)
            {
                AccordionItem item;
                if (node.IsTop)
                {
                    //only Top node can accept drag drop
                    var target = new DropTarget
                                     {
                                         Ghost = new MenuGroupHeaderContent() { DataContext = node}
                                     };
                    target.DragSourceDropped += target_DragSourceDropped;
                    dropTagets.Add(target);
                    item = new AccordionItem { Header = target };
                }
                else
                {
                    item = new AccordionItem()
                               {
                                   Header =
                                       new MenuGroupHeaderContent() {DataContext = node}
                               };
                }

                item.Content = new MenuItemContent() { DataSource = node.MenuItems};
                LeftMenu.Items.Add(item);
            }
        }
コード例 #2
0
        /// <summary>
        /// ContentTargetSizeProperty property changed handler.
        /// </summary>
        /// <param name="d">AccordionItem that changed its ContentTargetSize.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnContentTargetSizePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AccordionItem source     = (AccordionItem)d;
            Size          targetSize = (Size)e.NewValue;

            if (!source._allowedToWriteContentTargetSize)
            {
                // revert to old value
                source.ContentTargetSize = (Size)e.OldValue;

                throw new InvalidOperationException(Properties.Resources.AccordionItem_InvalidWriteToContentTargetSize);
            }
        }
コード例 #3
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/TestChart;component/Page.xaml", System.UriKind.Relative));
     this.LayoutRoot               = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.cmbIndicators            = ((System.Windows.Controls.ComboBox)(this.FindName("cmbIndicators")));
     this.btnAddIndicator          = ((System.Windows.Controls.Button)(this.FindName("btnAddIndicator")));
     this.btnAddBar                = ((System.Windows.Controls.Button)(this.FindName("btnAddBar")));
     this.btnAddTick               = ((System.Windows.Controls.Button)(this.FindName("btnAddTick")));
     this.btnStartTickTimer        = ((System.Windows.Controls.Button)(this.FindName("btnStartTickTimer")));
     this.btnZoomIn                = ((System.Windows.Controls.Button)(this.FindName("btnZoomIn")));
     this.btnZoomOut               = ((System.Windows.Controls.Button)(this.FindName("btnZoomOut")));
     this.btnResetZoom             = ((System.Windows.Controls.Button)(this.FindName("btnResetZoom")));
     this.btnAddCustomIndicator    = ((System.Windows.Controls.Button)(this.FindName("btnAddCustomIndicator")));
     this.btnIntTests              = ((System.Windows.Controls.Button)(this.FindName("btnIntTests")));
     this._stockChartX             = ((ModulusFE.StockChartX)(this.FindName("_stockChartX")));
     this.AccordionItemLineStudies = ((System.Windows.Controls.AccordionItem)(this.FindName("AccordionItemLineStudies")));
     this.cmbLineStudies           = ((System.Windows.Controls.ComboBox)(this.FindName("cmbLineStudies")));
     this.colorPicker              = ((ModulusFE.Controls.ColorPicker)(this.FindName("colorPicker")));
     this.btnAddLineStudy          = ((System.Windows.Controls.Button)(this.FindName("btnAddLineStudy")));
     this.AccordionItemChartTools  = ((System.Windows.Controls.AccordionItem)(this.FindName("AccordionItemChartTools")));
     this.btnDeleteCurrentObject   = ((System.Windows.Controls.Button)(this.FindName("btnDeleteCurrentObject")));
     this.btnToggleSideVolumeBars  = ((System.Windows.Controls.Button)(this.FindName("btnToggleSideVolumeBars")));
     this.btnToggleDarvasBoxes     = ((System.Windows.Controls.Button)(this.FindName("btnToggleDarvasBoxes")));
     this.cmbPriceStyles           = ((System.Windows.Controls.ComboBox)(this.FindName("cmbPriceStyles")));
     this.psStandard               = ((System.Windows.Controls.ComboBoxItem)(this.FindName("psStandard")));
     this.psKagi                  = ((System.Windows.Controls.ComboBoxItem)(this.FindName("psKagi")));
     this.psEquiVolume            = ((System.Windows.Controls.ComboBoxItem)(this.FindName("psEquiVolume")));
     this.psCandleVolume          = ((System.Windows.Controls.ComboBoxItem)(this.FindName("psCandleVolume")));
     this.psEquiVolumeShadow      = ((System.Windows.Controls.ComboBoxItem)(this.FindName("psEquiVolumeShadow")));
     this.pfPointAndFigure        = ((System.Windows.Controls.ComboBoxItem)(this.FindName("pfPointAndFigure")));
     this.psRenko                 = ((System.Windows.Controls.ComboBoxItem)(this.FindName("psRenko")));
     this.psThreeLineBreak        = ((System.Windows.Controls.ComboBoxItem)(this.FindName("psThreeLineBreak")));
     this.psHeikinAshi            = ((System.Windows.Controls.ComboBoxItem)(this.FindName("psHeikinAshi")));
     this.btnApplyPriceStyle      = ((System.Windows.Controls.Button)(this.FindName("btnApplyPriceStyle")));
     this.btnIndProps             = ((System.Windows.Controls.Button)(this.FindName("btnIndProps")));
     this.btnUserIndicator        = ((System.Windows.Controls.Button)(this.FindName("btnUserIndicator")));
     this.btnSaveAsImage          = ((System.Windows.Controls.Button)(this.FindName("btnSaveAsImage")));
     this.cmbSerType              = ((System.Windows.Controls.ComboBox)(this.FindName("cmbSerType")));
     this.btnSave                 = ((System.Windows.Controls.Button)(this.FindName("btnSave")));
     this.btnLoad                 = ((System.Windows.Controls.Button)(this.FindName("btnLoad")));
     this.AccordionItemOtherTools = ((System.Windows.Controls.AccordionItem)(this.FindName("AccordionItemOtherTools")));
     this.btnSmallDataSetChart    = ((System.Windows.Controls.Button)(this.FindName("btnSmallDataSetChart")));
     this.btnTicket4360           = ((System.Windows.Controls.Button)(this.FindName("btnTicket4360")));
 }
コード例 #4
0
        /// <summary>
        /// ExpandDirectionProperty PropertyChangedCallback call back static
        /// function.
        /// This function validates the new value before calling virtual function
        /// OnExpandDirectionChanged.
        /// </summary>
        /// <param name="d">Expander object whose ExpandDirection property is
        /// changed.</param>
        /// <param name="e">DependencyPropertyChangedEventArgs which contains
        /// the old and new values.</param>
        private static void OnExpandDirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AccordionItem   ctrl     = (AccordionItem)d;
            ExpandDirection oldValue = (ExpandDirection)e.OldValue;
            ExpandDirection newValue = (ExpandDirection)e.NewValue;

            if (!ctrl._allowedToWriteExpandDirection)
            {
                // revert to old value
                ctrl.ExpandDirection = oldValue;

                string message = string.Format(
                    CultureInfo.InvariantCulture,
                    Properties.Resources.AccordionItem_InvalidWriteToExpandDirection,
                    newValue);
                throw new InvalidOperationException(message);
            }

            // invalid value. This check is not of great importance anymore since
            // the previous check should catch all invalid sets.
            if (newValue != ExpandDirection.Down &&
                newValue != ExpandDirection.Left &&
                newValue != ExpandDirection.Right &&
                newValue != ExpandDirection.Up)
            {
                // revert to old value
                ctrl.ExpandDirection = oldValue;

                string message = string.Format(
                    CultureInfo.InvariantCulture,
                    Properties.Resources.Expander_OnExpandDirectionPropertyChanged_InvalidValue,
                    newValue);
                throw new ArgumentException(message, "e");
            }

            if (ctrl.ExpandSite != null)
            {
                // Jump to correct percentage after a direction change
#if SILVERLIGHT
                ctrl.ExpandSite.Percentage = ctrl.IsSelected ? 1 : 0;
#else
                //               ctrl.ExpandSite.RecalculatePercentage(ctrl.IsSelected ? 1 : 0);
#endif
            }

            ctrl.UpdateVisualState(true);
        }
コード例 #5
0
        /// <summary>
        /// ContentTargetSizeProperty property changed handler.
        /// </summary>
        /// <param name="d">AccordionItem that changed its ContentTargetSize.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnContentTargetSizePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AccordionItem source     = (AccordionItem)d;
            Size          targetSize = (Size)e.NewValue;

            if (!source._allowedToWriteContentTargetSize)
            {
                // revert to old value
                source.ContentTargetSize = (Size)e.OldValue;

                throw new InvalidOperationException("AccordionItem_InvalidWriteToContentTargetSize");
            }

            // Pass the value to the expandSite
            // This is done explicitly so an animation action can be scheduled
            // deterministicly.
            ExpandableContentControl expandSite = source.ExpandSite;

            if (expandSite != null && !expandSite.TargetSize.Equals(targetSize))
            {
                expandSite.TargetSize = targetSize;
                if (source.IsSelected)
                {
                    if (source.ParentAccordion != null && source.ParentAccordion.IsResizing)
                    {
                        // if the accordion is resizing, this item should snap immediately
#if SILVERLIGHT
                        expandSite.Percentage = 1;
#else
                        expandSite.RecalculatePercentage(1);
#endif
                    }
                    else
                    {
                        // otherwise schedule the resize
                        source.Schedule(AccordionAction.Resize);
                    }
                }
            }
        }
コード例 #6
0
        /// <summary>
        /// SelectedProperty PropertyChangedCallback static function.
        /// </summary>
        /// <param name="d">Expander object whose Expanded property is changed.</param>
        /// <param name="e">DependencyPropertyChangedEventArgs which contains the
        /// old and new values.</param>
        private static void OnIsSelectedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AccordionItem ctrl       = (AccordionItem)d;
            bool          isSelected = (bool)e.NewValue;

            // Not allowed to change the IsSelected state when locked.
            if (ctrl.IsLocked && ctrl._isSelectedNestedLevel == 0)
            {
                ctrl._isSelectedNestedLevel++;
                ctrl.SetValue(IsSelectedProperty, e.OldValue);
                ctrl._isSelectedNestedLevel--;

                throw new InvalidOperationException(Properties.Resources.AccordionItem_OnIsSelectedPropertyChanged_InvalidChange);
            }

            if (ctrl._isSelectedNestedLevel == 0)
            {
                Accordion parent = ctrl.ParentAccordion;
                if (parent != null)
                {
                    if (isSelected)
                    {
                        parent.OnAccordionItemSelected(ctrl);
                    }
                    else
                    {
                        parent.OnAccordionItemUnselected(ctrl);
                    }
                }

                if (isSelected)
                {
                    ctrl.OnSelected();
                }
                else
                {
                    ctrl.OnUnselected();
                }
            }
        }
コード例 #7
0
        /// <summary>
        /// Starts the next action in the list, in a particular order.
        /// </summary>
        /// <remarks>An AccordionItem is should always signal that it is 
        /// finished with an action.</remarks>
        private void StartNextAction()
        {
            if (_currentActioningItem != null)
            {
                return;
            }

            // First do collapses, then resizes and finally expands.
            AccordionItem next = _scheduledActions.FirstOrDefault(item => item.ScheduledAction == AccordionAction.Collapse);
            if (next == null)
            {
                next = _scheduledActions.FirstOrDefault(item => item.ScheduledAction == AccordionAction.Resize);
            }
            if (next == null)
            {
                next = _scheduledActions.FirstOrDefault(item => item.ScheduledAction == AccordionAction.Expand);
            }
            if (next != null)
            {
                _currentActioningItem = next;
                _scheduledActions.Remove(next);
                next.StartAction();
            }
        }
コード例 #8
0
ファイル: MainPage.xaml.cs プロジェクト: fuhongliang/oa
        private void initLeftMenu(List<T_SYS_ENTITYMENU> menulist)
        {
            #region 源代码备份
            //StackPanel menuTemp = new StackPanel();
            //menuTemp.Margin = new Thickness(0, 1, 0, 1);
            //leftMenu.MenuRoot.Children.Add(menuTemp);

            //HyperlinkButton btnTest = new HyperlinkButton();
            //btnTest.Height = 22;
            //btnTest.FontSize = 13.333;
            //btnTest.FontWeight = FontWeights.Bold;
            //btnTest.Content = "     动态菜单";
            //btnTest.Style = new Style(typeof(HyperlinkButton));
            //Link3.NavigateUri=null;
            //btnTest.NavigateUri = new Uri("/SMT.SaaS.OA.UI;component/Views/Home.xaml", System.UriKind.Relative); //("//Home.xaml");           
            //btnTest.TargetName = "contenxtPanle";
            //btnTest.Click += new RoutedEventHandler(delegate
            //{
            //    ContentFrame.Navigate(new Uri("/Home", UriKind.Relative));
            //});
            //menuTemp.Children.Add(btnTest);
            //btnTest.Style = new Style();
            #endregion

            if (toolkitacc.Items != null)
                toolkitacc.Items.Clear();

            //生成分组
            var groupItems = from m in menulist
                             where m.T_SYS_ENTITYMENU2Reference.EntityKey == null
                             orderby m.ORDERNUMBER
                             select m;

            foreach (var item in groupItems)
            {
                AccordionItem group = new AccordionItem();
                group.Header = item;

                group.Style = this.Resources["TreeMenuGroupStyle"] as Style;
                group.BorderThickness = new Thickness(0);
                group.FontSize = 14.0;

                if (UIHelper._CurrentStyleCode_2 == 1)
                {
                    group.Foreground = Application.Current.Resources["TextBBlue1"] as SolidColorBrush;
                }

                group.VerticalContentAlignment = VerticalAlignment.Stretch;
                group.HorizontalContentAlignment = HorizontalAlignment.Stretch;
                group.VerticalAlignment = VerticalAlignment.Stretch;
                group.HorizontalAlignment = HorizontalAlignment.Stretch;

                //生成菜单明细
                var menuItems = from m in menulist
                                where m.T_SYS_ENTITYMENU2Reference.EntityKey !=null
                                && m.T_SYS_ENTITYMENU2Reference.EntityKey.EntityKeyValues[0].Value.ToString() == item.ENTITYMENUID
                                orderby m.ORDERNUMBER
                                select m;

                TransitioningContentControl ctrl = new TransitioningContentControl();

                StackPanel pnl = new StackPanel();
                pnl.VerticalAlignment = VerticalAlignment.Stretch;
                pnl.HorizontalAlignment = HorizontalAlignment.Stretch;
                pnl.Margin = new Thickness(0, 0, 0, 0);

                TreeView tree = new TreeView();
                tree.Style = (Style)Application.Current.Resources["TreeViewStyle"];
                tree.BorderThickness = new Thickness(0);
                tree.HorizontalAlignment = HorizontalAlignment.Stretch;
                tree.Width = toolkitacc.ActualWidth;
                tree.Margin = new Thickness(0);

                foreach (var menu in menuItems)
                {
                    TreeViewItem treeItem = CreateTreeItem(menu);
                    AddSubMenu(menulist, treeItem, menu);
                    tree.Items.Add(treeItem);
                }

                ctrl.Content = tree;
                group.Content = ctrl;
                toolkitacc.Items.Add(group);
            }

        }
コード例 #9
0
        /// <summary>
        /// Allows an AccordionItem to signal the need for a visual action 
        /// (resize, collapse, expand).
        /// </summary>
        /// <param name="item">The AccordionItem that signals for a schedule.</param>
        /// <param name="action">The action it is scheduling for.</param>
        /// <returns>True if the item is allowed to proceed without scheduling, 
        /// false if the item needs to wait for a signal to execute the action.</returns>
        internal virtual bool ScheduleAction(AccordionItem item, AccordionAction action)
        {
            if (SelectionSequence == SelectionSequence.CollapseBeforeExpand)
            {
                lock (this)
                {
                    if (!_scheduledActions.Contains(item))
                    {
                        _scheduledActions.Add(item);
                    }
                }
                if (_currentActioningItem == null)
                {
                    Dispatcher.BeginInvoke(new Action(StartNextAction));
                }

                return false;
            }
            else
            {
                return true;
            }
        }
コード例 #10
0
        /// <summary>
        /// Signals the finish of an action by an item.
        /// </summary>
        /// <param name="item">The AccordionItem that finishes an action.</param>
        /// <remarks>An AccordionItem should always signal a finish, for this call
        /// will start the next scheduled action.</remarks>
        internal virtual void OnActionFinish(AccordionItem item)
        {
            if (SelectionSequence == SelectionSequence.CollapseBeforeExpand)
            {
                lock (this)
                {
                    if (!_currentActioningItem.Equals(item))
                    {
                        throw new InvalidOperationException(Properties.Resources.Accordion_OnActionFinish_InvalidFinish);
                    }

                    _currentActioningItem = null;

                    StartNextAction();
                }
            }
        }
コード例 #11
0
        /// <summary>
        /// Adds all the tool panels to the control, after all the MEF
        /// imports have been satisfied
        /// </summary>
        public void OnImportsSatisfied()
        {
            // Sort the extensions by index
                this.Extensions.Sort(delegate(IToolPanelItemViewExtension item1, IToolPanelItemViewExtension item2)
                {
                    return item1.ViewModel.Index.CompareTo(item2.ViewModel.Index);
                });

                // Loop through all extensions and created an AccordionItem for each
                foreach (IToolPanelItemViewExtension toolPanelItemViewExtension in this.Extensions)
                {
                    AccordionItem newItem;
                    bool alreadyContains = false;

                    // Make sure we don't try to add the item twice
                    // TODO: This is a bit of a hack becaue OnImportsSatisfied() is getting called more than once
                    foreach (AccordionItem item in parentToolPanel.Items)
                    {
                        if ((string)item.Header == toolPanelItemViewExtension.ViewModel.ToolName)
                        {
                            alreadyContains = true;
                            break;
                        }
                    }

                    if (!alreadyContains)
                    {
                        try
                        {
                            // Create the AccordionItem
                            newItem = new AccordionItem();
                            newItem.Header = toolPanelItemViewExtension.ViewModel.ToolName;
                            newItem.Content = toolPanelItemViewExtension;
                        }
                        catch
                        {
                            newItem = null;
                        }

                        // Define binding for IsEnabled property
                        Binding binding = new Binding()
                        {
                            Source = toolPanelItemViewExtension.ViewModel,
                            Path = new PropertyPath("IsEnabled")
                        };

                        newItem.SetBinding(AccordionItem.IsEnabledProperty, binding);

                        //ToolTipService.SetToolTip(newItem, toolPanelItemViewExtension.ViewModel.Description);

                        // Add the AccordionItem to the Accordion
                        parentToolPanel.Items.Add(newItem);
                    }
                }
        }
コード例 #12
0
ファイル: MainPage.g.i.cs プロジェクト: nilavghosh/VChk
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Bcheck.TaskUI;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.LeftNavTaskView = ((System.Windows.Controls.Grid)(this.FindName("LeftNavTaskView")));
     this.gridLeftNav = ((System.Windows.Controls.ColumnDefinition)(this.FindName("gridLeftNav")));
     this.gridTaskRows = ((System.Windows.Controls.ColumnDefinition)(this.FindName("gridTaskRows")));
     this.gridStatusBar = ((System.Windows.Controls.RowDefinition)(this.FindName("gridStatusBar")));
     this.ucStatusBar = ((BCheck.TaskUI.StatusBar)(this.FindName("ucStatusBar")));
     this.acc = ((System.Windows.Controls.Accordion)(this.FindName("acc")));
     this.AccordionSummary = ((System.Windows.Controls.AccordionItem)(this.FindName("AccordionSummary")));
     this.AccordionSearch = ((System.Windows.Controls.AccordionItem)(this.FindName("AccordionSearch")));
     this.AccordionAlerts = ((System.Windows.Controls.AccordionItem)(this.FindName("AccordionAlerts")));
     this.TasksControl = ((BCheck.TaskUI.TasksViewC1)(this.FindName("TasksControl")));
     this.borderGrabber = ((System.Windows.Controls.Border)(this.FindName("borderGrabber")));
     this.txtGrabberExpandor = ((System.Windows.Controls.TextBlock)(this.FindName("txtGrabberExpandor")));
     this.grabberRotate = ((System.Windows.Media.RotateTransform)(this.FindName("grabberRotate")));
     this.grabberTranslate = ((System.Windows.Media.TranslateTransform)(this.FindName("grabberTranslate")));
     this.BusyIndicator = ((System.Windows.Controls.BusyIndicator)(this.FindName("BusyIndicator")));
 }
コード例 #13
0
ファイル: MainPage.xaml.cs プロジェクト: ufjl0683/Center
        void client_getHostInfosCompleted(object sender, ProcessService.getHostInfosCompletedEventArgs e)
        {
            hostinfos = e.Result;

            foreach (SLProcessController.ProcessService.HostInfo hi in e.Result)
            {
                ProcessService.ServiceSoapClient client = new ProcessService.ServiceSoapClient();
                AccordionHeader header=new AccordionHeader(){ DataContext=hi };
                header.OnChangeHostAllState += new OnHostChangeAllStateHandler(header_OnChangeHostAllState);
                AccordionItem item = new AccordionItem() { Header = header, Content = new ListBox() { Width = this.ActualWidth } };

                item.Tag = hi;
                accordion.Items.Add(item);

                client.GetProcessInfoCompleted += (o, a) =>
                {

                        loadHostCnt++;

                        if (e.Error != null)
                        {
                          //  MessageBox.Show(e.Error.Message);
                            return;
                        }

                            if (a.Result != null)
                                foreach (ProcessService.ProcessInfo info in a.Result)
                                {
                                    ProcessInfoCtl ctl = new ProcessInfoCtl();
                                    ctl.Tag=info;
                                    ctl.Name = info.ProcessName;
                                    dict.Add(info.ProcessName, ctl);
                                    if (info.ProcessName.ToUpper() == "HOST")
                                    {
                                        ctl.SetProgressMaxValue(10000);
                                        ctl.ProgressBar.SetBinding(ProgressBar.ValueProperty, new System.Windows.Data.Binding() { Path =new PropertyPath( "DataQueueCnt"), Converter = new HostQueueCntProgressConverter() });
                                       // ctl.ProgressBar.GetBindingExpression(ProgressBar.ValueProperty).ParentBinding.Converter = new HostQueueCntProgressConverter();
                                    }
                                    else
                                        ctl.ProgressBar.SetBinding(ProgressBar.ValueProperty, new System.Windows.Data.Binding() { Path = new PropertyPath("DataQueueCnt"), Converter = new MFCCQueueCntProcessConverter() });
                                       // ctl.ProgressBar.GetBindingExpression(ProgressBar.ValueProperty).ParentBinding.Converter = new MFCCQueueCntProcessConverter();

                                }
                            if (loadHostCnt == hostinfos.Count)
                            {
                                for (int i = 0; i < dict.Count; i++)
                                {    ProcessInfoCtl ctl;
                                    ctl= dict.Values.ToArray<ProcessInfoCtl>()[i];

                                    ProcessInfo info = ctl.Tag as ProcessInfo;

                                    foreach (AccordionItem aitem in accordion.Items)
                                    {
                                        //if(aitem.Content==null)
                                        //  aitem.Content = new ListBox() { Width = this.ActualWidth };
                                        if ((aitem.Tag as HostInfo).IP == info.HostIP)
                                        {
                                            (aitem.Content as ListBox).Items.Add(ctl);
                                            ctl.OnChangeState += new OnChangeStateHandler(ctl_OnChangeState);
                                            ctl.setDataContext(info);
                                            break;
                                        }
                                    }

                                }

                                tmr30sec.Start();

                            }

                 //   item.IsEnabled = true;

                  //  lock(client)
                  //  System.Threading.Monitor.PulseAll(client);

                };

                client.GetProcessInfoAsync(hi.IP);
                this.accordion.SelectedIndex = 1;

            }
        }
コード例 #14
0
        /// <summary>
        /// AccordionButtonStyleProperty property changed handler.
        /// </summary>
        /// <param name="d">AccordionItem that changed its AccordionButtonStyle.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnAccordionButtonStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AccordionItem source = (AccordionItem)d;

            source.OnAccordionButtonStyleChanged(e.OldValue as Style, e.NewValue as Style);
        }
コード例 #15
0
        public void FormerItemAccordeon(string nomItem)
        {
            AccordionItem itemAccordeon = new AccordionItem();
            itemAccordeon.Header = nomItem;
            StackPanel stackLigne = new StackPanel();
            stackLigne.Background = Brushes.White;
            stackLigne.Width = 284;

            foreach (var plat in LstPlat)
            {
                Button btnPlat = FormerListeLignePlatAliment(true, plat, null);
                //Ne marchera pas avec la traduction nomItem == Header et TypePlat pas traduit
                if (plat.TypePlat == nomItem)
                    stackLigne.Children.Add(btnPlat);
            }

            itemAccordeon.Content = stackLigne;
            accPlat.Items.Add(itemAccordeon);
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="item">The <see cref="T:System.Windows.Controls.AccordionItem" /> to wrap.</param>
 public AccordionItemWrapperAutomationPeer(AccordionItem item)
     : base(item)
 {
 }
コード例 #17
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ColsToSelectAcc = ((System.Windows.Controls.Accordion)(target));

            #line 44 "..\..\..\..\Control\SelectTabControl.xaml"
                this.ColsToSelectAcc.SelectedItemsChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(this.ColsToSelectAcc_SelectedItemsChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.ColListAcc = ((System.Windows.Controls.AccordionItem)(target));
                return;

            case 3:
                this.lstToSelecteColFrom = ((System.Windows.Controls.ListView)(target));

            #line 57 "..\..\..\..\Control\SelectTabControl.xaml"
                this.lstToSelecteColFrom.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.lstToSelecteColFrom_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 4:
                this.SelectionColsStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 5:
                this.computedGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:
                this.ComputedColName1 = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.ComputedColName2 = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.ComputedColName3 = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.ComputedColName4 = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.ComputedColNameTxtBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 11:
                this.ComputedColFormatComboBox = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 12:
                this.ComputedColExpTxtBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 13:
                this.ComputedColFunctionComboBox = ((System.Windows.Controls.ComboBox)(target));

            #line 176 "..\..\..\..\Control\SelectTabControl.xaml"
                this.ComputedColFunctionComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComputedColFunctionComboBox_SelectionChanged);

            #line default
            #line hidden
                return;

            case 14:
                this.ComputedColComboBox1 = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 15:
                this.ComputedColComboBox2 = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 16:
                this.ComputedColComboBox3 = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 17:
                this.ComputedColComboBox4 = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 18:
                this.ComputedColifnullTxtBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 19:
                this.AddCaseCondition = ((System.Windows.Controls.Button)(target));

            #line 189 "..\..\..\..\Control\SelectTabControl.xaml"
                this.AddCaseCondition.Click += new System.Windows.RoutedEventHandler(this.AddCase_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.RemoveCaseCondition = ((System.Windows.Controls.Button)(target));

            #line 194 "..\..\..\..\Control\SelectTabControl.xaml"
                this.RemoveCaseCondition.Click += new System.Windows.RoutedEventHandler(this.RemoveCase_Click);

            #line default
            #line hidden
                return;

            case 21:
                this.AddCompCol = ((System.Windows.Controls.Button)(target));

            #line 199 "..\..\..\..\Control\SelectTabControl.xaml"
                this.AddCompCol.Click += new System.Windows.RoutedEventHandler(this.AddCompCol_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.lblErrorMessage = ((System.Windows.Controls.Label)(target));
                return;

            case 23:
                this.BtnAddAll = ((System.Windows.Controls.Button)(target));

            #line 226 "..\..\..\..\Control\SelectTabControl.xaml"
                this.BtnAddAll.Click += new System.Windows.RoutedEventHandler(this.AddAllBtn_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.btnAdd = ((System.Windows.Controls.Button)(target));

            #line 229 "..\..\..\..\Control\SelectTabControl.xaml"
                this.btnAdd.Click += new System.Windows.RoutedEventHandler(this.btnAdd_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.btnRemove = ((System.Windows.Controls.Button)(target));

            #line 231 "..\..\..\..\Control\SelectTabControl.xaml"
                this.btnRemove.Click += new System.Windows.RoutedEventHandler(this.btnRemove_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.BtnRemoveAll = ((System.Windows.Controls.Button)(target));

            #line 233 "..\..\..\..\Control\SelectTabControl.xaml"
                this.BtnRemoveAll.Click += new System.Windows.RoutedEventHandler(this.RemoveAllBtn_Click);

            #line default
            #line hidden
                return;

            case 27:
                this.SelectedColsStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 28:
                this.Label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 29:
                this.SelectedColsStackPanel11 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 30:
                this.lstSelectedCol = ((System.Windows.Controls.ListView)(target));

            #line 252 "..\..\..\..\Control\SelectTabControl.xaml"
                this.lstSelectedCol.MouseMove += new System.Windows.Input.MouseEventHandler(this.lstSelectedCol_MouseMove);

            #line default
            #line hidden

            #line 252 "..\..\..\..\Control\SelectTabControl.xaml"
                this.lstSelectedCol.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.lstSelectedCol_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 31:
                this.btnUp = ((System.Windows.Controls.Button)(target));

            #line 304 "..\..\..\..\Control\SelectTabControl.xaml"
                this.btnUp.Click += new System.Windows.RoutedEventHandler(this.btnUp_Click);

            #line default
            #line hidden
                return;

            case 32:
                this.btnDown = ((System.Windows.Controls.Button)(target));

            #line 307 "..\..\..\..\Control\SelectTabControl.xaml"
                this.btnDown.Click += new System.Windows.RoutedEventHandler(this.btnDown_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #18
0
        private AccordionItem GetAccordionItem(object header, Style style, string iconPath)
        {
            AccordionItem Items3 = new AccordionItem();
            Items3.Header = header;
            Items3.Style = style;            
            BitmapImage image = new BitmapImage();
            image.UriSource = new Uri(iconPath, UriKind.Relative);
            ImageSource ima = image;
            Items3.SetValue(EyeCandy.ImageProperty, ima);

            return Items3;
        }
コード例 #19
0
 public AccordionItem GetAccordionItemHyperlink(object header,int menuId, string uriLink, string uriIcon, Style style)
 {
     AccordionItem Items3 = new AccordionItem();
     Items3.Header = header;
     Items3.Content = uriLink;
     Items3.Selected += new RoutedEventHandler(accoclick);
     Items3.Style = style;
     Items3.TabIndex = menuId;
     return Items3;
 }        
コード例 #20
0
 /// <summary>
 /// Initializes a new instance of the AccordionAutomationPeer class.
 /// </summary>
 /// <param name="owner">
 /// The Accordion that is associated with this
 /// AccordionAutomationPeer.
 /// </param>
 public AccordionItemAutomationPeer(AccordionItem owner)
     : base(owner)
 {
 }
コード例 #21
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ShortCutsToolBar = ((System.Windows.Controls.ToolBar)(target));

            #line 99 "..\..\..\..\Control\ResultViewControl.xaml"
                this.ShortCutsToolBar.Loaded += new System.Windows.RoutedEventHandler(this.ToolBar_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.ExecuteQueryBtn = ((System.Windows.Controls.Button)(target));

            #line 101 "..\..\..\..\Control\ResultViewControl.xaml"
                this.ExecuteQueryBtn.Click += new System.Windows.RoutedEventHandler(this.RunQueryBtn_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.StopExecutionBtn = ((System.Windows.Controls.Button)(target));

            #line 104 "..\..\..\..\Control\ResultViewControl.xaml"
                this.StopExecutionBtn.Click += new System.Windows.RoutedEventHandler(this.StopExecutionBtn_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.SaveQueryBtn = ((System.Windows.Controls.Button)(target));

            #line 107 "..\..\..\..\Control\ResultViewControl.xaml"
                this.SaveQueryBtn.Click += new System.Windows.RoutedEventHandler(this.SaveQueryBtn_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.SaveQueryAsBtn = ((System.Windows.Controls.Button)(target));

            #line 110 "..\..\..\..\Control\ResultViewControl.xaml"
                this.SaveQueryAsBtn.Click += new System.Windows.RoutedEventHandler(this.SaveQueryAsBtn_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.ExportToExcel = ((System.Windows.Controls.Button)(target));

            #line 113 "..\..\..\..\Control\ResultViewControl.xaml"
                this.ExportToExcel.Click += new System.Windows.RoutedEventHandler(this.ExportToExcel_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.ExportToFolder = ((System.Windows.Controls.Button)(target));

            #line 116 "..\..\..\..\Control\ResultViewControl.xaml"
                this.ExportToFolder.Click += new System.Windows.RoutedEventHandler(this.SaveXML_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.RVCTAbControl = ((System.Windows.Controls.TabControl)(target));

            #line 122 "..\..\..\..\Control\ResultViewControl.xaml"
                this.RVCTAbControl.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.RVCTAbControl_SelectionChanged);

            #line default
            #line hidden
                return;

            case 9:
                this.QueryTab = ((FastDB.CloseableTabItem)(target));
                return;

            case 10:
                this.CustomQueryAccordion = ((System.Windows.Controls.Accordion)(target));

            #line 133 "..\..\..\..\Control\ResultViewControl.xaml"
                this.CustomQueryAccordion.SelectedItemsChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(this.CustomQueryAccordion_SelectedItemsChanged);

            #line default
            #line hidden
                return;

            case 11:
                this.FromAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
                return;

            case 12:
                this.FromAccItemDummyGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 13:
                this.FromTabCntrl = ((FastDB.Control.FromTabControl)(target));
                return;

            case 14:
                this.SelectAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
                return;

            case 15:
                this.SelectGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 16:
                this.SelectTabCntrl = ((FastDB.Control.SelectTabControl)(target));
                return;

            case 17:
                this.WhereAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
                return;

            case 18:
                this.WhereGrid = ((System.Windows.Controls.Grid)(target));

            #line 168 "..\..\..\..\Control\ResultViewControl.xaml"
                this.WhereGrid.SizeChanged += new System.Windows.SizeChangedEventHandler(this.WhereGrid_SizeChanged);

            #line default
            #line hidden
                return;

            case 19:
                this.WhereTabCntrl = ((FastDB.Control.WhereTabControl)(target));
                return;

            case 20:
                this.TabulationAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
                return;

            case 21:
                this.TabulationTabCntrl = ((FastDB.Control.TabulationTabControl)(target));
                return;

            case 22:
                this.CrossTabulationAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
                return;

            case 23:
                this.CrossTabulationTabCntrl = ((FastDB.Control.CrossTabulationTabControl)(target));
                return;

            case 24:
                this.ResultTab = ((FastDB.CloseableTabItem)(target));
                return;

            case 25:
                this.StackPanelResultViewControl = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 26:
                this.XmlQueryTab = ((FastDB.CloseableTabItem)(target));
                return;

            case 27:
                this.lblXmlQueryTabErrorMessage = ((System.Windows.Controls.Label)(target));
                return;

            case 28:
                this.XmlQueryTabTxt = ((System.Windows.Controls.TextBox)(target));
                return;

            case 29:
                this.XmlSQLTab = ((FastDB.CloseableTabItem)(target));
                return;

            case 30:
                this.lblXmlSQLTabErrorMessage = ((System.Windows.Controls.Label)(target));
                return;

            case 31:
                this.chkSQL = ((System.Windows.Controls.CheckBox)(target));

            #line 229 "..\..\..\..\Control\ResultViewControl.xaml"
                this.chkSQL.Checked += new System.Windows.RoutedEventHandler(this.OnChecked_chkSSQL);

            #line default
            #line hidden

            #line 229 "..\..\..\..\Control\ResultViewControl.xaml"
                this.chkSQL.Unchecked += new System.Windows.RoutedEventHandler(this.OnUnChecked_chkSSQL);

            #line default
            #line hidden
                return;

            case 32:
                this.XmlSQLTabTxt = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #22
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ShortCutsToolBar = ((System.Windows.Controls.ToolBar)(target));
     
     #line 99 "..\..\..\..\Control\ResultViewControl.xaml"
     this.ShortCutsToolBar.Loaded += new System.Windows.RoutedEventHandler(this.ToolBar_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.ExecuteQueryBtn = ((System.Windows.Controls.Button)(target));
     
     #line 101 "..\..\..\..\Control\ResultViewControl.xaml"
     this.ExecuteQueryBtn.Click += new System.Windows.RoutedEventHandler(this.RunQueryBtn_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.StopExecutionBtn = ((System.Windows.Controls.Button)(target));
     
     #line 104 "..\..\..\..\Control\ResultViewControl.xaml"
     this.StopExecutionBtn.Click += new System.Windows.RoutedEventHandler(this.StopExecutionBtn_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.SaveQueryBtn = ((System.Windows.Controls.Button)(target));
     
     #line 107 "..\..\..\..\Control\ResultViewControl.xaml"
     this.SaveQueryBtn.Click += new System.Windows.RoutedEventHandler(this.SaveQueryBtn_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.SaveQueryAsBtn = ((System.Windows.Controls.Button)(target));
     
     #line 110 "..\..\..\..\Control\ResultViewControl.xaml"
     this.SaveQueryAsBtn.Click += new System.Windows.RoutedEventHandler(this.SaveQueryAsBtn_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.ExportToExcel = ((System.Windows.Controls.Button)(target));
     
     #line 113 "..\..\..\..\Control\ResultViewControl.xaml"
     this.ExportToExcel.Click += new System.Windows.RoutedEventHandler(this.ExportToExcel_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.ExportToFolder = ((System.Windows.Controls.Button)(target));
     
     #line 116 "..\..\..\..\Control\ResultViewControl.xaml"
     this.ExportToFolder.Click += new System.Windows.RoutedEventHandler(this.SaveXML_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     this.RVCTAbControl = ((System.Windows.Controls.TabControl)(target));
     
     #line 122 "..\..\..\..\Control\ResultViewControl.xaml"
     this.RVCTAbControl.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.RVCTAbControl_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 9:
     this.QueryTab = ((FastDB.CloseableTabItem)(target));
     return;
     case 10:
     this.CustomQueryAccordion = ((System.Windows.Controls.Accordion)(target));
     
     #line 133 "..\..\..\..\Control\ResultViewControl.xaml"
     this.CustomQueryAccordion.SelectedItemsChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(this.CustomQueryAccordion_SelectedItemsChanged);
     
     #line default
     #line hidden
     return;
     case 11:
     this.FromAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
     return;
     case 12:
     this.FromAccItemDummyGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 13:
     this.FromTabCntrl = ((FastDB.Control.FromTabControl)(target));
     return;
     case 14:
     this.SelectAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
     return;
     case 15:
     this.SelectGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 16:
     this.SelectTabCntrl = ((FastDB.Control.SelectTabControl)(target));
     return;
     case 17:
     this.WhereAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
     return;
     case 18:
     this.WhereGrid = ((System.Windows.Controls.Grid)(target));
     
     #line 168 "..\..\..\..\Control\ResultViewControl.xaml"
     this.WhereGrid.SizeChanged += new System.Windows.SizeChangedEventHandler(this.WhereGrid_SizeChanged);
     
     #line default
     #line hidden
     return;
     case 19:
     this.WhereTabCntrl = ((FastDB.Control.WhereTabControl)(target));
     return;
     case 20:
     this.TabulationAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
     return;
     case 21:
     this.TabulationTabCntrl = ((FastDB.Control.TabulationTabControl)(target));
     return;
     case 22:
     this.CrossTabulationAccordionItem = ((System.Windows.Controls.AccordionItem)(target));
     return;
     case 23:
     this.CrossTabulationTabCntrl = ((FastDB.Control.CrossTabulationTabControl)(target));
     return;
     case 24:
     this.ResultTab = ((FastDB.CloseableTabItem)(target));
     return;
     case 25:
     this.StackPanelResultViewControl = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 26:
     this.XmlQueryTab = ((FastDB.CloseableTabItem)(target));
     return;
     case 27:
     this.lblXmlQueryTabErrorMessage = ((System.Windows.Controls.Label)(target));
     return;
     case 28:
     this.XmlQueryTabTxt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 29:
     this.XmlSQLTab = ((FastDB.CloseableTabItem)(target));
     return;
     case 30:
     this.lblXmlSQLTabErrorMessage = ((System.Windows.Controls.Label)(target));
     return;
     case 31:
     this.chkSQL = ((System.Windows.Controls.CheckBox)(target));
     
     #line 229 "..\..\..\..\Control\ResultViewControl.xaml"
     this.chkSQL.Checked += new System.Windows.RoutedEventHandler(this.OnChecked_chkSSQL);
     
     #line default
     #line hidden
     
     #line 229 "..\..\..\..\Control\ResultViewControl.xaml"
     this.chkSQL.Unchecked += new System.Windows.RoutedEventHandler(this.OnUnChecked_chkSSQL);
     
     #line default
     #line hidden
     return;
     case 32:
     this.XmlSQLTabTxt = ((System.Windows.Controls.TextBox)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #23
0
        /// <summary>
        /// Méthode d'ajout d'une catégorie d'aliments à l'accordéon et qui peuple cell-ci avec les bons aliments.
        /// </summary>
        /// <param name="categorie"></param>
        private void Construire_Categorie_Accordeon(string categorie)
        {
            AccordionItem categorieAccordeon = new AccordionItem();
            categorieAccordeon.Header = categorie;
            StackPanel stackCategorie = new StackPanel();
            stackCategorie.Background = Brushes.White;
            stackCategorie.Width = 284;

            foreach (Aliment unAliment in listeAliments)
            {
                if (unAliment.Categorie == categorie)
                {
                    Button btnAliment = Creer_Bouton_Aliment(true, unAliment);
                    btnAliment.ToolTip = Produire_Aide_Contextuelle(unAliment);
                    stackCategorie.Children.Add(btnAliment);
                }
            }

            categorieAccordeon.Content = stackCategorie;
            accordeon_aliments.Items.Add(categorieAccordeon);
        }
コード例 #24
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ColsToSelectAcc = ((System.Windows.Controls.Accordion)(target));
     
     #line 44 "..\..\..\..\Control\SelectTabControl.xaml"
     this.ColsToSelectAcc.SelectedItemsChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(this.ColsToSelectAcc_SelectedItemsChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.ColListAcc = ((System.Windows.Controls.AccordionItem)(target));
     return;
     case 3:
     this.lstToSelecteColFrom = ((System.Windows.Controls.ListView)(target));
     
     #line 57 "..\..\..\..\Control\SelectTabControl.xaml"
     this.lstToSelecteColFrom.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.lstToSelecteColFrom_MouseDoubleClick);
     
     #line default
     #line hidden
     return;
     case 4:
     this.SelectionColsStackPanel = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 5:
     this.computedGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 6:
     this.ComputedColName1 = ((System.Windows.Controls.Label)(target));
     return;
     case 7:
     this.ComputedColName2 = ((System.Windows.Controls.Label)(target));
     return;
     case 8:
     this.ComputedColName3 = ((System.Windows.Controls.Label)(target));
     return;
     case 9:
     this.ComputedColName4 = ((System.Windows.Controls.Label)(target));
     return;
     case 10:
     this.ComputedColNameTxtBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 11:
     this.ComputedColFormatComboBox = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 12:
     this.ComputedColExpTxtBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 13:
     this.ComputedColFunctionComboBox = ((System.Windows.Controls.ComboBox)(target));
     
     #line 176 "..\..\..\..\Control\SelectTabControl.xaml"
     this.ComputedColFunctionComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComputedColFunctionComboBox_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 14:
     this.ComputedColComboBox1 = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 15:
     this.ComputedColComboBox2 = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 16:
     this.ComputedColComboBox3 = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 17:
     this.ComputedColComboBox4 = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 18:
     this.ComputedColifnullTxtBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 19:
     this.AddCaseCondition = ((System.Windows.Controls.Button)(target));
     
     #line 189 "..\..\..\..\Control\SelectTabControl.xaml"
     this.AddCaseCondition.Click += new System.Windows.RoutedEventHandler(this.AddCase_Click);
     
     #line default
     #line hidden
     return;
     case 20:
     this.RemoveCaseCondition = ((System.Windows.Controls.Button)(target));
     
     #line 194 "..\..\..\..\Control\SelectTabControl.xaml"
     this.RemoveCaseCondition.Click += new System.Windows.RoutedEventHandler(this.RemoveCase_Click);
     
     #line default
     #line hidden
     return;
     case 21:
     this.AddCompCol = ((System.Windows.Controls.Button)(target));
     
     #line 199 "..\..\..\..\Control\SelectTabControl.xaml"
     this.AddCompCol.Click += new System.Windows.RoutedEventHandler(this.AddCompCol_Click);
     
     #line default
     #line hidden
     return;
     case 22:
     this.lblErrorMessage = ((System.Windows.Controls.Label)(target));
     return;
     case 23:
     this.BtnAddAll = ((System.Windows.Controls.Button)(target));
     
     #line 226 "..\..\..\..\Control\SelectTabControl.xaml"
     this.BtnAddAll.Click += new System.Windows.RoutedEventHandler(this.AddAllBtn_Click);
     
     #line default
     #line hidden
     return;
     case 24:
     this.btnAdd = ((System.Windows.Controls.Button)(target));
     
     #line 229 "..\..\..\..\Control\SelectTabControl.xaml"
     this.btnAdd.Click += new System.Windows.RoutedEventHandler(this.btnAdd_Click);
     
     #line default
     #line hidden
     return;
     case 25:
     this.btnRemove = ((System.Windows.Controls.Button)(target));
     
     #line 231 "..\..\..\..\Control\SelectTabControl.xaml"
     this.btnRemove.Click += new System.Windows.RoutedEventHandler(this.btnRemove_Click);
     
     #line default
     #line hidden
     return;
     case 26:
     this.BtnRemoveAll = ((System.Windows.Controls.Button)(target));
     
     #line 233 "..\..\..\..\Control\SelectTabControl.xaml"
     this.BtnRemoveAll.Click += new System.Windows.RoutedEventHandler(this.RemoveAllBtn_Click);
     
     #line default
     #line hidden
     return;
     case 27:
     this.SelectedColsStackPanel = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 28:
     this.Label2 = ((System.Windows.Controls.Label)(target));
     return;
     case 29:
     this.SelectedColsStackPanel11 = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 30:
     this.lstSelectedCol = ((System.Windows.Controls.ListView)(target));
     
     #line 252 "..\..\..\..\Control\SelectTabControl.xaml"
     this.lstSelectedCol.MouseMove += new System.Windows.Input.MouseEventHandler(this.lstSelectedCol_MouseMove);
     
     #line default
     #line hidden
     
     #line 252 "..\..\..\..\Control\SelectTabControl.xaml"
     this.lstSelectedCol.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.lstSelectedCol_MouseDoubleClick);
     
     #line default
     #line hidden
     return;
     case 31:
     this.btnUp = ((System.Windows.Controls.Button)(target));
     
     #line 304 "..\..\..\..\Control\SelectTabControl.xaml"
     this.btnUp.Click += new System.Windows.RoutedEventHandler(this.btnUp_Click);
     
     #line default
     #line hidden
     return;
     case 32:
     this.btnDown = ((System.Windows.Controls.Button)(target));
     
     #line 307 "..\..\..\..\Control\SelectTabControl.xaml"
     this.btnDown.Click += new System.Windows.RoutedEventHandler(this.btnDown_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #25
0
 /// <summary>
 /// Called when an AccordionItem selected.
 /// </summary>
 /// <param name="accordionItem">The accordion item that was selected.</param>
 internal void OnAccordionItemSelected(AccordionItem accordionItem)
 {
     SelectItem(ItemContainerGenerator.IndexFromContainer(accordionItem));
 }
コード例 #26
0
        /// <summary>
        /// ExpandableContentControlStyleProperty property changed handler.
        /// </summary>
        /// <param name="d">AccordionItem that changed its ExpandableContentControlStyle.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnExpandableContentControlStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AccordionItem source = (AccordionItem)d;

            source.OnExpandableContentControlStyleChanged(e.OldValue as Style, e.NewValue as Style);
        }
コード例 #27
0
 internal void OnHeaderSizeChange(AccordionItem item)
 {
     LayoutChildren();
 }
コード例 #28
0
        // Attempts to add the search view to the application's side panel
        private bool tryAddSearchToSidePanel()
        {
            // try retrieving the side panel 
            DependencyObject d = MapApplication.Current.FindObjectInLayout(SIDE_PANEL_NAME);

            if (d != null && !(d is TabControl) && !(d is Accordion))
            {
                m_showInSidePanel = false; // Side panel is not tab control or accordion - show in window instead
            }
            else if (d != null)
            {
                SelectionChangedEventHandler selectionChanged = (o, e) =>
                {                    
                    // Set flag based on whether search is selected
                    if (((dynamic)o).SelectedItem == m_searchItem)
                        _isChecked = true;
                    else
                        _isChecked = false;

                    // Execute same logic as when button on toolbar is clicked
                    OnCanExecuteChanged();
                };

                if (d is TabControl)
                {
                    m_sidePanelIsTabControl = true;

                    TabControl sidePanelTabs = (TabControl)d;

                    // successfully retrieved side panel.  Create tab containing search view and
                    // add to the panel.
                    m_searchItem = new TabItem() { Content = m_searchViewContainer };
                    sidePanelTabs.Items.Add(m_searchItem);

                    // When the side panel tab is changed, toggle the search button on or off depending on
                    // whether search is currently shown
                    sidePanelTabs.SelectionChanged += selectionChanged;
                }
                else if (d is Accordion)
                {
                    Accordion sidePanelAccordion = (Accordion)d;

                    Style itemStyle = null;
                    if (sidePanelAccordion.Items.Count > 0 && sidePanelAccordion.Items[0] is AccordionItem)
                        itemStyle = ((AccordionItem)sidePanelAccordion.Items[0]).Style;

                    m_searchItem = new AccordionItem()
                    {
                        Content = m_searchView,
                        Header = Strings.Search,
                        Style = itemStyle,
                        HorizontalAlignment = HorizontalAlignment.Stretch,
                        HorizontalContentAlignment = HorizontalAlignment.Stretch,
                        VerticalAlignment = VerticalAlignment.Stretch,
                        VerticalContentAlignment = VerticalAlignment.Stretch
                    };
                    sidePanelAccordion.Items.Add(m_searchItem);

                    sidePanelAccordion.SelectionChanged += selectionChanged;
                }

                // Associate the side panel container with the command
                Properties.SetAttachedObject(d, this);
                // Subscribe to changes in the side panel's visibility
                Properties.NotifyOnDependencyPropertyChanged("Visibility", d, OnSidePanelVisibilityChanged);

                m_addedToSidePanel = true;
            }

            return m_addedToSidePanel;
        }
コード例 #29
0
        private void BuildControls()
        {
            CalculationsAccordion.Items.Clear();
            AccordionItems.Clear();
            LabelLabels.Clear();
            ValueLabels.Clear();

            string[] displayLabelConfigurationStrings = null;
            if (Calculations.Instance != null)
            {
                displayLabelConfigurationStrings = Calculations.CharacterDisplayCalculationLabels;
            }
            else
            {
                displayLabelConfigurationStrings = new string[0];
            }
            foreach (string displayLabelConfigurationString in displayLabelConfigurationStrings)
            {
                #region Determine the Group that the value belongs to. If an Accordion isn't created for this group, make a new one.
                string[] displayLabelConfigurationSplit = displayLabelConfigurationString.Split(':');
                string group = displayLabelConfigurationSplit[0];
                if (!AccordionItems.ContainsKey(group))
                {
                    AccordionItem accordionItem = new AccordionItem();
                    accordionItem.Header = group;
                    accordionItem.Tag = group;
                    accordionItem.IsSelected = true;
                    StackPanel accordionSp = new StackPanel();
                    accordionSp.Margin = new Thickness(4);
                    accordionItem.Content = accordionSp;

                    AccordionItems[group] = accordionItem;
                    CalculationsAccordion.Items.Add(accordionItem);
                }
                #endregion

                string name = displayLabelConfigurationSplit[1];
                string[] nameSplit = name.Split('*');
                name = nameSplit[0];

                #region Create a Horizontal StackPanel to function as the Row
                StackPanel sp = new StackPanel();
                sp.Orientation = Orientation.Horizontal;
                #endregion

                #region Create the left side label which describes what the value is. A tooltip explains in further detail if set
                TextBlock labelLabel = new TextBlock();
                labelLabel.MouseEnter += new MouseEventHandler(labelLabel_MouseEnter);
                labelLabel.MouseLeave += new MouseEventHandler(labelLabel_MouseLeave);
                labelLabel.Width = 160;
                labelLabel.Text = name + (nameSplit.Length > 1 ? ": *" : ":");
                sp.Children.Add(labelLabel);
                LabelLabels[name] = labelLabel;
                TooltipDictionary.Add(labelLabel, new string[] { name, nameSplit.Length > 1 ? nameSplit[1] : "" });
                //if (nameSplit.Length > 1) { ToolTipService.SetToolTip(labelLabel, nameSplit[1]); } // turning this off in favor of new static tooltip
                #endregion

                #region Create the right side label states the value. A tooltip explains in further detail with more value related info if set
                TextBlock labelValue = new TextBlock();
                ValueLabels[name] = labelValue;
                sp.Children.Add(labelValue);
                #endregion

                ((StackPanel)AccordionItems[group].Content).Children.Add(sp);
            }
        }