public void Initialize(DataSource dataSource, RepositoryJsonDataSource dataSourceRepository, RepositoryCustomMarketInfo marketInfoRepository) {
			if (base.DesignMode) return;
			this.dataSource = dataSource;
			this.dataSourceRepository = dataSourceRepository;
			this.marketInfoRepository = marketInfoRepository;
			this.populateMarketFromDataSource();
		}
Ejemplo n.º 2
0
        public void Initialize(RepositoryJsonDataSource dataSourceRepository, IStatusReporter statusReporter)
        {
            this.dataSourceRepository = dataSourceRepository;
            this.statusReporter       = statusReporter;

            try {
                bool createdNewFile = this.dataSnapshotSerializer.Initialize(this.dataSourceRepository.RootPath,
                                                                             "Sq1.Widgets.DataSourcesTree.DataSourceTreeDataSnapshot.json", "Workspaces",
                                                                             Assembler.InstanceInitialized.AssemblerDataSnapshot.CurrentWorkspaceName, true, true);
                this.dataSnapshot = this.dataSnapshotSerializer.Deserialize();
                if (createdNewFile)
                {
                    this.dataSnapshotSerializer.Serialize();
                }
            } catch (Exception ex) {
                Assembler.PopupException(" DataSourcesTreeControl.Initialize()", ex);
            }

            this.populateDataSourcesIntoTreeListView();

            this.dataSourceRepository.OnItemAdded          += new EventHandler <NamedObjectJsonEventArgs <DataSource> >(dataSourceRepository_OnDataSourceAdded);
            this.dataSourceRepository.OnItemRenamed        += new EventHandler <NamedObjectJsonEventArgs <DataSource> >(dataSourceRepository_OnDataSourceRenamed);
            this.dataSourceRepository.OnItemCanBeRemoved   += new EventHandler <NamedObjectJsonEventArgs <DataSource> >(dataSourceRepository_OnDataSourceCanBeRemoved);
            this.dataSourceRepository.OnItemRemovedDone    += new EventHandler <NamedObjectJsonEventArgs <DataSource> >(dataSourceRepository_OnDataSourceRemovedDone);
            this.dataSourceRepository.OnSymbolAdded        += new EventHandler <DataSourceSymbolEventArgs>(dataSourceRepository_OnSymbolAdded);
            this.dataSourceRepository.OnSymbolRenamed      += new EventHandler <DataSourceSymbolEventArgs>(dataSourceRepository_OnSymbolRenamed);
            this.dataSourceRepository.OnSymbolCanBeRemoved += new EventHandler <DataSourceSymbolEventArgs>(dataSourceRepository_OnSymbolCanBeRemoved);
            this.dataSourceRepository.OnSymbolRemovedDone  += new EventHandler <DataSourceSymbolEventArgs>(dataSourceRepository_OnSymbolRemovedDone);
        }
		public void Initialize(RepositoryJsonDataSource dataSourceRepository, IStatusReporter statusReporter) {
			this.dataSourceRepository = dataSourceRepository;
			this.statusReporter = statusReporter;

			try {
				bool createdNewFile = this.dataSnapshotSerializer.Initialize(this.dataSourceRepository.RootPath,
					"Sq1.Widgets.DataSourcesTree.DataSourceTreeDataSnapshot.json", "Workspaces",
					Assembler.InstanceInitialized.AssemblerDataSnapshot.CurrentWorkspaceName, true, true);
				this.dataSnapshot = this.dataSnapshotSerializer.Deserialize();
				if (createdNewFile) {
					this.dataSnapshotSerializer.Serialize();
				}
			} catch (Exception ex) {
				Assembler.PopupException(" DataSourcesTreeControl.Initialize()", ex);
			}
			
			this.populateDataSourcesIntoTreeListView();

			this.dataSourceRepository.OnItemAdded += new EventHandler<NamedObjectJsonEventArgs<DataSource>>(dataSourceRepository_OnDataSourceAdded);
			this.dataSourceRepository.OnItemRenamed += new EventHandler<NamedObjectJsonEventArgs<DataSource>>(dataSourceRepository_OnDataSourceRenamed);
			this.dataSourceRepository.OnItemCanBeRemoved += new EventHandler<NamedObjectJsonEventArgs<DataSource>>(dataSourceRepository_OnDataSourceCanBeRemoved);
			this.dataSourceRepository.OnItemRemovedDone += new EventHandler<NamedObjectJsonEventArgs<DataSource>>(dataSourceRepository_OnDataSourceRemovedDone);
			this.dataSourceRepository.OnSymbolAdded += new EventHandler<DataSourceSymbolEventArgs>(dataSourceRepository_OnSymbolAdded);
			this.dataSourceRepository.OnSymbolRenamed += new EventHandler<DataSourceSymbolEventArgs>(dataSourceRepository_OnSymbolRenamed);
			this.dataSourceRepository.OnSymbolCanBeRemoved += new EventHandler<DataSourceSymbolEventArgs>(dataSourceRepository_OnSymbolCanBeRemoved);
			this.dataSourceRepository.OnSymbolRemovedDone += new EventHandler<DataSourceSymbolEventArgs>(dataSourceRepository_OnSymbolRemovedDone);
		}
Ejemplo n.º 4
0
        public void Initialize(RepositoryJsonDataSource dataSourceRepository)
        {
            this.DataSourceRepository = dataSourceRepository;
            bool createdNewFile = this.dataSnapshotSerializer.Initialize(this.DataSourceRepository.RootPath,
                                                                         "Sq1.Widgets.CsvImporter.CsvImporterDataSnapshot.json", "Workspaces",
                                                                         Assembler.InstanceInitialized.AssemblerDataSnapshot.CurrentWorkspaceName, true, true);

            //this.dataSnapshot = new CsvImporterDataSnapshot();
            this.dataSnapshot = this.dataSnapshotSerializer.Deserialize();
            foreach (var each in this.dataSnapshot.FieldSetupCurrent)
            {
                each.DataSnapshot = this.dataSnapshot;
            }
            this.mniltbCsvSeparator.InputFieldValue = this.dataSnapshot.CsvConfiguration.Delimiter;

            this.importSourceFileBrowser1.PopulateListFromCsvPath(this.dataSnapshot.PathCsv);

            if (this.dataSnapshot.FileSelected != null)
            {
                this.stepsAllparseFromDataSnapshot();
                this.importSourceFileBrowser1.SelectFile(this.dataSnapshot.FileSelected);
            }
            this.dataSourcesTree1.Initialize(this.DataSourceRepository, Assembler.InstanceInitialized.StatusReporter);
            this.dataSourcesTree1.TreeFirstColumnNameText = "Import To (Symbol / DataSource):";
        }
Ejemplo n.º 5
0
 public void Initialize(DataSource dataSource, RepositoryJsonDataSource dataSourceRepository, RepositoryCustomMarketInfo marketInfoRepository)
 {
     if (base.DesignMode)
     {
         return;
     }
     this.dataSource           = dataSource;
     this.dataSourceRepository = dataSourceRepository;
     this.marketInfoRepository = marketInfoRepository;
     this.populateMarketFromDataSource();
 }
Ejemplo n.º 6
0
//		[Obsolete("looks illogical, move IStatusReporter to Initialize() and use Assembler.InstanceInitialized instead of Assembler.Constructed")]
//		protected Assembler(IStatusReporter mainForm) : this() {
//			this.StatusReporter = mainForm;
//			Assembler.instance = this;
//		}
        public Assembler()
        {
            this.RepositoryCustomSymbolInfo = new RepositoryCustomSymbolInfo();
            this.MarketInfoRepository       = new RepositoryCustomMarketInfo();
            this.RepositoryJsonDataSource   = new RepositoryJsonDataSource();
            this.RepositoryDllJsonStrategy  = new RepositoryDllJsonStrategy();

            this.RepositoryDllStaticProvider    = new RepositoryDllStaticProvider();
            this.RepositoryDllStreamingProvider = new RepositoryDllStreamingProvider();
            this.RepositoryDllBrokerProvider    = new RepositoryDllBrokerProvider();
            this.RepositoryDllReporters         = new RepositoryDllReporters();

            this.WorkspacesRepository = new RepositoryFoldersNoJson();

            //this.ChartRendererConfigured = new ChartRenderer();
            this.OrderProcessor = new OrderProcessor();
            this.AlertsForChart = new DictionaryManyToOne <ChartShadow, Alert>();

            this.AssemblerDataSnapshot           = new AssemblerDataSnapshot();
            this.AssemblerDataSnapshotSerializer = new Serializer <AssemblerDataSnapshot>();
        }
		public void Initialize(RepositoryJsonDataSource dataSourceRepository) {
			this.DataSourceRepository = dataSourceRepository;
			bool createdNewFile = this.dataSnapshotSerializer.Initialize(this.DataSourceRepository.RootPath,
			                                       "Sq1.Widgets.CsvImporter.CsvImporterDataSnapshot.json", "Workspaces",
			                                       Assembler.InstanceInitialized.AssemblerDataSnapshot.CurrentWorkspaceName, true, true);

			//this.dataSnapshot = new CsvImporterDataSnapshot();
			this.dataSnapshot = this.dataSnapshotSerializer.Deserialize();
			foreach (var each in this.dataSnapshot.FieldSetupCurrent) {
				each.DataSnapshot = this.dataSnapshot;
			}
			this.mniltbCsvSeparator.InputFieldValue = this.dataSnapshot.CsvConfiguration.Delimiter;

			this.importSourceFileBrowser1.PopulateListFromCsvPath(this.dataSnapshot.PathCsv);

			if (this.dataSnapshot.FileSelected != null) {
				this.stepsAllparseFromDataSnapshot();
				this.importSourceFileBrowser1.SelectFile(this.dataSnapshot.FileSelected);
			}
			this.dataSourcesTree1.Initialize(this.DataSourceRepository, Assembler.InstanceInitialized.StatusReporter);
			this.dataSourcesTree1.TreeFirstColumnNameText = "Import To (Symbol / DataSource):";
		}
Ejemplo n.º 8
0
//		[Obsolete("looks illogical, move IStatusReporter to Initialize() and use Assembler.InstanceInitialized instead of Assembler.Constructed")]
//		protected Assembler(IStatusReporter mainForm) : this() {
//			this.StatusReporter = mainForm;
//			Assembler.instance = this;
//		}
		public Assembler() {
			this.RepositoryCustomSymbolInfo = new RepositoryCustomSymbolInfo();
			this.MarketInfoRepository = new RepositoryCustomMarketInfo();
			this.RepositoryJsonDataSource = new RepositoryJsonDataSource();
			this.RepositoryDllJsonStrategy = new RepositoryDllJsonStrategy();

			this.RepositoryDllStaticProvider = new RepositoryDllStaticProvider();
			this.RepositoryDllStreamingProvider = new RepositoryDllStreamingProvider();
			this.RepositoryDllBrokerProvider = new RepositoryDllBrokerProvider();
			this.RepositoryDllReporters = new RepositoryDllReporters();
			
			this.WorkspacesRepository = new RepositoryFoldersNoJson();

			//this.ChartRendererConfigured = new ChartRenderer();
			this.OrderProcessor = new OrderProcessor();
			this.AlertsForChart = new DictionaryManyToOne<ChartShadow, Alert>();
			
			this.AssemblerDataSnapshot = new AssemblerDataSnapshot();
			this.AssemblerDataSnapshotSerializer = new Serializer<AssemblerDataSnapshot>();
		}
Ejemplo n.º 9
0
 public void Initialize(RepositoryJsonDataSource dataSourceRepository, IStatusReporter statusReporter, DockPanel mainFormDockPanel)
 {
     base.Initialize(statusReporter, mainFormDockPanel);
     DataSourcesForm.Instance.DataSourcesTreeControl.Initialize(dataSourceRepository, statusReporter);
 }
Ejemplo n.º 10
0
 public void Initialize(RepositoryJsonDataSource dataSourceRepository, IStatusReporter statusReporter, DockPanel mainFormDockPanel)
 {
     base.Initialize(statusReporter, mainFormDockPanel);
     this.csvImporterControl.Initialize(dataSourceRepository);
 }