Ejemplo n.º 1
0
 void DragDropController.IDestination.Move(DragDropController.IItem item, Point location)
 {
     var control = ((Control) item);
     control.Location = location;
     control.BringToFront();
     Save();
 }
Ejemplo n.º 2
0
        private ProcedureParameterModel(ProcedureParametersViewModel procedureParametersViewModel, DatabaseModel.ProcedureParameter procedureParameter, bool isDefault)
        {
            this.procedureParametersViewModel = procedureParametersViewModel;
            ProcedureParameter = procedureParameter;
            IsDefault          = isDefault;

            DragDropController = new DragDropController(this);
        }
Ejemplo n.º 3
0
        private ResultSetFieldModel(ResultSetViewModel resultSetViewModel, DatabaseModel.ResultSetField resultSetField, bool isDefault)
        {
            this.resultSetViewModel             = resultSetViewModel;
            resultSetViewModel.PropertyChanged += resultSetViewModel_PropertyChanged;
            ResultSetField = resultSetField;
            IsDefault      = isDefault;

            DragDropController = new DragDropController(this);
        }
Ejemplo n.º 4
0
        public ResultFieldModel(ResultTypeViewModel resultTypeViewModel)
        {
            this.resultTypeViewModel = resultTypeViewModel;
            originalField            = new ResultTypeField();

            IsDefault                = true;
            columnNameIsValid        = true;
            nameIsValid              = true;
            this.selectedType        = TypeHelpers.MapType(typeof(string));
            this.selectedElementType = null;

            DragDropController = new DragDropController(this);
        }
Ejemplo n.º 5
0
 public UserStoryControl(UserStory story, ScrumSurface surface)
     : base(story, surface)
 {
     _ddc          = new DragDropController(surface, this, DragDropController.MODE_OBJCENTER);
     UserInterface = new UserStoryUI_Base();
     StdView       = new UserStoryUI_View();
     EditorView    = new UserStoryUI_Editor();
     this.DisplaySettings.ViewChanged += DisplaySettings_ViewChanged;
     UserStory.DataChanged            += UserStory_DataChanged;
     CheckLine();
     AfterInit();
     UpdateEffortSum();
     Surface.Database.EffortSum.EffortPointsChanged += this.UpdateEffortSum;
 }
Ejemplo n.º 6
0
	private void Awake()
    {
        _dragDropController = gameObject.AddComponent<DragDropController>();
        if (!_dragDropController.Register())
        {
            Debug.Log("Failed to register drag & drop.");
        }

        _dragDropController.OnDropped += OnDrop;
        _dragDropController.OnDragEnter += OnDragEnter;
        _dragDropController.OnDragMove += OnDragMove;
        _dragDropController.OnDragExit += OnDragExit;
        _dragDropController.OnDroppedData += OnDropData;
	}
Ejemplo n.º 7
0
	private void OnDestroy()
	{
		if (_dragDropController == null)
		{
			return;
		}
		
		_dragDropController.OnDropped = null;
        _dragDropController.OnDragEnter = null;
        _dragDropController.OnDragMove = null;
        _dragDropController.OnDragExit = null;
        _dragDropController.OnDroppedData = null;
		_dragDropController = null;
	}
Ejemplo n.º 8
0
 void update_stock()
 {
     globals.piece_stocks[gameObject.name]--;
     globals.piece_color_counts[color]--;
     globals.finishedPieces++;
     // Debug.Log(globals.finishedPieces);
     text.text = globals.piece_stocks[gameObject.name].ToString();
     if (globals.piece_stocks[gameObject.name] == 0)
     {
         //globals.finishedPieces++;
         if (globals.finishedPieces == globals.numPieces)
         {
             globals.gameLost = true;
         }
         Destroy(text);
         DragDropController.DisablePiece(gameObject);
     }
 }
Ejemplo n.º 9
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            MainForms          = new MainFormCollection();
            DragDropController = new DragDropController(MainForms);

            //StratSim:
            MainForms.AddForm(StratSim.Program.StartProject());
            ((StratSimFormIOController)MainForms[0].IOController).ShowStartPanel();
            MainForms[0].Show();

            //TeamStats:
            //MainForms.AddForm(TeamStats.Program.StartProject());
            //((TeamStatsFormIOController)MainForms[1].IOController).ShowChampionshipsPanel();
            //MainForms[1].Show();

            Application.Run();
        }
Ejemplo n.º 10
0
        public MainViewModel()
        {
            rootTreeItem1 = new TreeItem();
            rootTreeItem2 = new TreeItem();

            // Pfad bei Bedarf anpassen
            var path = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.Parent.FullName;

            FillTree(Tree1, path, 0);
            FillTree(Tree2, path, 0);

            ExpandAllCommand   = new ActionCommand(() => Tree1.ExpandOrCollapseAll(true));
            CollapseAllCommand = new ActionCommand(() => Tree1.ExpandOrCollapseAll(false));
            OpenAppXamlCommand = new ActionCommand(OpenAppXaml);


            DragDropControllerTV1 = new DragDropController()
            {
                CanDrag = CanDragTV1, CanDrop = CanDropTV1, Drop = DropTV1
            };
        }
Ejemplo n.º 11
0
 public void Bind(DragDropController controller)
 {
     _controller   = controller;
     _windowHandle = GetForegroundWindow();
 }
Ejemplo n.º 12
0
 public void Bind(DragDropController controller)
 {
     _controller = controller;
 }
Ejemplo n.º 13
0
 void DragDropController.IDestination.Link(DragDropController.IItem item, Point location) { NotImplementedMethod(item, location); }
Ejemplo n.º 14
0
 void DragDropController.IDestination.Copy(DragDropController.IItem item, Point location) { CallAddCard((TypeItemView.IItem) item, location); }
Ejemplo n.º 15
0
 internal void InstallDragDropController(DragDropController.ISource source)
 {
     var dragDropController = new DragDropController(source)
     {
         IsMove = true,
         HasCopy = false,
     };
     dragDropController.AddDestination(this);
 }
Ejemplo n.º 16
0
 void AddItem(DragDropController.ISource control)
 {
     Client.Controls.Add(control.Control);
     InstallDragDropController(control);
     Save();
 }