public MenuItemsProvider(ReportersFormsManager reportersFormsManager, List<Type> reporterTypesAvailable) {
			this.reportersFormsManager = reportersFormsManager;
			this.MenuItems = new List<ToolStripItem>();
			foreach (Type t in reporterTypesAvailable) {
				this.MenuItems.Add(this.MenuItemFactory(t.Name));
			}
		}
		public ReporterFormWrapper(ReportersFormsManager reportersFormsManager, Reporter reporterActivated) : this() {
			this.reportersFormsManager = reportersFormsManager;
			this.reporter = reporterActivated;

			this.SuspendLayout();
			this.Controls.Clear();
			this.Controls.Add(this.reporter);
			this.reporter.Dock = DockStyle.Fill;
			this.ResumeLayout();
		}
		public ChartFormManager(int charSernoDeserialized = -1) {
			// deserialization: ChartSerno will be restored; never use this constructor in your app!
			this.ScriptEditedNeedsSaving = false;
//			this.Executor = new ScriptExecutor(Assembler.InstanceInitialized.ScriptExecutorConfig
//				, this.ChartForm.ChartControl, null, Assembler.InstanceInitialized.OrderProcessor, Assembler.InstanceInitialized.StatusReporter);
			this.Executor = new ScriptExecutor();
			this.ReportersFormsManager = new ReportersFormsManager(this, Assembler.InstanceInitialized.RepositoryDllReporters);
			this.ChartStreamingConsumer = new ChartFormStreamingConsumer(this);
			
			this.DataSnapshotSerializer = new Serializer<ChartFormDataSnapshot>();
			if (charSernoDeserialized == -1) {
				this.DataSnapshot = new ChartFormDataSnapshot();
				return;
			}
			bool createdNewFile = this.DataSnapshotSerializer.Initialize(Assembler.InstanceInitialized.AppDataPath,
				"ChartFormDataSnapshot-" + charSernoDeserialized + ".json", "Workspaces",
				Assembler.InstanceInitialized.AssemblerDataSnapshot.CurrentWorkspaceName, true, true);
			this.DataSnapshot = this.DataSnapshotSerializer.Deserialize();
			this.DataSnapshot.ChartSerno = charSernoDeserialized;
			this.DataSnapshotSerializer.Serialize();
		}
Ejemplo n.º 4
0
        public ChartFormManager(int charSernoDeserialized = -1)
        {
            // deserialization: ChartSerno will be restored; never use this constructor in your app!
            this.ScriptEditedNeedsSaving = false;
//			this.Executor = new ScriptExecutor(Assembler.InstanceInitialized.ScriptExecutorConfig
//				, this.ChartForm.ChartControl, null, Assembler.InstanceInitialized.OrderProcessor, Assembler.InstanceInitialized.StatusReporter);
            this.Executor = new ScriptExecutor();
            this.ReportersFormsManager  = new ReportersFormsManager(this, Assembler.InstanceInitialized.RepositoryDllReporters);
            this.ChartStreamingConsumer = new ChartFormStreamingConsumer(this);

            this.DataSnapshotSerializer = new Serializer <ChartFormDataSnapshot>();
            if (charSernoDeserialized == -1)
            {
                this.DataSnapshot = new ChartFormDataSnapshot();
                return;
            }
            bool createdNewFile = this.DataSnapshotSerializer.Initialize(Assembler.InstanceInitialized.AppDataPath,
                                                                         "ChartFormDataSnapshot-" + charSernoDeserialized + ".json", "Workspaces",
                                                                         Assembler.InstanceInitialized.AssemblerDataSnapshot.CurrentWorkspaceName, true, true);

            this.DataSnapshot            = this.DataSnapshotSerializer.Deserialize();
            this.DataSnapshot.ChartSerno = charSernoDeserialized;
            this.DataSnapshotSerializer.Serialize();
        }