当前位置: 首页>>代码示例>>C#>>正文


C# ScatterViewItem类代码示例

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


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


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