Beispiel #1
0
 public void onMouseMove(MouseMoveArgs args)
 {
     if (!(mouseMoveEvent == null))
     {
         mouseMoveEvent.Invoke(this, args);
     }
 }
        private void OnDragArtistsCommand(MouseMoveArgs parameter)
        {
            if (parameter == null)
            {
                return;
            }

            ListView dragSource = parameter.Sender as ListView;

            if (dragSource == null)
            {
                return;
            }

            if (SelectedArtists == null)
            {
                return;
            }
            if (SelectedArtists.Count < 1)
            {
                return;
            }

            if (parameter.Settings.LeftButton == MouseButtonState.Pressed)
            {
                DataObject dataObject = new DataObject(typeof(Artist), SelectedArtists[0]);

                DragDrop.DoDragDrop(dragSource, dataObject, DragDropEffects.Copy);

                // allow scroll inside listView
                dragSource.SelectedItems.Clear();
                SelectedArtists = null;
            }
        }
Beispiel #3
0
        private void OnAllTagsDragCommand(object parameter)
        {
            MouseMoveArgs args = parameter as MouseMoveArgs;

            if (args == null)
            {
                return;
            }

            var dragSource = args.Sender as TagsCloud;

            if (dragSource == null)
            {
                return;
            }

            if (args.Settings.LeftButton == MouseButtonState.Pressed)
            {
                if (AllTagsSelectedItem != null)
                {
                    DataObject dataObject = new DataObject(typeof(ITag), AllTagsSelectedItem);

                    DragDrop.DoDragDrop(dragSource, dataObject, DragDropEffects.Copy);

                    AllTagsSelectedItem = null;
                }
            }
        }
Beispiel #4
0
 public virtual void OnScreenMouseMove(MouseMoveArgs e)
 {
     RootComponent?.Visit <SceneComponent>(obj => obj.OnScreenMouseMove(e));
 }