コード例 #1
0
        void item_ItemSelectedEvent(object sender, CatrobatListViewEventArgs e)
        {
            var  tmpObj   = (sender as CatrobatListViewItem).Content;
            bool contains = SmartSelectedItems.Contains(tmpObj);

            AddRemoveSelectedItem(tmpObj, contains);

            if (tmpObj is BlockBeginBrick)
            {
                AddRemoveSelectedItem((tmpObj as BlockBeginBrick).End, contains);
                if (tmpObj is IfBrick)
                {
                    AddRemoveSelectedItem((tmpObj as IfBrick).Else, contains);
                }
                else if (tmpObj is ElseBrick)
                {
                    AddRemoveSelectedItem((tmpObj as ElseBrick).Begin, contains);
                }
            }
            else if (tmpObj is BlockEndBrick)
            {
                AddRemoveSelectedItem((tmpObj as BlockEndBrick).Begin, contains);
                if (tmpObj is EndIfBrick)
                {
                    AddRemoveSelectedItem((tmpObj as EndIfBrick).Else, contains);
                }
            }
        }
コード例 #2
0
 void item_ItemGroupEvent(object sender, CatrobatListViewEventArgs e)
 {
     _scrollViewer.Focus(FocusState.Pointer);
     GroupItem(sender as CatrobatListViewItem);
 }
コード例 #3
0
        void item_ItemSelectedEvent(object sender, CatrobatListViewEventArgs e)
        {
            var tmpObj = (sender as CatrobatListViewItem).Content;
            bool contains = SmartSelectedItems.Contains(tmpObj);

            AddRemoveSelectedItem(tmpObj, contains);

            if (tmpObj is BlockBeginBrick)
            {
                AddRemoveSelectedItem((tmpObj as BlockBeginBrick).End, contains);
                if (tmpObj is IfBrick)
                {
                    AddRemoveSelectedItem((tmpObj as IfBrick).Else, contains);
                }
                else if (tmpObj is ElseBrick)
                {
                    AddRemoveSelectedItem((tmpObj as ElseBrick).Begin, contains);
                }
            }
            else if (tmpObj is BlockEndBrick)
            {
                AddRemoveSelectedItem((tmpObj as BlockEndBrick).Begin, contains);
                if (tmpObj is EndIfBrick)
                {
                    AddRemoveSelectedItem((tmpObj as EndIfBrick).Else, contains);
                }
            }

        }
コード例 #4
0
 void item_ItemGroupEvent(object sender, CatrobatListViewEventArgs e)
 {
     _scrollViewer.Focus(FocusState.Pointer);
     GroupItem(sender as CatrobatListViewItem);
 }
コード例 #5
0
 void clvw_ItemDragCompletedEvent(object sender, CatrobatListViewEventArgs e)
 {
     this.ItemsSource.CollectionChanged -= ItemsSource_CollectionChanged;
     DragTransfer(e.GetTmpControl(), e.GetOrignalContent(), e.GetGroupedItems());
     this.ItemsSource.CollectionChanged += ItemsSource_CollectionChanged;
 }