• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ScatterViewItem类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ScatterViewItem的典型用法代码示例。如果您正苦于以下问题:C# ScatterViewItem类的具体用法?C# ScatterViewItem怎么用?C# ScatterViewItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ScatterViewItem类属于命名空间,在下文中一共展示了ScatterViewItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MainTab

 public MainTab(int page, TabItem newTab, Image newVerso, Image newRecto, Grid canvas, Grid vGrid, Grid rGrid, Button delBtn, ScatterView SV, ScatterViewItem si, Grid vSwipeGrid, Grid rSwipeGrid, Grid vTranslationGrid, Grid rTranslationGrid, Grid vBoxesGrid, Grid rBoxesGrid, TextBlock headerText, SurfaceWindow1.language language)
 {
     _page = page;
     _tab = newTab;
     _verso = newVerso;
     _recto = newRecto;
     _canvas = canvas;
     _vGrid = vGrid;
     _rGrid = rGrid;
     _SVI = si;
     _delButton = delBtn;
     numFingersRecto = 0;
     numFingersVerso = 0;
     fingerPos = new List<Point>();
     avgTouchPoint = new Point(-1, 0);
     _vSwipeGrid = vSwipeGrid;
     _rSwipeGrid = rSwipeGrid;
     _vTranslationGrid = vTranslationGrid;
     _rTranslationGrid = rTranslationGrid;
     _vBoxesGrid = vBoxesGrid;
     _rBoxesGrid = rBoxesGrid;
     _twoPage = true;
     _SV = SV;
     _headerTB = headerText;
     _currentLanguage = language;
     _previousLanguage = _currentLanguage;
     _worker = new Workers(this);
 }
开发者ID:straboulsi,项目名称:fauvel,代码行数:28,代码来源:Tab.cs


示例2: addFilter

      public override void addFilter(object query, ScatterViewItem filterTile) {
         double y = (40 * (this.filters.Count)) - 10;
         Canvas.SetRight(filterTile, this.ActualWidth - 10);
         Canvas.SetTop(filterTile, y);

         this.filters.Add((iFilter)query);
      }
开发者ID:prgoodwin,项目名称:HabilisX,代码行数:7,代码来源:MagicLens.cs


示例3: activateFilterTile

      public void activateFilterTile(String str, Brush color, object tag)
      {
         Label label = new Label();
         label.Foreground = Brushes.White;
         label.Content = str;

         ScatterViewItem filterTile = new ScatterViewItem();

         filterTile.PreviewMouseDown += new MouseButtonEventHandler(filterTile_PreviewMouseDown);
         filterTile.MouseUp += new System.Windows.Input.MouseButtonEventHandler(filterTile_MouseUp);
         filterTile.TouchEnter += new EventHandler<TouchEventArgs>(filterTile_TouchEnter);
         filterTile.TouchLeave += new EventHandler<TouchEventArgs>(filterTile_TouchLeave);


         filterTile.MinHeight = 0;
         filterTile.Height = 35;
         filterTile.Orientation = 0;

         filterTile.CanMove = false;
         filterTile.CanRotate = false;
         filterTile.CanScale = false;
         filterTile.ShowsActivationEffects = false;

         filterTile.Background = color;
         filterTile.Tag = tag;

         filterTile.Content = label;

         ((Canvas)(this.Content)).Children.Add(filterTile);
          this.addFilter(tag, filterTile);
      }
开发者ID:prgoodwin,项目名称:HabilisX,代码行数:31,代码来源:FilterTool.cs


示例4: FileFetcher

 public FileFetcher(String deviceId, ScatterViewItem item, String originalFileFullPath, 
     SlidboardView view)
 {
     this.DEVICE_ID = deviceId;
     this.item = item;
     this.originalFileFullPath = originalFileFullPath;
     this.view = view;
 }
开发者ID:yungookim,项目名称:slidboard,代码行数:8,代码来源:SlidboardView.xaml.cs


示例5: addFilter

      public override void addFilter(object attTag, ScatterViewItem filterTile)
      {
         double y = (40 * (this.attributes.Count)) - 10;
         Canvas.SetRight(filterTile, 105);
         Canvas.SetTop(filterTile, y);

         attributes.Add((String)attTag);
      }
开发者ID:prgoodwin,项目名称:HabilisX,代码行数:8,代码来源:MagnifyingGlass.cs


示例6: AddLibBar

 void AddLibBar()
 {
     ScatterViewItem libbarscatterview = new ScatterViewItem();
     libbarscatterview.Width = 500;
     libbarscatterview.Height = 250;
     libbarscatterview.Content = LibBar;
     LibScatterView.Items.Add(libbarscatterview);
     //TopImageDockPanel.Children.Add(libbarscatterview);
 }
开发者ID:scsuvizlab,项目名称:SE3900Projects,代码行数:9,代码来源:SurfaceWindow1.xaml.cs


示例7: Chip

 public Chip(ScatterViewItem chip, double betControlLine, double xChip, double yChip, int chipValue, Uri imagePath)
 {
     this.chip = chip;
     this.betControlLine = betControlLine;
     this.xChip = xChip;
     this.yChip = yChip;
     this.chipValue = chipValue;
     this.imagePath = imagePath;
 }
开发者ID:B3J4y,项目名称:Poker-PixelSense--Surface-2-,代码行数:9,代码来源:Chip.cs


示例8: ImageItem

        /// <summary>
        /// Constructer with scatterViewItem, imageName and owner
        /// </summary>
        public ImageItem(ScatterViewItem svi, string imageName, string owner)
        {
            this.svi = svi;
            this.imageName = imageName;
            this.owner = owner;
            string[] ownerArray = new string[3];

            ownerArray[0] = owner;
        }
开发者ID:NikolajMos,项目名称:Image-Exchange-System,代码行数:12,代码来源:ImageItem.cs


示例9: WebStack

        public WebStack(ScatterView sv, Point origin, WebGroup gr, String group, KnowledgeWeb knowledge, LADSArtworkMode.ArtworkModeWindow art, int g)
        {
            groupNo = g;
            artwork = art;
            kw = knowledge;
            _sv = sv;
            _images = gr.getGroupBitmap(group);
            if (_images == null)
                return;

            foreach (BitmapImage i in _images)
            {
                ScatterViewItem svi = new ScatterViewItem();
                svi.MinHeight = 1;
                svi.MinWidth = 1;
                Image img = new Image();
                img.Source = i;

                sviContent content = new sviContent();
                content.g = new Grid();
                content.g.Height = INITIAL_THUMB_HEIGHT;
                content.g.Width = INITIAL_THUMB_HEIGHT;

                content.im = img;

                content.r = new Rectangle();
                content.r.Height = INITIAL_THUMB_HEIGHT;
                content.r.Width = INITIAL_THUMB_HEIGHT;
                content.r.Visibility = Visibility.Collapsed;

                content.g.Children.Add(content.r);
                content.g.Children.Add(content.im);

                content.used = false;

                svi.Content = content.g;
                svi.Tag = content;

                svi.Height = INITIAL_THUMB_HEIGHT;
                svi.Width = INITIAL_THUMB_HEIGHT;
                svi.Orientation = 0;
                svi.CanRotate = false;
                svi.CanMove = false;
                svi.CanScale = false;
                svi.PreviewTouchUp += new EventHandler<System.Windows.Input.TouchEventArgs>(svi_PreviewTouchUp);
                svi.PreviewTouchDown += new EventHandler<TouchEventArgs>(svi_PreviewTouchDown);
                svi.SizeChanged += new SizeChangedEventHandler(svi_SizeChanged);

                knowledge.sviList.Add(svi);

                _svis.Add(svi);
                _sv.Items.Add(svi);
            }

            PositionScatterViewItems(origin);
        }
开发者ID:huylu,项目名称:brownuniversitylads,代码行数:56,代码来源:WebStack.cs


示例10: AddLibraryStack

 public void AddLibraryStack()
 {
     ScatterViewItem NewSVI = new ScatterViewItem();
     NewSVI.Width = 300;
     NewSVI.Name = "LibStackSVI";
     NewSVI.Height = 300;
     NewSVI.Background = new SolidColorBrush(Colors.Transparent);
     NewSVI.Content = LibStack;
     LibScatterView.Items.Add(NewSVI);
 }
开发者ID:scsuvizlab,项目名称:SE3900Projects,代码行数:10,代码来源:SurfaceWindow1.xaml.cs


示例11: TagVisualization3_Loaded

        private void TagVisualization3_Loaded(object sender, RoutedEventArgs e)
        {
            //TODO: customize TagVisualization3's UI based on this.VisualizedTag here
            base.OnInitialized(e);

            // Query the registry to find out where the sample media is stored.
            const string shellKey =
               @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell Folders";

            string videosPath =
           (string)Microsoft.Win32.Registry.GetValue(shellKey, "CommonVideo", null) + @"\Sample Videos";

            // The name of the video.
            string targetVideo = @"C:\Users\hcilab\Desktop\Polina\CS320HW2Media\greece.mp4";

            // string targetVideo = @"Wildlife.wmv";
            // Create a ScatterViewItem control and add it to the Items collection.
            ScatterViewItem item = new ScatterViewItem();
            videoScatter.Items.Add(item);

            // Create a MediaElement object.
            MediaElement video = new MediaElement();

            video.LoadedBehavior = MediaState.Manual;
            video.UnloadedBehavior = MediaState.Manual;

            // The media dimensions are not available until the MediaOpened event.
            video.MediaOpened += delegate
            {
                // Size the ScatterViewItem control according to the video size.
                item.Height = video.NaturalVideoHeight / 2;
                item.Width = video.NaturalVideoWidth / 2;


            };

            // Set the Content to the video.
            item.Content = video;

            // Get the video if it exists.
            if (System.IO.File.Exists(targetVideo))
            {
                video.Source = new Uri(targetVideo);
                video.Play();
            }
            else
            {
                item.Content = "Video not found";
            }



        }
开发者ID:polinadotio,项目名称:microsoftsurfacesample,代码行数:53,代码来源:TagVisualization3.xaml.cs


示例12: RemoveShadow

 public static void RemoveShadow(ScatterViewItem tool)
 {
     RoutedEventHandler loadedEventHandler = null;
     loadedEventHandler = new RoutedEventHandler(delegate
     {
         tool.Loaded -= loadedEventHandler;
         Microsoft.Surface.Presentation.Generic.SurfaceShadowChrome ssc;
         ssc = tool.Template.FindName("shadow", tool) as Microsoft.Surface.Presentation.Generic.SurfaceShadowChrome;
         ssc.Visibility = Visibility.Hidden;
     });
     tool.Loaded += loadedEventHandler;
 }
开发者ID:prgoodwin,项目名称:HabilisX,代码行数:12,代码来源:Utils.cs


示例13: RealPrimerBlastUC

        public RealPrimerBlastUC(List<ResultSVI> resultList, int totalBasePairs)
        {
            InitializeComponent();

            scoreGen = new Random(88);
            startGen = new Random(315);
            stopGen = new Random(12);
            this.totalBasePairs = totalBasePairs;
            //int i = _maxResult;


            //while (i > 0)
            Console.WriteLine(resultList.Count);
            for (int i = 0; i < resultList.Count; i++) 
            {
                Console.WriteLine(i);
                //BlastPrimerResult bpr = new BlastPrimerResult(scoreGen.Next(0,100), startGen.Next(0, 999), stopGen.Next(1024));
                


                //faking
                //float scoreGenFloat = scoreGen.Next(80, 100);
                //float startGenFloat = startGen.Next(0, 1016); 

                //adding back end
                ResultSVI result = resultList[i];
                double scoreGenFloat = result.GetScore();
                double startGenFloat = result.GetHitStart(); 
                _maxResult--;
                if (i<7)
                {
                    RealBlastPrimerResult bpr = new RealBlastPrimerResult(result, _maxResult, totalBasePairs);
                    bpr.ScatterManipulationStarted += new ScatterManipulationStartedEventHandler(bpr_ScatterManipulationStarted);
                    Momma.Items.Add(bpr);

                    ScatterViewItem matchMark = new ScatterViewItem();
                    matchMark.Width = 5;
                    matchMark.MinWidth = 5;
                    matchMark.Height = 100;
                    matchMark.Center = new Point(bpr.Center.X, 50);
                    matchMark.Background = Brushes.Yellow;
                    matchMark.IsTopmostOnActivation = false;
                    matchMark.ShowsActivationEffects = false;
                    matchMark.CanMove = false;
                    matchMark.CanRotate = false;
                    matchMark.CanScale = false;

                    Momma.Items.Add(matchMark);
                }
                //i--;
            }
        }
开发者ID:igemsoftware,项目名称:BU_Wellesley_Software_2011,代码行数:52,代码来源:RealPrimerBlastUC.xaml.cs


示例14: MergeBetween

        private void MergeBetween(ScatterViewItem sviChild, ScatterViewItem sviSource)
        {
            //merge the colors and assign it to the remaining SVI
            //expanded for readibility
            SolidColorBrush scb1 = sviSource.Background as SolidColorBrush;
            SolidColorBrush scb2 = sviChild.Background as SolidColorBrush;

            sviChild.Background = new SolidColorBrush(Color.Add(scb1.Color, scb2.Color));

            _scatter.Items.Remove(sviSource);

            //No need to continue, exit out.
            return;
        }
开发者ID:AmrReda,项目名称:MergingSVISample,代码行数:14,代码来源:MainWindow.xaml.cs


示例15: Bubble

        public Bubble(int _id, ScatterViewItem scatterItem)
        {
            Random r = new Random();
            if (sv == null) throw new Exception("No ScatterView defined (use Bubble.setScatterView())");
            angle = r.Next(0, 360);
            id = _id;

            //ellipse.TouchDown += new EventHandler<TouchEventArgs>(endAnimation);
            //<Ellipse Fill="Red" Opacity="0.5" Margin="10" TouchDown="endAnimation" />

            Image im = new Image();
            String path;

            switch (id)
            {
                default:
                case 0: path = "bullenote.png"; duration = 2;  break;
                case 1: path = "bullecroche.png"; duration = 1;  break;
                case 2: path = "bulleblanche.png"; duration = 4; break;
            }

            Grid grid = new Grid();
            name = SurfaceWindow1.nbBubble;
            im.Source = new BitmapImage(new Uri("Images/" + path, UriKind.Relative));
            im.IsHitTestVisible = false;
            im.Height = 60;
            im.Width = 60;

            grid.Children.Add(im);

            Ellipse ellipse = new Ellipse();
            ellipse.Fill = System.Windows.Media.Brushes.Red;
            ellipse.Margin = new Thickness(20);
            ellipse.Opacity = 0.5;

            grid.Children.Add(ellipse);

            svitem = scatterItem;
            svitem.Background = Brushes.Transparent;
            svitem.ShowsActivationEffects = false;
            svitem.Height = 40;
            svitem.Width = 40;

            svitem.Content = grid;

            svitem.Name = "b"+name.ToString();
            SurfaceWindow1.nbBubble++;
            sv.Items.Add(scatterItem);
        }
开发者ID:Denis72,项目名称:PopnTouch,代码行数:49,代码来源:Bubble.cs


示例16: createFileList

 /// <summary>
 ///  Factory method. Creates ScatterViewItemViews of items out from given ls
 /// </summary>
 /// <param name="ls"></param>
 /// <param name="deviceName"></param>
 /// <param name="startingPosition"></param>
 /// <returns></returns>
 public ScatterViewItem[] createFileList(ArrayList ls, String deviceName)
 {
     ls.TrimToSize();
     ScatterViewItem[] items = new ScatterViewItem[ls.Count];
     for (int i = 0; i < ls.Count; i++)
     {
         IndexObject item = ls[i] as IndexObject;
         ScatterViewItem temp = this.getItemView(item, deviceName);
         if (temp != null)
         {
             items[i] = temp;
         }
     }
         return items;
 }
开发者ID:yungookim,项目名称:slidboard,代码行数:22,代码来源:ObjectVisualization.xaml.cs


示例17: NewWebBrowser

        /// <summary>
        /// Adds a new web browser to the scatter control
        /// </summary>
        public void NewWebBrowser()
        {
            OurWebBrowser wb = new OurWebBrowser();
            ScatterViewItem item = new ScatterViewItem()
            {
                Width = 800,
                Height = 700,
                Content = wb
            };
            _webBrowsers.Add(wb);
            _scatterView.Items.Add(item);

            //watch for the save button
            wb.OnSaved += new EventHandler(wb_OnSaved);
        }
开发者ID:sgianelli,项目名称:CoLab,代码行数:18,代码来源:WebFactory.cs


示例18: OnViewLoaded

        protected override void OnViewLoaded(object view)
        {
            base.OnViewLoaded(view);
            mdv = (MapDashboardView)view;
            svi = (ScatterViewItem)Helpers.FindElementOfTypeUp(mdv, typeof(ScatterViewItem));
            
            //if (_fe.Style == null) _fe.Style = this.FindResource("DefaultContainerStyle") as Style;
            
            svi.ContainerManipulationDelta += (e, f) =>
            {
                UpdateMap();
            };
            UpdateMap();

        }
开发者ID:TNOCS,项目名称:csTouch,代码行数:15,代码来源:MapDashboardViewModel.cs


示例19: ButtonAddItem_Click

        private void ButtonAddItem_Click(object sender, RoutedEventArgs e)
        {
            var item = new ScatterViewItem();
            item.ContainerManipulationCompleted += item_ContainerManipulationCompleted;
            item.ContainerManipulationStarted += item_ContainerManipulationStarted;
            item.ContainerManipulationDelta += item_ContainerManipulationDelta;
            item.BorderBrush = PlayGround.BorderBrush;

            item.AngularDeceleration = 0.00001;
            item.Deceleration = 0.01;
            item.BorderThickness = new Thickness(2d);
            item.Content = "My toy";
            PlayGround.Items.Add(item);
            ResetItem(item);
            LabelStatus.Content = "";
            item.Content = new Ellipse() { Fill = Brushes.Aqua };
        }
开发者ID:kennethahn,项目名称:SurfaceScatterViewDemo1,代码行数:17,代码来源:MainWindow.xaml.cs


示例20: ItemIsOutsideView

 /// <summary>
 /// Check if the item is touching the border of the playground
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 private bool ItemIsOutsideView(ScatterViewItem item)
 {
     double verticalOffset = item.ActualHeight / 2;
     double horizontalOffset = item.ActualWidth / 2;
     Point p1 = new Point(item.ActualCenter.X, item.ActualCenter.Y);
     p1.Offset(horizontalOffset, verticalOffset);
     if (PointIsOutsideView(p1))
     {
         return true;
     }
     p1 = new Point(item.ActualCenter.X, item.ActualCenter.Y);
     p1.Offset(-horizontalOffset, -verticalOffset);
     if (PointIsOutsideView(p1))
     {
         return true;
     }
     return false;
 }
开发者ID:kennethahn,项目名称:SurfaceScatterViewDemo1,代码行数:23,代码来源:MainWindow.xaml.cs



注:本文中的ScatterViewItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Scenario类代码示例发布时间:2022-05-24
下一篇:
C# ScanningFunction类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap