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();
		}
Example #2
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();
        }