Ejemplo n.º 1
0
        public void ShowDialog(SearchInfoEditWindowViewModel viewModel)
        {
            var window = new SearchInfoEditWindow(viewModel);

            window.Owner = App.Current.MainWindow;
            window.ShowDialog();
        }
        public SearchInfoEditWindow(SearchInfoEditWindowViewModel viewModel)
        {
            this.DataContext      = viewModel;
            viewModel.CloseEvent += (sender, e) => this.Close();

            InitializeComponent();
        }
Ejemplo n.º 3
0
        private void TabEdit()
        {
            if (this.TabSelectedItem.Value is SearchViewModel searchViewModel)
            {
                var viewModel = new SearchInfoEditWindowViewModel(searchViewModel.Model);

                _dialogService.Show(viewModel);
            }
        }
        public SearchInfoEditWindow(SearchInfoEditWindowViewModel viewModel)
        {
            this.DataContext      = viewModel;
            viewModel.CloseEvent += (sender, e) => this.Close();

            InitializeComponent();

            this.MouseLeftButtonDown += (sender, e) => this.DragMove();
        }
Ejemplo n.º 5
0
        private void TabNewSearch()
        {
            if (this.TabSelectedItem.Value is SearchViewModel searchViewModel)
            {
                var viewModel = new SearchInfoEditWindowViewModel(new SearchInfo()
                {
                    Name = "default"
                });
                viewModel.Callback += (info) =>
                {
                    searchViewModel.Model.Children.Add(info);
                };

                _dialogService.Show(viewModel);
            }
        }