//TODO Search Query Help //TODO Tags Parsing //TODO Search and Favorites Selection //TODO Search and Favorites Paging //TODO Search and Paging Saving (Separate and auromate) public MainWindowConnector(IListManager listManager, IEventSystem eventSystem, IAppStates appStatem, OperationManager manager, FilesManager filesManager, ImageManager imageManager) : base(listManager, eventSystem) { _appStatem = appStatem; ReactOn <PrepareLoadEvent>(_ => FileListIndex = 0); ReactOn <PostLoadingEvent>(e => _appStatem.Set <GlobalAppState>(s => s.LastLocation = e.Path)); DisposeThis(filesManager.FilterObservable.Subscribe(_ => FileListIndex = 1)); OperationManager = manager; FilesManager = filesManager; ImageManager = imageManager; WindowState = new UIWindowState(_appStatem); _fullScreenManager = new FullScreenManager(WindowState); OpenLocationCommand = BindToEvent(OpenLocation); NextImage = BindToEvent(_ => new NextPageEvnt(false)); BackImage = BindToEvent(_ => new NextPageEvnt(true)); DeleteCommand = BindToEvent( _ => MessageBox.Show("Wírklich Löschen?", "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes ? new DeleteEvent(ImageManager.CurrentIndex) : null); ToogleFavoriteCommand = BindToEvent(_ => new ToogleFavoritesEvent(ImageManager.CurrentIndex)); FullScreen = new DelegateCommand(_ => _fullScreenManager.EnableFullScreen(), _ => true); }
public void defaultDragAction(int mouse) { position = mouseOffset + root.mousePos; if (mouse == 3) { state = UIWindowState.Neutral; } }
/** * Callback functions.. may need to refactor? */ virtual public void menuPressed_func(Vector2 pos, object obj, int mouse) { if (mouse == 1) { state = UIWindowState.Dragging; mouseOffset = GlobalPosition - pos; Console.WriteLine("succ"); } }
public void TrySwitchTo(UIWindowState new_state) { fsm.TrySwitchTo(new_state); }