Exemplo n.º 1
0
        public void Funcmain(string argv1)
        {
            index = 0;
            path  = argv1;

            read_default();

            pathfile = Path.Combine(path, "OFF1.TMP");
            fp1      = new BinaryReader(new FileStream(pathfile, FileMode.Open, FileAccess.Read), Encoding.Default);
            OffsetRec off1 = OffsetRec.FromStream(fp1);

            fp1.Close();


            pathfile = Path.Combine(path, "OFFSET.TMP");
            fp2      = new StreamWriter(pathfile, false);

            pathfile = Path.Combine(path, "OFF2.TMP");
            fp3      = new BinaryWriter(new FileStream(pathfile, FileMode.Create), Encoding.Default);

            code = off1.OffsetType;
            switch (off1.OffsetType)
            {
            case 402:
            case 403:
            case 404:
                offtyp = off1.OffsetType;
                offset_method();
                break;

            default:
                break;
            }

            fp2.Close();
            fp3.Close();

            if (off1.AcceptCode == 1)
            {
                save_offset();
            }
        }
Exemplo n.º 2
0
        void offset_input()
        {
            pathfile = Path.Combine(path, "OFF1.TMP");
            fp1      = new BinaryReader(new FileStream(pathfile, FileMode.Open, FileAccess.Read), Encoding.Default);
            OffsetRec off1 = OffsetRec.FromStream(fp1);

            fp1.Close();


            refmod = off1.ModelName;
            refstg = off1.StringName;
            offmod = off1.OffsetModel;
            offstg = off1.OffsetString;
            chn1   = off1.StartChainage;
            chn2   = off1.EndChainage;
            ho1    = off1.StartHOffset;
            ho2    = off1.EndHOffset;
            vo1    = off1.StartVOffset;
            vo2    = off1.EndVOffset;
            se1    = off1.StartSuper;
            se2    = off1.EndSuper;

            pnts = 0;
        }