Esempio n. 1
0
        /// <summary>
        /// Returns a combined identification string meant to include data source, detector name and type
        /// </summary>
        /// <returns></returns>
        public string Identifier()
        {
            string l = string.IsNullOrEmpty(filename) ? "*" : filename;

            switch (source)
            {
            case ConstructedSource.Live:
                l = iname + "-" + srtype.ToString() + (string.IsNullOrEmpty(ConnInfo) ? "" : "[" + ConnInfo + "]");
                break;

            case ConstructedSource.NCDFile:
            case ConstructedSource.SortedPulseTextFile:
            case ConstructedSource.PTRFile:
            case ConstructedSource.MCA527File:
                break;

            case ConstructedSource.INCCTransfer:
                l += " (INCC transfer file, recalculated)";
                break;

            case ConstructedSource.INCCTransferCopy:
                l += " (INCC transfer file)";
                break;

            case ConstructedSource.CycleFile:
                l += " (INCC5 test data file)";
                break;

            case ConstructedSource.ReviewFile:
                l += " (INCC Rad Review measurement data file)";
                break;

            case ConstructedSource.DatazFile:
                l += " (IAEA dataz data file)";
                break;

            case ConstructedSource.DB:
                l = "DB Acquire";
                break;

            case ConstructedSource.Manual:
                l = "Manual";
                break;

            case ConstructedSource.Reanalysis:
                l += (" " + source.HappyFunName());
                break;
            }
            return(l);
        }
Esempio n. 2
0
        /// INCC5 merges every known SR type into a short list of 6, to match sr lib
        /// This function adds the JSR-15 to the list
        /// MSR4 or 2150, JSR-11, JSR-12, PSR or ISR, DGSR, AMSR, JSR-15
        /// MSR4          JSR11   JSR12   PSR         DGSR  AMSR   JSR15
        public static string INCC5ComboBoxString(this InstrType itype)
        {
            string s = string.Empty;

            switch (itype)
            {
            case InstrType.MSR4A:
                s = "MSR4 or 2150";
                break;

            case InstrType.JSR11:
                s = "JSR-11";
                break;

            case InstrType.JSR12:
                s = "JSR-12";
                break;

            case InstrType.JSR15:
                s = "JSR-15";
                break;

            case InstrType.PSR:
                s = "PSR or ISR";
                break;

            default:
                s = itype.ToString();
                break;
            }
            return(s);
        }
Esempio n. 3
0
        public InfoRecord[] GetInfoRecords(ITranslationManager tm)
        {
            const string tg      = "Statistics";
            var          records = new List <InfoRecord>
            {
                new InfoRecord
                {
                    Name  = tm.T(tg, "Type"),
                    Value = InstrType.ToString()
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Comment"),
                    Value = Comment
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Digits"),
                    Value = Digits.ToString(CultureInfo.InvariantCulture)
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Point value"),
                    Value = Point.ToString("0.#####")
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Lot size"),
                    Value = LotSize.ToString(CultureInfo.InvariantCulture)
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Spread"),
                    Value = Spread.ToString("F2") + " " + tm.T(tg, "points")
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Swap long"),
                    Value = SwapLong.ToString("F2") + " " + tm.T(tg, SwapType.ToString().ToLower())
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Swap short"),
                    Value = SwapShort.ToString("F2") + " " + tm.T(tg, SwapType.ToString().ToLower())
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Commission"),
                    Value = Commission.ToString("F2") + " " + tm.T(tg, CommissionType.ToString().ToLower())
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Slippage"),
                    Value = Slippage.ToString("F2") + " " + tm.T(tg, "points")
                }
            };

            return(records.ToArray());
        }
Esempio n. 4
0
        public string IdentName()  // devnote: used to gen output files, so make sure no offending chars are included
        {
            string l = "Unknown";

            switch (source)
            {
            case ConstructedSource.Live:
                l = iname + "-" + srtype.ToString() + (String.IsNullOrEmpty(ConnInfo) ? "" : "[" + ConnInfo + "]");
                break;

            case ConstructedSource.NCDFile:
            case ConstructedSource.SortedPulseTextFile:
            case ConstructedSource.PTRFile:
                l = filename;
                break;

            case ConstructedSource.INCCTransfer:
                l = filename + " (INCC transfer file, recalculated)";
                break;

            case ConstructedSource.INCCTransferCopy:
                l = filename + " (INCC transfer file)";
                break;

            case ConstructedSource.CycleFile:
                l = filename + " (INCC5 test data file)";
                break;

            case ConstructedSource.DB:
                l = "DB Acquire";
                break;

            case ConstructedSource.ReviewFile:
                l = filename + " (INCC Rad Review measurement data file)";
                break;

            case ConstructedSource.Manual:
                l = "Manual";
                break;

            case ConstructedSource.Æther:
                l += (" " + source.ToString());
                break;
            }
            return(l);
        }