Exemple #1
0
        private void ReceiveGetParamMessage(MessageBase message)
        {
            OutputSettings outputSettings = null;

            switch (OutputTo)
            {
            case OutputTo.CSV:
                outputSettings = new CSVOutputSettings();
                var csvOutputSettings = outputSettings as CSVOutputSettings;
                csvOutputSettings.CSVFormat              = GetCSVFormat();
                csvOutputSettings.DateFormat             = DateFormat;
                csvOutputSettings.Delimiter              = Delimiter;
                csvOutputSettings.OutputDirectory        = OutputLocation;
                csvOutputSettings.UseSectorValueAsVolume = IndexValueAsVolume;
                csvOutputSettings.SectorVolumeDivider    = IndexValueDivisor;
                csvOutputSettings.Filename = ReportFilenameFormat;
                break;

            case OutputTo.Amibroker:
                outputSettings = new AmiOutputSettings();
                outputSettings.UseSectorValueAsVolume = IndexValueAsVolume;
                outputSettings.SectorVolumeDivider    = IndexValueDivisor;
                (outputSettings as AmiOutputSettings).DatabaseDirectory = OutputLocation;
                break;

            case OutputTo.Metastock:
                outputSettings = new MetaOutputSettings();
                ((MetaOutputSettings)outputSettings).OutputDirectory    = OutputLocation;
                ((MetaOutputSettings)outputSettings).UseSingleDirectory = MSSingleDirectory;
                break;
            }

            Messenger.Default.Send(new OutputSettingsMessage {
                DataOutputSettings = outputSettings
            });
        }
Exemple #2
0
 public void ToMetaStock(MetaOutputSettings metaOutputSettings)
 {
     Converter.Convert <MetaOutputSettings>(this, metaOutputSettings);
 }