상속: Control, System.Windows.Markup.IAddChild, MS.Internal.Controls.IGeneratorHost
예제 #1
1
        public void StartDragDrop(ItemsControl source, FrameworkElement sourceItemContainer, object draggedData, Point initialMousePosition)
        {
            _topWindow = Window.GetWindow(source);
            Debug.Assert(_topWindow != null);
            _source = source;
            _sourceItemContainer = sourceItemContainer;
            _initialMousePosition = initialMousePosition;

            _initialMouseOffset = _initialMousePosition - _sourceItemContainer.TranslatePoint(new Point(0, 0), _topWindow);

            var data = new DataObject(Format.Name, draggedData);

            // Adding events to the window to make sure dragged adorner comes up when mouse is not over a drop target.
            bool previousAllowDrop = _topWindow.AllowDrop;
            _topWindow.AllowDrop = true;
            _topWindow.DragEnter += TopWindow_DragEnter;
            _topWindow.DragOver += TopWindow_DragOver;
            _topWindow.DragLeave += TopWindow_DragLeave;

            DragDrop.DoDragDrop(_source, data, DragDropEffects.Move);

            // Without this call, there would be a bug in the following scenario: Click on a data item, and drag
            // the mouse very fast outside of the window. When doing this really fast, for some reason I don't get
            // the Window leave event, and the dragged adorner is left behind.
            // With this call, the dragged adorner will disappear when we release the mouse outside of the window,
            // which is when the DoDragDrop synchronous method returns.
            RemoveDraggedAdorner();

            _topWindow.AllowDrop = previousAllowDrop;
            _topWindow.DragEnter -= TopWindow_DragEnter;
            _topWindow.DragOver -= TopWindow_DragOver;
            _topWindow.DragLeave -= TopWindow_DragLeave;
        }
 public static void Sort(ItemsControl listView, string sortBy, ListSortDirection direction)
 {
     listView.Items.SortDescriptions.Clear();
     var sd = new SortDescription(sortBy, direction);
     listView.Items.SortDescriptions.Add(sd);
     listView.Items.Refresh();
 }
예제 #3
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (this.Template != null)
            {
                var today = DateTime.Today;

                _gridRoot = GetTemplateChild("PART_Root") as Grid;
                _labelTitle = GetTemplateChild("PART_TitleHeader") as Label;
                _titleWeekDayNames = GetTemplateChild("PART_TitleDayNames") as ItemsControl;
                _days = GetTemplateChild("PART_Days") as ItemsControl;

                PreviousButtonElement = GetTemplateChild("PART_PreviousButton") as Button;
                NextButtonElement = GetTemplateChild("PART_NextButton") as Button;

                var dateFormat = GetCurrentDateFormat();
                _labelTitle.Content = String.Concat(dateFormat.GetMonthName(today.Month).ToUpper(), " ", today.Year);

                foreach (var name in dateFormat.DayNames)
                {
                    _titleWeekDayNames.Items.Add(name.ToUpper());
                }

                var day = new DateTime(today.Year, today.Month, 1);
                var lastDay = DateTime.DaysInMonth(today.Year, today.Month);
                for (int i = 1; i < lastDay; i++)
                {
                    _days.Items.Add(day.Day);

                    day = day.AddDays(1);
                }
            }
        }
예제 #4
0
 private static object OnBringItemIntoView(ItemsControl itemsControl, object item)
 {
     var element = itemsControl.ItemContainerGenerator.
              ContainerFromItem(item) as FrameworkElement;
     element?.BringIntoView();
     return null;
 }
예제 #5
0
        private static TreeViewItem SelectTreeViewItemForBinding(object dataItem, ItemsControl ic)
        {
            if (ic == null || dataItem == null)
            return null;

              IItemContainerGenerator generator = ic.ItemContainerGenerator;
              using (generator.StartAt(generator.GeneratorPositionFromIndex(-1), GeneratorDirection.Forward))
              {
            foreach (var t in ic.Items)
            {
              bool isNewlyRealized;
              var tvi = generator.GenerateNext(out isNewlyRealized);
              if (isNewlyRealized)
            generator.PrepareItemContainer(tvi);

              if (t == dataItem)
            return tvi as TreeViewItem;

              var tmp = SelectTreeViewItemForBinding(dataItem, tvi as ItemsControl);
              if (tmp != null)
            return tmp;
            }
              }
              return null;
        }
        // Search through items in TreeView to select one.
        bool FindItemToSelect(ItemsControl ctrl, string strSource)
        {
            foreach (object obj in ctrl.Items)
            {
                System.Xml.XmlElement xml = obj as System.Xml.XmlElement;
                string strAttribute = xml.GetAttribute("Source");
                TreeViewItem item = (TreeViewItem)
                    ctrl.ItemContainerGenerator.ContainerFromItem(obj);

                // If the TreeViewItem matches the Frame URI, select the item.
                if (strAttribute != null && strAttribute.Length > 0 &&
                                            strSource.EndsWith(strAttribute))
                {
                    if (item != null && !item.IsSelected)
                        item.IsSelected = true;

                    return true;
                }

                // Expand the item to search nested items.
                if (item != null)
                {
                    bool isExpanded = item.IsExpanded;
                    item.IsExpanded = true;

                    if (item.HasItems && FindItemToSelect(item, strSource))
                        return true;

                    item.IsExpanded = isExpanded;
                }
            }
            return false;
        }
예제 #7
0
        public ItemContainerManager(ItemsControl itemsControl)
        {
            _itemCollection = itemsControl.Items;

            _containerToItem = new Dictionary<DependencyObject, object>();
            _itemToContainer = new Dictionary<object, DependencyObject>();
        }
 internal static ItemsControl FindNextSibling(ItemsControl itemsControl)
 {
     ItemsControl parentIc = ItemsControl.ItemsControlFromItemContainer(itemsControl);
     if (parentIc == null) return null;
     int index = parentIc.ItemContainerGenerator.IndexFromContainer(itemsControl);
     return parentIc.ItemContainerGenerator.ContainerFromIndex(index + 1) as ItemsControl; // returns null if index to large or nothing found
 }
예제 #9
0
		private UIElement GetItem (ItemsControl itemsControl, int index)
		{
			var item = (UIElement) itemsControl.ItemContainerGenerator.ContainerFromIndex (index);
			if (item == null)
				item = itemsControl.Items [index] as UIElement;
			return item;
		}
예제 #10
0
 public static void MoveScrollToSelected(ItemsControl itemsControl, double to)
 {
     if (itemsControl != null)
     {
         itemsControl.Margin = new Thickness(0 - to, 0, 0, 0);
     }
 }
예제 #11
0
        private void PopulateItem(HtmlNode htmlNode, ItemsControl item)
        {
            var attributes = new TreeViewItem { Header = "Attributes" };
            foreach (var att in htmlNode.Attributes)
                attributes.Items.Add(new TreeViewItem
                {
                    Header = string.Format("{0} = {1}", att.OriginalName, att.Value),
                    DataContext = att
                });
            //If we don't have any attributes, don't add the node
            if (attributes.Items.Count > 0)
                item.Items.Add(attributes);

            //Create the Elements Collection
            var elements = new TreeViewItem { Header = "Elements", DataContext = htmlNode };
            foreach (var node in htmlNode.ChildNodes)
            {
                try
                {
                    //If there are no attributes, no need to add a node inbetween the parent in the treeview
                    if (attributes.Items.Count > 0)
                        elements.Items.Add(BuildTree(node));
                    else
                        item.Items.Add(BuildTree(node));
                }
                catch(InvalidOperationException e)
                {
                    //Debugger.Break();
                }
            }

            //If there are no nodes in the elements collection, don't add to the parent 
            if (elements.Items.Count > 0)
                item.Items.Add(elements);
        }
        public static void OnClictSorting(ItemsControl listView, RoutedEventArgs e, IGridViewColumnSort columnSort)
        {
            var headerClicked = e.OriginalSource as GridViewColumnHeader;

            if (headerClicked != null)
            {
                if (columnSort.LastHeaderClicked != null)
                {
                    columnSort.LastHeaderClicked.Column.HeaderTemplate = null;
                }

                ListSortDirection direction;
                if (headerClicked != columnSort.LastHeaderClicked)
                {
                    direction = ListSortDirection.Ascending;
                }
                else
                {
                    direction = columnSort.LastDirection == ListSortDirection.Ascending ? ListSortDirection.Descending : ListSortDirection.Ascending;
                }

                if (headerClicked.Column != null)
                {
                    var header = headerClicked.Column.Header as string;
                    Sort(listView, header, direction);

                    columnSort.LastHeaderClicked = headerClicked;
                    columnSort.LastDirection = direction;
                }
            }
        }
예제 #13
0
 private static void ExpandSubContainers(ItemsControl parentContainer)
 {
     foreach (
         var currentContainer in
             parentContainer.Items.Cast<object>()
                            .Select(
                                item =>
                                parentContainer.ItemContainerGenerator.ContainerFromItem(item) as TreeViewItem)
                            .Where(
                                currentContainer => currentContainer != null && currentContainer.Items.Count > 0)
         )
     {
         currentContainer.IsExpanded = true;
         if (currentContainer.ItemContainerGenerator.Status != GeneratorStatus.ContainersGenerated)
         {
             currentContainer.ItemContainerGenerator.StatusChanged += delegate
                 {
                     ExpandSubContainers(currentContainer);
                 };
         }
         else
         {
             ExpandSubContainers(currentContainer);
         }
     }
 }
예제 #14
0
 public static void RemoveItem(ItemsControl itemsControl, int removeIndex)
 {
     if (removeIndex != -1 && removeIndex < itemsControl.Items.Count)
     {
         if (itemsControl.ItemsSource != null)
         {
             IList iList = itemsControl.ItemsSource as IList;
             if (iList != null)
             {
                 iList.RemoveAt(removeIndex);
             }
             else
             {
                 Type type = itemsControl.ItemsSource.GetType();
                 Type genericList = type.GetInterface("IList`1");
                 if (genericList != null)
                 {
                     type.GetMethod("RemoveAt").Invoke(itemsControl.ItemsSource, new object[] { removeIndex });
                 }
             }
         }
         else
         {
             itemsControl.Items.RemoveAt(removeIndex);
         }
     }
 }
        private void ShowResourcesGained_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            RollDiceAction rollDice = e.NewValue as RollDiceAction;
            Dictionary<GamePlayer, ResourceList> result = rollDice.PlayersResources;

            basePanel.Children.Clear();

            foreach (KeyValuePair<GamePlayer, ResourceList> kvp in result)
            {
                // add list of resources
                ItemsControl resources = new ItemsControl();

                FrameworkElementFactory stackPanelElement = new FrameworkElementFactory(typeof(StackPanel));
                stackPanelElement.SetValue(StackPanel.OrientationProperty, Orientation.Horizontal);
                resources.ItemsPanel = new ItemsPanelTemplate() { VisualTree = stackPanelElement};
                resources.Height = 90;

                Binding binding = new Binding()
                {
                    Converter = new ResourceConverter()
                };
                FrameworkElementFactory imageElement = new FrameworkElementFactory(typeof(Image));
                imageElement.SetBinding(Image.SourceProperty, binding);
                imageElement.SetValue(Image.HeightProperty, 80.0);
                imageElement.SetValue(Image.WidthProperty, 80.0);

                resources.ItemTemplate = new DataTemplate()
                {
                    VisualTree = imageElement
                };
                basePanel.Children.Add(resources);
                resources.ItemsSource = kvp.Value;
            }
        }
예제 #16
0
 private TreeViewItem GetContainerFromItem(ItemsControl parent, object item)
 {
     var found = parent.ItemContainerGenerator.ContainerFromItem(item);
     if (found == null)
     {
         for (int i = 0; i < parent.Items.Count; i++)
         {
             var childContainer = parent.ItemContainerGenerator.ContainerFromIndex(i) as ItemsControl;
             TreeViewItem childFound = null;
             if (childContainer != null && childContainer.ItemContainerGenerator.Status != GeneratorStatus.ContainersGenerated)
             {
                 childContainer.ItemContainerGenerator.StatusChanged += (o, e) =>
                 {
                     childFound = GetContainerFromItem(childContainer, item);
                 };
             }
             else
             {
                 childFound = GetContainerFromItem(childContainer, item);
             }
             if (childFound != null)
                 return childFound;
         }
     }
     return found as TreeViewItem;
 }
예제 #17
0
        public static void InsertItemInItemsControl(ItemsControl itemsControl, object itemToInsert, int insertionIndex)
        {
            if (itemToInsert != null)
            {
                IEnumerable itemsSource = itemsControl.ItemsSource;

                if (itemsSource == null)
                {
                    itemsControl.Items.Insert(insertionIndex, itemToInsert);
                }
                // Is the ItemsSource IList or IList<T>? If so, insert the dragged item in the list.
                else if (itemsSource is IList)
                {
                    ((IList)itemsSource).Insert(insertionIndex, itemToInsert);
                }
                else
                {
                    Type type = itemsSource.GetType();
                    Type genericIListType = type.GetInterface("IList`1");
                    if (genericIListType != null)
                    {
                        type.GetMethod("Insert").Invoke(itemsSource, new object[] { insertionIndex, itemToInsert });
                    }
                }
            }
        }
예제 #18
0
 public static void RemoveItem(ItemsControl itemsControl, object item)
 {
     if (item != null)
     {
         int index = itemsControl.Items.IndexOf(item);
         if (index != -1)
         {
             if (itemsControl.ItemsSource != null)
             {
                 IList iList = itemsControl.ItemsSource as IList;
                 if (iList != null)
                 {
                     iList.Remove(item);
                 }
                 else
                 {
                     Type type = itemsControl.ItemsSource.GetType();
                     Type genericList = type.GetInterface("IList`1");
                     if (genericList != null)
                     {
                         type.GetMethod("RemoveAt").Invoke(itemsControl.ItemsSource, new object[] { index });
                     }
                 }
             }
             else
             {
                 itemsControl.Items.Remove(item);
             }
         }
     }
 }
예제 #19
0
        public static int RemoveItemFromItemsControl(ItemsControl itemsControl, object itemToRemove)
        {
            int indexToBeRemoved = -1;
            if (itemToRemove != null)
            {
                indexToBeRemoved = itemsControl.Items.IndexOf(itemToRemove);

                if (indexToBeRemoved != -1)
                {
                    IEnumerable itemsSource = itemsControl.ItemsSource;
                    if (itemsSource == null)
                    {
                        itemsControl.Items.RemoveAt(indexToBeRemoved);
                    }
                    // Is the ItemsSource IList or IList<T>? If so, remove the item from the list.
                    else if (itemsSource is IList)
                    {
                        ((IList)itemsSource).RemoveAt(indexToBeRemoved);
                    }
                    else
                    {
                        Type type = itemsSource.GetType();
                        Type genericIListType = type.GetInterface("IList`1");
                        if (genericIListType != null)
                        {
                            type.GetMethod("RemoveAt").Invoke(itemsSource, new object[] { indexToBeRemoved });
                        }
                    }
                }
            }
            return indexToBeRemoved;
        }
예제 #20
0
 public static void AddItem(ItemsControl itemsControl, object item, int insertIndex)
 {
     if (itemsControl.Items.IndexOf(item) == -1)
     {
         if (itemsControl.ItemsSource != null)
         {
             IList iList = itemsControl.ItemsSource as IList;
             if (iList != null)
             {
                 iList.Add(item);
             }
             else
             {
                 Type type = itemsControl.ItemsSource.GetType();
                 Type genericList = type.GetInterface("IList`1");
                 if (genericList != null)
                 {
                     type.GetMethod("Insert").Invoke(itemsControl.ItemsSource, new object[] { insertIndex, item });
                 }
             }
         }
         else
         {
             itemsControl.Items.Add(item);
         }
     }
 }
예제 #21
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
                case 1:
                    this.mainGrid = (Grid) target;
                    return;

                case 2:
                    this.storageAreaChooserPanel = (Popup) target;
                    this.storageAreaChooserPanel.PreviewKeyDown += new KeyEventHandler(this.storageAreaChooserPanel_PreviewKeyDown);
                    return;

                case 3:
                    this.chooser = (ListBox) target;
                    this.chooser.SelectionChanged += new SelectionChangedEventHandler(this.chooser_SelectionChanged);
                    this.chooser.MouseUp += new MouseButtonEventHandler(this.chooser_MouseUp);
                    return;

                case 4:
                    this.storageAreaChooserButton = (Button) target;
                    this.storageAreaChooserButton.Click += new RoutedEventHandler(this.OnStorageAreaChooserButtonClick);
                    return;

                case 5:
                    this.gaugeBar = (ItemsControl) target;
                    return;

                case 6:
                    this.gaugeLegend = (ItemsControl) target;
                    return;
            }
            this._contentLoaded = true;
        }
예제 #22
0
        public static Popup ToPopup(this IContextMenu source)
        {
            Popup popup = new Popup();
            // this offset assumes the phone is in portrait orientation.
            popup.VerticalOffset = 32;

            ItemsControl items = new ItemsControl();
            foreach(var item in source.Items)
            {
                Button button = new Button();
                button.Content = item.Header;
                button.Command = new RelayCommand<object>(
                    (param) => { popup.IsOpen = false; item.Command.Execute(param); },
                    (param) => item.Command.CanExecute(param));

                button.CommandParameter = item.CommandParameter;
                button.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                items.Items.Add(button);
            }

            Border border = new Border();
            border.Padding = new System.Windows.Thickness(12);
            border.MinWidth = 480;
            border.Background = App.Current.Resources["PhoneChromeBrush"] as Brush;
            border.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            border.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
            border.Child = items;

            popup.Child = border;
            return popup;
        }
        public WorkflowItemsPresenter()
        {
            panel = new ItemsControl();
            panel.Focusable = false;
            hintTextGrid = new Grid();
            hintTextGrid.Focusable = false;
            hintTextGrid.Background = Brushes.Transparent;
            hintTextGrid.DataContext = this;
            hintTextGrid.SetBinding(Grid.MinHeightProperty, "MinHeight");
            hintTextGrid.SetBinding(Grid.MinWidthProperty, "MinWidth");
            TextBlock text = new TextBlock();
            text.Focusable = false;
            text.SetBinding(TextBlock.TextProperty, "HintText");
            text.HorizontalAlignment = HorizontalAlignment.Center;
            text.VerticalAlignment = VerticalAlignment.Center;
            text.DataContext = this;
            text.Foreground = new SolidColorBrush(SystemColors.GrayTextColor);
            text.FontStyle = FontStyles.Italic;
            ((IAddChild)hintTextGrid).AddChild(text);

            this.outerGrid = new Grid()
            {
                RowDefinitions = { new RowDefinition(), new RowDefinition() },
                ColumnDefinitions = { new ColumnDefinition() }
            };
            Grid.SetRow(this.panel, 0);
            Grid.SetColumn(this.panel, 0);
            Grid.SetRow(this.hintTextGrid, 1);
            Grid.SetColumn(this.hintTextGrid, 0);
            this.outerGrid.Children.Add(panel);
            this.outerGrid.Children.Add(hintTextGrid);
        }
예제 #24
0
        private static bool SetSelected(ItemsControl parent,
            object child)
        {
            if (parent == null || child == null) {
                return false;
            }

            TreeViewItem childNode = parent.ItemContainerGenerator
                .ContainerFromItem(child) as TreeViewItem;

            if (childNode != null) {
                childNode.Focus();
                return childNode.IsSelected = true;
            }

            if (parent.Items.Count > 0) {
                foreach (object childItem in parent.Items) {
                    ItemsControl childControl = parent
                        .ItemContainerGenerator
                        .ContainerFromItem(childItem)
                        as ItemsControl;

                    if (SetSelected(childControl, child)) {
                        return true;
                    }
                }
            }

            return false;
        }
        public void BindItem(PtfPropertyView propertyView)
        {
            if (panels != null)
            {
                //Remove old ItemsControl
                foreach (UIElement i in LayoutRoot.Children)
                {
                    var itemsControl = i as ItemsControl;
                    if (itemsControl != null && itemsControl.Tag is string && (string)itemsControl.Tag == "PropertyPanel")
                    {
                        LayoutRoot.Children.Remove(i);
                        break;
                    }
                }

            }
            panels = new List<ItemsControl>();
            GroupList.ItemsSource = propertyView;
            foreach (var p in propertyView)
            {
                panels.Add(CreatePropertyView(p));
            }
            LayoutRoot.Children.Add(panels[0]);
            current = panels[0];
            GroupList.SelectedIndex = 0;
        }
예제 #26
0
        private void Initialize()
        {
            _itemsControl = ItemsControl.GetItemsOwner(this);
            _itemsGenerator = (IRecyclingItemContainerGenerator) ItemContainerGenerator;

            InvalidateMeasure();
        }
예제 #27
0
			private void FillLayers(ItemsControl root)
			{
				foreach (var dwgLayer in dwgDocument.GetLayers())
				{
					var layerItem = new TreeViewItem
					{
						Header = dwgLayer.Name
					};

					FillEntities(layerItem, dwgLayer);
					root.Items.Add(layerItem);

					// Помещаем в таблицу соответствующий слой при его выделении в дереве
					var dwgLayerCopy = dwgLayer;
					layerItem.Selected += delegate(object sender, RoutedEventArgs args)
						{
							// Отсеиваем маршрутизируемые события от дочерних узлов
							if (layerItem.Equals(args.Source) && propertyGrid != null)
								propertyGrid.SelectedObject = dwgLayerCopy;
						};

					// Повторяем в дереве изменения значений имен слоев в таблице
					dwgLayerCopy.NameChanged += (sender, newName) => layerItem.Header = newName;
				}
			}
예제 #28
0
		// Walks up the tree starting at the bottomMostVisual, until it finds the first item container for the ItemsControl
		// passed as a parameter.
		// In order to make sure it works with any control that derives from ItemsControl, this method makes no assumption 
		// about the type of that container.(it will get a ListBoxItem if it's a ListBox, a ListViewItem if it's a ListView...)
		public static FrameworkElement GetItemContainer(ItemsControl itemsControl, Visual bottomMostVisual)
		{
			FrameworkElement itemContainer = null;
			if (itemsControl != null && bottomMostVisual != null && itemsControl.Items.Count >= 1)
			{
				var someContainer = itemsControl.ItemContainerGenerator.ContainerFromIndex(0);
				for (int i = 1; i < itemsControl.Items.Count; i++)
				{
					if (someContainer != null)
					{
						break;
					}

					someContainer = itemsControl.ItemContainerGenerator.ContainerFromIndex(i);
				}

				if (someContainer != null)
				{
					Type containerType = someContainer.GetType();

					itemContainer = FindAncestor(containerType, bottomMostVisual);

					// Make sure that the container found belongs to the items control passed as a parameter.
					if (itemContainer != null && itemContainer.DataContext != null)
					{
						FrameworkElement itemContainerVerify = itemsControl.ItemContainerGenerator.ContainerFromItem(itemContainer.DataContext) as FrameworkElement;
						if (itemContainer != itemContainerVerify)
						{
							itemContainer = null;
						}
					}
				}
			}
			return itemContainer;
		}
예제 #29
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/BusCon;component/Utility/CMContrib.SL/Interaction/DialogView.xaml", System.UriKind.Relative));
     this.Responses = ((System.Windows.Controls.ItemsControl)(this.FindName("Responses")));
 }
예제 #30
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ButtonList = ((System.Windows.Controls.ItemsControl)(target));

            #line 19 "..\..\..\EDP-GUI\SideButtonMenu.xaml"
                this.ButtonList.Loaded += new System.Windows.RoutedEventHandler(this.ButtonList_Loaded);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
예제 #31
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Duyu.Timeline;component/Control/TimeLineControl.xaml", System.UriKind.Relative));
     this.sv_Main             = ((System.Windows.Controls.ScrollViewer)(this.FindName("sv_Main")));
     this.ItemContainer       = ((System.Windows.Controls.Grid)(this.FindName("ItemContainer")));
     this.TopMoreContainer    = ((System.Windows.Controls.Grid)(this.FindName("TopMoreContainer")));
     this.TopMore             = ((System.Windows.Controls.Button)(this.FindName("TopMore")));
     this.tc_Items            = ((System.Windows.Controls.ItemsControl)(this.FindName("tc_Items")));
     this.BottomMoreContainer = ((System.Windows.Controls.Grid)(this.FindName("BottomMoreContainer")));
     this.BottomMore          = ((System.Windows.Controls.Button)(this.FindName("BottomMore")));
 }
예제 #32
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/gAMS_Sacombank;component/UploadFileControl/FileUploadControl.xaml", System.UriKind.Relative));
     this.LayoutRoot        = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.controlBorder     = ((System.Windows.Controls.Border)(this.FindName("controlBorder")));
     this.fileUploadGrid    = ((System.Windows.Controls.Grid)(this.FindName("fileUploadGrid")));
     this.filesScrollViewer = ((System.Windows.Controls.ScrollViewer)(this.FindName("filesScrollViewer")));
     this.fileList          = ((System.Windows.Controls.ItemsControl)(this.FindName("fileList")));
     this.addFilesButton    = ((System.Windows.Controls.Button)(this.FindName("addFilesButton")));
     this.delFilesButton    = ((System.Windows.Controls.Image)(this.FindName("delFilesButton")));
 }
예제 #33
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ProductsControl = ((System.Windows.Controls.ItemsControl)(target));

            #line 26 "..\..\..\Products\ProductListView.xaml"
                this.ProductsControl.PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(this.ProductsControl_PreviewMouseDown);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/FBReader.App;component/Controls/ApplicationBar/FBReaderApplicationBar.xaml", System.UriKind.Relative));
     this.AppBar                    = ((System.Windows.Controls.UserControl)(this.FindName("AppBar")));
     this.RootBorder                = ((System.Windows.Controls.Border)(this.FindName("RootBorder")));
     this.Slider                    = ((FBReader.App.Controls.ApplicationBar.FBSlider)(this.FindName("Slider")));
     this.IconButtonsGrid           = ((System.Windows.Controls.Grid)(this.FindName("IconButtonsGrid")));
     this.IconButtonsPanel          = ((System.Windows.Controls.ItemsControl)(this.FindName("IconButtonsPanel")));
     this.PageSelectionButtonsPanel = ((System.Windows.Controls.StackPanel)(this.FindName("PageSelectionButtonsPanel")));
     this.MenuScroll                = ((System.Windows.Controls.ScrollViewer)(this.FindName("MenuScroll")));
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.itemsControl = ((System.Windows.Controls.ItemsControl)(target));

            #line 16 "..\..\SinglePageMoonPdfPanel.xaml"
                this.itemsControl.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.ItemsControl_OnMouseDown);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.CamerasListActionPanelUIcontrol = ((STC.Projects.WPFControlLibrary.SOPBox.UserControls.CamerasListActionPanelUserControl)(target));
                return;

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

            #line 109 "..\..\..\UserControls\CamerasListActionPanelUserControl.xaml"
                this.Btnback.Click += new System.Windows.RoutedEventHandler(this.ClosePopup_OnClick);

            #line default
            #line hidden
                return;

            case 3:
                this.CamerasList = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 5:
                this.flt_canvas_MediaPlayer = ((System.Windows.Controls.Canvas)(target));
                return;

            case 6:
                this.FullScreenVideo = ((System.Windows.Controls.MediaElement)(target));

            #line 149 "..\..\..\UserControls\CamerasListActionPanelUserControl.xaml"
                this.FullScreenVideo.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.mediaElement1_MouseDown);

            #line default
            #line hidden
                return;

            case 7:

            #line 153 "..\..\..\UserControls\CamerasListActionPanelUserControl.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ConfirmEvent_OnClick);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
예제 #37
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.tb_optionTitle = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 2:
                this.icItem = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 5:
                this.tb_value = ((System.Windows.Controls.TextBlock)(target));
                return;

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

            #line 242 "..\..\..\View\ItemOption.xaml"
                this.bt_BackOption.Click += new System.Windows.RoutedEventHandler(this.Back);

            #line default
            #line hidden
                return;

            case 7:

            #line 263 "..\..\..\View\ItemOption.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.addMeat);

            #line default
            #line hidden
                return;

            case 8:
                this.bt_NextOption = ((System.Windows.Controls.Button)(target));

            #line 277 "..\..\..\View\ItemOption.xaml"
                this.bt_NextOption.Click += new System.Windows.RoutedEventHandler(this.Next);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\..\Controls\ucCardSettings.xaml"
                ((Dominion.NET_WPF.Controls.ucCardSettings)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.gbCardName = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 3:
                this.lName = ((System.Windows.Controls.Label)(target));

            #line 11 "..\..\..\Controls\ucCardSettings.xaml"
                this.lName.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.lName_MouseDown);

            #line default
            #line hidden

            #line 11 "..\..\..\Controls\ucCardSettings.xaml"
                this.lName.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.lName_MouseUp);

            #line default
            #line hidden
                return;

            case 4:
                this.ttCard = ((System.Windows.Controls.ToolTip)(target));
                return;

            case 5:
                this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
                return;

            case 6:
                this.icCardSetting = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #39
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\KorpaProzor.xaml"
                ((SmartSoftware.KorpaProzor)(target)).Closed += new System.EventHandler(this.Window_Closed);

            #line default
            #line hidden
                return;

            case 2:
                this.pera = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 6:
                this.gridDugmici = ((System.Windows.Controls.Grid)(target));
                return;

            case 7:
                this.txbUkupnaCena = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.btnKupi = ((System.Windows.Controls.Button)(target));

            #line 96 "..\..\KorpaProzor.xaml"
                this.btnKupi.Click += new System.Windows.RoutedEventHandler(this.btnKupi_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.btnObrisiCeluKorpu = ((System.Windows.Controls.Button)(target));

            #line 100 "..\..\KorpaProzor.xaml"
                this.btnObrisiCeluKorpu.Click += new System.Windows.RoutedEventHandler(this.btnObrisiCeluKorpu_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
예제 #40
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.blackjackWindow = ((BlackjackWPF.MainWindow)(target));
                return;

            case 2:
                this.dealerBox = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 3:
                this.dealerCardsItemControl = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 4:
                this.playerBox = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 5:
                this.playerCardsItemControl = ((System.Windows.Controls.ItemsControl)(target));
                return;

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

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

            case 8:
                this.standButton = ((System.Windows.Controls.Button)(target));
                return;

            case 9:
                this.resetButton = ((System.Windows.Controls.Button)(target));
                return;

            case 10:
                this.hitButton = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #41
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.KinectDemoWindow = ((KinectDemos.MainWindow)(target));
                return;

            case 2:
                this.kinectRegion = ((Microsoft.Kinect.Wpf.Controls.KinectRegion)(target));
                return;

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

            #line 26 "..\..\MainWindow.xaml"
                this.backButton.Click += new System.Windows.RoutedEventHandler(this.GoBack);

            #line default
            #line hidden
                return;

            case 4:
                this.navigationRegion = ((System.Windows.Controls.ContentControl)(target));
                return;

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

            case 6:
                this.scrollViewer = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 7:
                this.itemsControl = ((System.Windows.Controls.ItemsControl)(target));

            #line 38 "..\..\MainWindow.xaml"
                this.itemsControl.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.ButtonClick));

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
예제 #42
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.handwrite = ((MyTablet.InkTablet)(target));

            #line 6 "..\..\InkTablet.xaml"
                this.handwrite.Loaded += new System.Windows.RoutedEventHandler(this.handwrite_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.backImg = ((System.Windows.Controls.Image)(target));
                return;

            case 3:
                this.theInkCanvas = ((System.Windows.Controls.InkCanvas)(target));
                return;

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

            #line 188 "..\..\InkTablet.xaml"
                this.delete.Click += new System.Windows.RoutedEventHandler(this.delete_Click);

            #line default
            #line hidden
                return;

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

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

            case 7:
                this.itc = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #43
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MainWindowPanel = ((TL_DD.MainWindow)(target));

            #line 8 "..\..\MainWindow.xaml"
                this.MainWindowPanel.Loaded += new System.Windows.RoutedEventHandler(this.MainWindow_Load);

            #line default
            #line hidden
                return;

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

            case 3:
                this.MainMenu = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 4:
                this.PinButton = ((System.Windows.Controls.MenuItem)(target));

            #line 40 "..\..\MainWindow.xaml"
                this.PinButton.Click += new System.Windows.RoutedEventHandler(this.PinButton_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.TaskList = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 7:
                this.CombinedCalendar = ((System.Windows.Controls.Calendar)(target));
                return;

            case 8:
                this.CombinedClock = ((MaterialDesignThemes.Wpf.Clock)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #44
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Logo = ((System.Windows.Controls.Canvas)(target));
                return;

            case 2:
                this.MainToolbar = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 3:
                this.ContentGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.cActionContent = ((System.Windows.Controls.ContentControl)(target));
                return;

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

            case 6:
                this.ActionContent = ((System.Windows.Controls.ContentControl)(target));
                return;

            case 7:
                this.SideGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 8:
                this.btnSalesTrans = ((System.Windows.Controls.Button)(target));
                return;

            case 9:
                this.btnItems = ((System.Windows.Controls.Button)(target));
                return;

            case 10:
                this.btnCustomers = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #45
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/GoShopping;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot          = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel        = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.pullDownItemBehind  = ((GoShopping.Controls.PullDownItem)(this.FindName("pullDownItemBehind")));
     this.todoList            = ((System.Windows.Controls.ItemsControl)(this.FindName("todoList")));
     this.pullDownItemInFront = ((GoShopping.Controls.PullDownItem)(this.FindName("pullDownItemInFront")));
     this.dragImageControl    = ((GoShopping.Controls.DragImage)(this.FindName("dragImageControl")));
     this.PastePopup          = ((System.Windows.Controls.Primitives.Popup)(this.FindName("PastePopup")));
     this.PasteBox            = ((Coding4Fun.Toolkit.Controls.ChatBubbleTextBox)(this.FindName("PasteBox")));
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 14 "..\..\..\Bill\ImportFromExcel.xaml"
                ((MaterialDesignThemes.Wpf.ColorZone)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.ColorZone_MouseDown);

            #line default
            #line hidden
                return;

            case 2:

            #line 28 "..\..\..\Bill\ImportFromExcel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseButton_Click);

            #line default
            #line hidden
                return;

            case 3:

            #line 52 "..\..\..\Bill\ImportFromExcel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.itemsControl = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 5:
                this.emptyAnnounce = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.ProgressBar = ((System.Windows.Controls.ProgressBar)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #47
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\MainWindow.xaml"
                ((BouncingBall.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded);

            #line default
            #line hidden

            #line 6 "..\..\MainWindow.xaml"
                ((BouncingBall.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.KeypadDown);

            #line default
            #line hidden

            #line 7 "..\..\MainWindow.xaml"
                ((BouncingBall.MainWindow)(target)).KeyUp += new System.Windows.Input.KeyEventHandler(this.KeypadUp);

            #line default
            #line hidden

            #line 8 "..\..\MainWindow.xaml"
                ((BouncingBall.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.OnClosing);

            #line default
            #line hidden
                return;

            case 2:
                this.ScoreCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 3:
                this.BallCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 4:
                this.BrickItems = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #48
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MenuListBox = ((System.Windows.Controls.ListBox)(target));

            #line 24 "..\..\MainWindow.xaml"
                this.MenuListBox.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.UIElement_OnPreviewMouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 2:
                this.MenuToggleButton = ((System.Windows.Controls.Primitives.ToggleButton)(target));
                return;

            case 3:

            #line 44 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuPopupButton_OnClick);

            #line default
            #line hidden
                return;

            case 4:
                this.CountingBadge = ((MaterialDesignThemes.Wpf.Badged)(target));
                return;

            case 5:
                this.CartItemsListBox = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 6:
                this.MainContent = ((System.Windows.Controls.Grid)(target));
                return;

            case 7:
                this.MainSnackbar = ((MaterialDesignThemes.Wpf.Snackbar)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #49
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\..\Shell.xaml"
                ((Samba.Presentation.Shell)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing);

            #line default
            #line hidden

            #line 5 "..\..\..\Shell.xaml"
                ((Samba.Presentation.Shell)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded);

            #line default
            #line hidden
                return;

            case 2:
                this.MainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.TimeLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.MainTabControl = ((System.Windows.Controls.TabControl)(target));
                return;

            case 5:
                this.UserRegion = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 6:
                this.MessageRegion = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 7:
                this.RightUserRegion = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #50
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.raceTrack = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 2:
                this.rotationSlider = ((System.Windows.Controls.Slider)(target));
                return;

            case 3:
                this.lnkStartNewRace = ((System.Windows.Documents.Hyperlink)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #51
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.win = ((Pharos.POS.Retailing.ChildWin.KuaiJieJian)(target));
                return;

            case 2:
                this.btnSave = ((Pharos.Wpf.Controls.PosButton)(target));
                return;

            case 3:
                this.list = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #52
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.btnLosowo = ((System.Windows.Controls.Button)(target));
                return;

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

            case 3:
                this.icListaFilmow = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #53
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.fuzzyquery = ((MaterialEWpfDemo.FuzzyQueryControl)(target));
                return;

            case 2:
                this.querykey = ((Xceed.Wpf.Toolkit.WatermarkTextBox)(target));
                return;

            case 3:
                this.itemscontrol = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.SVroller = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 2:
                this.IC = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 3:
                this.StatesTextBox = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #55
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.clicksList = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 2:
                this.targetGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.stack = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #56
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Colors = ((System.Windows.Controls.ItemsControl)(target));
                return;

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

            case 3:
                this.btn_cancel = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #57
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.currentPlayer = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.checkersGrid = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #58
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.weekdayControl = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 3:
                this.dayTimeHoverText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.test = ((System.Windows.Shapes.Rectangle)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #59
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.self = ((Petri.Editor.UI.Editor.EditorView)(target));
                return;

            case 2:
                this.MainItemsControl = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 3:
                this.LabelCurrentCommand = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #60
-1
        public static object showTmplGroup(string addStr, ItemsControl itemFrame, RoutedEventHandler rehClick, string rowId = "")
        {
            object retItemFrame = null;

            if (MainWindow.s_pW.m_docConf.SelectSingleNode("Config").SelectSingleNode("template") != null &&
                MainWindow.s_pW.m_docConf.SelectSingleNode("Config").SelectSingleNode("template").SelectSingleNode(addStr + "Tmpls") != null)
            {
                XmlElement xeTmpls = (XmlElement)MainWindow.s_pW.m_docConf.SelectSingleNode("Config").
                    SelectSingleNode("template").SelectSingleNode(addStr + "Tmpls");
                retItemFrame = showTmpl(itemFrame, xeTmpls, addStr, rehClick, rowId);
            }

            if (Project.Setting.s_docProj.SelectSingleNode("BoloUIProj").SelectSingleNode("template") != null &&
                Project.Setting.s_docProj.SelectSingleNode("BoloUIProj").SelectSingleNode("template").SelectSingleNode(addStr + "Tmpls") != null)
            {
                XmlElement xeTmpls = (XmlElement)Project.Setting.s_docProj.SelectSingleNode("BoloUIProj").
                    SelectSingleNode("template").SelectSingleNode(addStr + "Tmpls");
                object ret = showTmpl(itemFrame, xeTmpls, addStr, rehClick, rowId);

                if (ret != null)
                {
                    retItemFrame = ret;
                }
            }

            return retItemFrame;
        }