void DragDropController.IDestination.Move(DragDropController.IItem item, Point location) { var control = ((Control) item); control.Location = location; control.BringToFront(); Save(); }
private ProcedureParameterModel(ProcedureParametersViewModel procedureParametersViewModel, DatabaseModel.ProcedureParameter procedureParameter, bool isDefault) { this.procedureParametersViewModel = procedureParametersViewModel; ProcedureParameter = procedureParameter; IsDefault = isDefault; DragDropController = new DragDropController(this); }
private ResultSetFieldModel(ResultSetViewModel resultSetViewModel, DatabaseModel.ResultSetField resultSetField, bool isDefault) { this.resultSetViewModel = resultSetViewModel; resultSetViewModel.PropertyChanged += resultSetViewModel_PropertyChanged; ResultSetField = resultSetField; IsDefault = isDefault; DragDropController = new DragDropController(this); }
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); }
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; }
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; }
private void OnDestroy() { if (_dragDropController == null) { return; } _dragDropController.OnDropped = null; _dragDropController.OnDragEnter = null; _dragDropController.OnDragMove = null; _dragDropController.OnDragExit = null; _dragDropController.OnDroppedData = null; _dragDropController = null; }
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); } }
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(); }
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 }; }
public void Bind(DragDropController controller) { _controller = controller; _windowHandle = GetForegroundWindow(); }
public void Bind(DragDropController controller) { _controller = controller; }
void DragDropController.IDestination.Link(DragDropController.IItem item, Point location) { NotImplementedMethod(item, location); }
void DragDropController.IDestination.Copy(DragDropController.IItem item, Point location) { CallAddCard((TypeItemView.IItem) item, location); }
internal void InstallDragDropController(DragDropController.ISource source) { var dragDropController = new DragDropController(source) { IsMove = true, HasCopy = false, }; dragDropController.AddDestination(this); }
void AddItem(DragDropController.ISource control) { Client.Controls.Add(control.Control); InstallDragDropController(control); Save(); }