Beispiel #1
0
        void MainFormEventManagerInitializeWhenDockingIsNotNullAnymore()
        {
            DataSourcesForm.Instance.VisibleChanged += delegate { this.mniSymbols.Checked = DataSourcesForm.Instance.Visible; };
            ExceptionsForm.Instance.VisibleChanged  += delegate { this.mniExceptions.Checked = ExceptionsForm.Instance.Visible; };
            SlidersForm.Instance.VisibleChanged     += delegate { this.mniSliders.Checked = SlidersForm.Instance.Visible; };
            StrategiesForm.Instance.VisibleChanged  += delegate { this.mniStrategies.Checked = StrategiesForm.Instance.Visible; };
            ExecutionForm.Instance.VisibleChanged   += delegate { this.mniExecution.Checked = ExecutionForm.Instance.Visible; };
            CsvImporterForm.Instance.VisibleChanged += delegate { this.mniCsvImporter.Checked = CsvImporterForm.Instance.Visible; };

            this.MainFormEventManager = new MainFormEventManager(this);

            StrategiesForm.Instance.StrategiesTreeControl.OnStrategyOpenDefaultClicked += this.MainFormEventManager.StrategiesTree_OnStrategyOpenDefaultClicked;
            StrategiesForm.Instance.StrategiesTreeControl.OnStrategyOpenSavedClicked   += this.MainFormEventManager.StrategiesTree_OnStrategyOpenNewChartClicked;
            StrategiesForm.Instance.StrategiesTreeControl.OnStrategyRenamed            += this.MainFormEventManager.StrategiesTree_OnStrategyRenamed;
            StrategiesForm.Instance.StrategiesTreeControl.OnStrategySelected           += new EventHandler <StrategyEventArgs>(this.MainFormEventManager.StrategiesTree_OnStrategySelected);

            DataSourcesForm.Instance.DataSourcesTreeControl.OnSymbolSelected               += this.MainFormEventManager.DataSourcesTree_OnSymbolSelected;
            DataSourcesForm.Instance.DataSourcesTreeControl.OnDataSourceSelected           += this.MainFormEventManager.DataSourcesTree_OnDataSourceSelected;
            DataSourcesForm.Instance.DataSourcesTreeControl.OnNewChartForSymbolClicked     += this.MainFormEventManager.DataSourcesTree_OnNewChartForSymbolClicked;
            DataSourcesForm.Instance.DataSourcesTreeControl.OnOpenStrategyForSymbolClicked += this.MainFormEventManager.DataSourcesTree_OnOpenStrategyForSymbolClicked;
            DataSourcesForm.Instance.DataSourcesTreeControl.OnBarsAnalyzerClicked          += this.MainFormEventManager.DataSourcesTree_OnBarsAnalyzerClicked;
            DataSourcesForm.Instance.DataSourcesTreeControl.OnDataSourceEditClicked        += this.MainFormEventManager.DataSourcesTree_OnDataSourceEditClicked;
            //DataSourcesForm.Instance.DataSourcesTree.OnDataSourceDeleteClicked += this.MainFormEventManager.DataSourcesTree_OnDataSourceDeletedClicked;
            Assembler.InstanceInitialized.RepositoryJsonDataSource.OnItemCanBeRemoved += new EventHandler <NamedObjectJsonEventArgs <DataSource> >(this.MainFormEventManager.RepositoryJsonDataSource_OnDataSourceCanBeRemoved);
            Assembler.InstanceInitialized.RepositoryJsonDataSource.OnItemRemovedDone  += new EventHandler <NamedObjectJsonEventArgs <DataSource> >(this.MainFormEventManager.RepositoryJsonDataSource_OnDataSourceRemoved);
            //DataSourcesForm.Instance.DataSourcesTreeControl.OnDataSourceNewClicked += this.MainFormEventManager.DataSourcesTree_OnDataSourceNewClicked;

            SlidersForm.Instance.SlidersAutoGrowControl.SliderValueChanged += this.MainFormEventManager.SlidersAutoGrow_SliderValueChanged;
            SlidersForm.Instance.SlidersAutoGrowControl.ScriptContextLoadRequestedSubscriberImplementsCurrentSwitch += this.MainFormEventManager.SlidersAutoGrow_OnScriptContextLoadClicked;
            SlidersForm.Instance.SlidersAutoGrowControl.ScriptContextRenamed += this.MainFormEventManager.SlidersAutoGrow_OnScriptContextRenamed;
        }
		void MainFormEventManagerInitializeWhenDockingIsNotNullAnymore() {
			DataSourcesForm.Instance.VisibleChanged += delegate { this.mniSymbols.Checked = DataSourcesForm.Instance.Visible; };
			ExceptionsForm.Instance.VisibleChanged += delegate { this.mniExceptions.Checked = ExceptionsForm.Instance.Visible; };
			SlidersForm.Instance.VisibleChanged += delegate { this.mniSliders.Checked = SlidersForm.Instance.Visible; };
			StrategiesForm.Instance.VisibleChanged += delegate { this.mniStrategies.Checked = StrategiesForm.Instance.Visible; };
			ExecutionForm.Instance.VisibleChanged += delegate { this.mniExecution.Checked = ExecutionForm.Instance.Visible; };
			CsvImporterForm.Instance.VisibleChanged += delegate { this.mniCsvImporter.Checked = CsvImporterForm.Instance.Visible; };

			this.MainFormEventManager = new MainFormEventManager(this);

			StrategiesForm.Instance.StrategiesTreeControl.OnStrategyOpenDefaultClicked += this.MainFormEventManager.StrategiesTree_OnStrategyOpenDefaultClicked;
			StrategiesForm.Instance.StrategiesTreeControl.OnStrategyOpenSavedClicked += this.MainFormEventManager.StrategiesTree_OnStrategyOpenNewChartClicked;
			StrategiesForm.Instance.StrategiesTreeControl.OnStrategyRenamed += this.MainFormEventManager.StrategiesTree_OnStrategyRenamed;
			StrategiesForm.Instance.StrategiesTreeControl.OnStrategySelected += new EventHandler<StrategyEventArgs>(this.MainFormEventManager.StrategiesTree_OnStrategySelected);

			DataSourcesForm.Instance.DataSourcesTreeControl.OnSymbolSelected += this.MainFormEventManager.DataSourcesTree_OnSymbolSelected;
			DataSourcesForm.Instance.DataSourcesTreeControl.OnDataSourceSelected += this.MainFormEventManager.DataSourcesTree_OnDataSourceSelected;
			DataSourcesForm.Instance.DataSourcesTreeControl.OnNewChartForSymbolClicked += this.MainFormEventManager.DataSourcesTree_OnNewChartForSymbolClicked;
			DataSourcesForm.Instance.DataSourcesTreeControl.OnOpenStrategyForSymbolClicked += this.MainFormEventManager.DataSourcesTree_OnOpenStrategyForSymbolClicked;
			DataSourcesForm.Instance.DataSourcesTreeControl.OnBarsAnalyzerClicked += this.MainFormEventManager.DataSourcesTree_OnBarsAnalyzerClicked;
			DataSourcesForm.Instance.DataSourcesTreeControl.OnDataSourceEditClicked += this.MainFormEventManager.DataSourcesTree_OnDataSourceEditClicked;
			//DataSourcesForm.Instance.DataSourcesTree.OnDataSourceDeleteClicked += this.MainFormEventManager.DataSourcesTree_OnDataSourceDeletedClicked;
			Assembler.InstanceInitialized.RepositoryJsonDataSource.OnItemCanBeRemoved += new EventHandler<NamedObjectJsonEventArgs<DataSource>>(this.MainFormEventManager.RepositoryJsonDataSource_OnDataSourceCanBeRemoved);
			Assembler.InstanceInitialized.RepositoryJsonDataSource.OnItemRemovedDone += new EventHandler<NamedObjectJsonEventArgs<DataSource>>(this.MainFormEventManager.RepositoryJsonDataSource_OnDataSourceRemoved);
			//DataSourcesForm.Instance.DataSourcesTreeControl.OnDataSourceNewClicked += this.MainFormEventManager.DataSourcesTree_OnDataSourceNewClicked;

			SlidersForm.Instance.SlidersAutoGrowControl.SliderValueChanged += this.MainFormEventManager.SlidersAutoGrow_SliderValueChanged;
			SlidersForm.Instance.SlidersAutoGrowControl.ScriptContextLoadRequestedSubscriberImplementsCurrentSwitch += this.MainFormEventManager.SlidersAutoGrow_OnScriptContextLoadClicked;
			SlidersForm.Instance.SlidersAutoGrowControl.ScriptContextRenamed += this.MainFormEventManager.SlidersAutoGrow_OnScriptContextRenamed;
		}