public ApplicationBase(Project project) { _views = new Dictionary<string, IView>(); Project = project; SubjectSource = new BindingList<ISubject>(Project.Configuration); SelectedSubject = SubjectSource[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 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 ProjectAdapter(Project p) { Project = p; Project.CurrentConnectionChanged += Project_CurrentConnectionChanged; Connections = new ObservableCollection<ConnectionAdapter>( Project.Connections.ConvertAll((c) => new ConnectionAdapter(this, c))); UpdateConnectionFromProject(); }
public ShellBase(Project project, ListCacher cacher, IList<IInitialiser> initialisers) { Project = project; Cacher = cacher; OnConnectionChanged(); foreach (var i in initialisers) i.Initialise(); }
public SearchDocument(Project p) : this() { Project = new ProjectDetails() { Id = p.Id, Version = p.Version }; }
public Shell(Project project, IControlFactory<Control> controlFactory, ListCacher cacher, IList<IInitialiser> initialisers) : base(project, cacher, initialisers) { // initialise last saved connection with this project var connectionLookup = Settings.Default.SavedConnections; if (connectionLookup.ContainsKey(Project.Id)) Project.CurrentConnection = Project.Connections.Find(c => c.Identifier == connectionLookup[Project.Id]); ControlFactory = controlFactory; ControlFactory.ListRequested += ControlFactory_ListRequested; }