public FieldNode(IField field, IFieldPathFactory factory)
     : base()
 {
     Field       = field;
     HasChildren = field is IRelationField;
     _factory    = factory;
 }
Exemplo n.º 2
0
        public MainAdapter(
            Project project, IFieldPathFactory pathFactory,
            PresetView preset, StandardView standard, AdvancedView advanced,
            RetrieveFieldsView fields)
            : base(project)
        {
            PathFactory = pathFactory;

            Preset   = preset;
            Standard = standard;
            Advanced = advanced;
            _views.Add("Preset", preset.Adapter);
            _views.Add("Standard", standard.Adapter);
            _views.Add("Advanced", advanced.Adapter);

            RetrieveFields = fields;

            Preset.Adapter.Search   += Adapter_Search;
            Standard.Adapter.Search += Adapter_Search;
            Advanced.Adapter.Search += Adapter_Search;

            SelectedSubjectChanged           += delegate { RefreshPaths(); };
            Project.CurrentConnectionChanged += delegate { RefreshPaths(); };
            Result = new BindingSource();
            RefreshPaths();
        }
 public RetrieveFieldsViewAdapter(IConfiguration configuration, IFieldPathFactory pathFactory)
 {
     _configuration      = configuration;
     PathFactory         = pathFactory;
     Fields              = new BindingList <IFieldPath>();
     Fields.ListChanged += Fields_ListChanged;
 }
 public SubjectNode(ISubject subject, IFieldPathFactory factory)
     : base()
 {
     Subject     = subject;
     HasChildren = true;
     _factory    = factory;
 }
Exemplo n.º 5
0
        public MainAdapter(
            Project project, DbServiceFactory serviceFactory, IFieldPathFactory pathFactory,
            PresetView preset, StandardView standard, AdvancedView advanced,
            RetrieveFieldsView fields)
            : base(project)
        {
            ServiceFactory = serviceFactory;
            PathFactory    = pathFactory;

            Preset   = preset;
            Standard = standard;
            Advanced = advanced;
            _views.Add("Preset", preset.Adapter);
            _views.Add("Standard", standard.Adapter);
            _views.Add("Advanced", advanced.Adapter);

            RetrieveFields = fields;

            Preset.Adapter.Search   += Adapter_Search;
            Standard.Adapter.Search += Adapter_Search;
            Advanced.Adapter.Search += Adapter_Search;

            SelectedSubjectChanged += delegate { RefreshPaths(); };

            var refresh = new EventHandler((s, e) =>
            {
                RefreshPaths();
                _dbService = ServiceFactory.CreateAsync(Project.CurrentConnection);
            });

            Project.CurrentConnectionChanged += refresh;
            Result = new BindingSource();
            refresh(this, EventArgs.Empty);
        }
Exemplo n.º 6
0
        public MainAdapter(
            Project project, IFieldPathFactory pathFactory, 
            PresetView preset, StandardView standard, AdvancedView advanced, 
            RetrieveFieldsView fields)
            : base(project)
        {
            PathFactory = pathFactory;

            Preset = preset;
            Standard = standard;
            Advanced = advanced;
            _views.Add("Preset", preset.Adapter);
            _views.Add("Standard", standard.Adapter);
            _views.Add("Advanced", advanced.Adapter);

            RetrieveFields = fields;

            Preset.Adapter.Search += Adapter_Search;
            Standard.Adapter.Search += Adapter_Search;
            Advanced.Adapter.Search += Adapter_Search;

            SelectedSubjectChanged += delegate { RefreshPaths(); };
            Project.CurrentConnectionChanged += delegate { RefreshPaths(); };
            Result = new BindingSource();
            RefreshPaths();
        }
Exemplo n.º 7
0
        public MainWindowAdapter(
            Project project, IFieldPathFactory pathFactory,
            PresetView preset, StandardView standard, AdvancedView advanced,
            RetrieveFieldsView fields)
            : base(project)
        {
            _appWidth       = Properties.Settings.Default.AppWidth;
            _appHeight      = Properties.Settings.Default.AppHeight;
            _appWindowState = Properties.Settings.Default.AppWindowState;
            _viewColumnSize = new GridLength(Properties.Settings.Default.ViewColumnSize);

            Preset         = preset;
            Standard       = standard;
            Advanced       = advanced;
            RetrieveFields = fields;
            _views.Add("Preset", preset.Adapter);
            _views.Add("Standard", standard.Adapter);
            _views.Add("Advanced", advanced.Adapter);

            Preset.Adapter.Search   += Adapter_Search;
            Standard.Adapter.Search += Adapter_Search;
            Advanced.Adapter.Search += Adapter_Search;

            ProjectAdapter = new ProjectAdapter(project);
            ProjectAdapter.Project.CurrentConnectionChanged += delegate
            {
                RefreshPaths();
                OnPropertyChanged("ApplicationTitle");
            };
            PathFactory = pathFactory;

            CurrentView             = Preset.Adapter;
            SelectedSubjectChanged += delegate { RefreshPaths(); };
            RefreshPaths();
        }
 public RetrieveFieldsViewAdapter(IConfiguration configuration, IFieldPathFactory pathFactory)
 {
     _configuration = configuration;
     PathFactory = pathFactory;
     Fields = new BindingList<IFieldPath>();
     Fields.ListChanged += Fields_ListChanged;
 }
Exemplo n.º 9
0
        public MainWindowAdapter(
            Project project, IFieldPathFactory pathFactory, 
            PresetView preset, StandardView standard, AdvancedView advanced, 
            RetrieveFieldsView fields)
            : base(project)
        {
            _appWidth = Properties.Settings.Default.AppWidth;
            _appHeight = Properties.Settings.Default.AppHeight;
            _appWindowState = Properties.Settings.Default.AppWindowState;
            _viewColumnSize = new GridLength(Properties.Settings.Default.ViewColumnSize);

            Preset = preset;
            Standard = standard;
            Advanced = advanced;
            RetrieveFields = fields;
            _views.Add("Preset", preset.Adapter);
            _views.Add("Standard", standard.Adapter);
            _views.Add("Advanced", advanced.Adapter);

            Preset.Adapter.Search += Adapter_Search;
            Standard.Adapter.Search += Adapter_Search;
            Advanced.Adapter.Search += Adapter_Search;

            ProjectAdapter = new ProjectAdapter(project);
            ProjectAdapter.Project.CurrentConnectionChanged += delegate
            {
                RefreshPaths();
                OnPropertyChanged("ApplicationTitle");
            };
            PathFactory = pathFactory;

            CurrentView = Preset.Adapter;
            SelectedSubjectChanged += delegate { RefreshPaths(); };
            RefreshPaths();
        }
Exemplo n.º 10
0
 public RetrieveFieldsViewAdapter(IConfiguration configuration, IFieldPathFactory pathFactory)
 {
     _configuration = configuration;
     PathFactory = pathFactory;
     Fields = new ObservableCollection<IFieldPath>();
     Fields.CollectionChanged += Fields_CollectionChanged;
     Nodes = new ObservableCollection<Node>(_configuration.Convert<ISubject, SubjectNode>(s => new SubjectNode(s, PathFactory)));
 }
Exemplo n.º 11
0
 public RetrieveFieldsViewAdapter(IConfiguration configuration, IFieldPathFactory pathFactory)
 {
     _configuration            = configuration;
     PathFactory               = pathFactory;
     Fields                    = new ObservableCollection <IFieldPath>();
     Fields.CollectionChanged += Fields_CollectionChanged;
     Nodes = new ObservableCollection <Node>(_configuration.Convert <ISubject, SubjectNode>(s => new SubjectNode(s, PathFactory)));
 }
Exemplo n.º 12
0
 public SubjectNode(ISubject subject, IFieldPathFactory factory)
     : base()
 {
     Subject = subject;
     HasChildren = true;
     _factory = factory;
 }
Exemplo n.º 13
0
 public FieldNode(IField field, IFieldPathFactory factory)
     : base()
 {
     Field = field;
     HasChildren = field is IRelationField;
     _factory = factory;
 }
Exemplo n.º 14
0
 public FieldPathComboAdapter(IFieldPathFactory pathFactory)
 {
     _pathFactory = pathFactory;
     Items = new BindingList<FieldPathComboItem>();
 }
Exemplo n.º 15
0
 public FieldPathComboAdapter(IFieldPathFactory pathFactory)
 {
     _pathFactory = pathFactory;
     Items        = new BindingList <FieldPathComboItem>();
 }