예제 #1
0
파일: Activity1.cs 프로젝트: szitus2/Locsi
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.ProgramsLayout);
            ListView     lv  = FindViewById <ListView>(Resource.Id.stepListViewPgm1);
            ProgramClass pgm = new ProgramClass();

            pgm.numSteps = 4;
            pgm.steps[0] = new ProgramStepClass()
            {
                station = 1, duration = 10
            };
            pgm.steps[1] = new ProgramStepClass()
            {
                station = 2, duration = 11
            };
            pgm.steps[2] = new ProgramStepClass()
            {
                station = 3, duration = 12
            };
            pgm.steps[3] = new ProgramStepClass()
            {
                station = 4, duration = 13
            };
            pgm.steps[4] = new ProgramStepClass()
            {
                station = 2, duration = 14
            };
            pgm.steps[5] = new ProgramStepClass()
            {
                station = 1, duration = 15
            };
            pgm.steps[6] = new ProgramStepClass()
            {
                station = 4, duration = 16
            };
            pgm.steps[7] = new ProgramStepClass()
            {
                station = 3, duration = 17
            };
            pgm.steps[8] = new ProgramStepClass()
            {
                station = 2, duration = 18
            };
            pgm.steps[9] = new ProgramStepClass()
            {
                station = 4, duration = 19
            };

            ProgramStepLineAdapter psla = new ProgramStepLineAdapter(this, pgm);

            lv.Adapter = psla;
        }
예제 #2
0
 public ProgramStepLineAdapter(Context context, ProgramClass program) : base(context, -1, program.steps)
 {
     this.pgm = program;
     this.ctx = context;
 }