Пример #1
0
        public WalkRoutePage(DiwiPageBase parent)
            : base(parent)
        {
            mMenu.addItem("Voeg Text toe", new DiwiUIMenu.DiwiMenuCallbackHandler(doText), AppController.sTextIcon);
            mMenu.addItem("Voeg Foto toe", new DiwiUIMenu.DiwiMenuCallbackHandler(doFoto), AppController.sFotoIcon);
            mMenu.addItem("Voeg Video toe", new DiwiUIMenu.DiwiMenuCallbackHandler(doVideo), AppController.sVideoIcon);
            mMenu.addItem("Stop Route", new DiwiUIMenu.DiwiMenuCallbackHandler(doStopRoute), AppController.sStopRIcon);
            mMenu.addItem("Toon Volksmond", new DiwiUIMenu.DiwiMenuCallbackHandler(doUGC), AppController.sUGCIcon);
            mMenu.addItem("Terug", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug), AppController.sTerugIcon);

            poiCB = new POIHandler(navPointReceive);

            AppController.sKwxClient.poiCallback += new KwxClient.POICallback(navPointMessage);
            MapHandler.sDownloadCallback         += new MapHandler.CallbackHandler(mapReceivedCB);

            mZoomIn  = new DiwiUIButton(offScreenGraphics, 146, 170, "Zoom+", buttonZoomIn, this);
            mZoomOut = new DiwiUIButton(offScreenGraphics, 146, 170, "Zoom-", buttonZoomOut, this);

            addDrawable(mZoomIn);
            addDrawable(mZoomOut);

            gpsText = new DiwiUIText(Color.Black, "Geen GPS", new Font("Arial", 12, FontStyle.Bold));
            AppController.sGpsReader.callback += new GpsReader.CallbackHandler(gpsMessage);

            addDrawable(gpsText);

            reOrient();

            mIsMapPage = true;
        }
Пример #2
0
        public GpsPage(DiwiPageBase parent)
            : base(parent)
        {
            Rectangle r = this.ClientRectangle;

            latLonText = new DiwiUIText(Color.Black, "", gpsFont);
            numSatText = new DiwiUIText(Color.Black, "", gpsFont);
            speedText  = new DiwiUIText(Color.Black, "", gpsFont);
            hDopText   = new DiwiUIText(Color.Black, "", gpsFont);
            demoText   = new DiwiUIText(Color.Black, "", gpsFont);
            distText   = new DiwiUIText(Color.Black, "", gpsFont);
            fixText    = new DiwiUIText(Color.Black, "", gpsFont);

            addDrawable(latLonText);
            addDrawable(numSatText);
            addDrawable(speedText);
            addDrawable(hDopText);
            addDrawable(demoText);
            addDrawable(fixText);
            addDrawable(distText);

            mMenu.addItem("terug", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug), AppController.sTerugIcon);

            title = "Gps Status";

            AppController.sGpsReader.callback += new GpsReader.CallbackHandler(gpsMessage);
        }
Пример #3
0
        public DiwiPageBase(DiwiPageBase parent)
        {
            mParent          = parent;
            sBackgroundColor = Color.FromArgb(180, 250, 0);

            if (mBlendTimer == null)
            {
                mBlendTimer = new System.Threading.Timer(new TimerCallback(doTimeoutT), new AutoResetEvent(false), Timeout.Infinite, 3000);
            }

            sBTCB = new BlendTimerCallback(blendTimout);

            mCurrentRect = this.ClientRectangle;


            if (sMeIcon == null)
            {
                sMeIcon = new Icon(AppController.sAssembly.GetManifestResourceStream(@"Diwi.Resources.mypos.ico"));
            }

            this.SuspendLayout();

            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
            this.AutoScroll    = false;
            this.BackColor     = sBackgroundColor;
            this.ClientSize    = new System.Drawing.Size(240, 320);
            this.Name          = "";
            this.Text          = "";
            this.WindowState   = System.Windows.Forms.FormWindowState.Maximized;
            this.BackColor     = sBackgroundColor;
            this.ResumeLayout(false);


            this.KeyDown += new KeyEventHandler(this.keydown);

            baseResize(this.ClientRectangle);

            mDrawableElements = new ArrayList();
            mMenu             = new DiwiUIMenu(this);
            addDrawable(mMenu);
            mouseText = new DiwiUIText();

            setBackground();


            dmcb = new DrawMiniCallback(this.ddoDM);

            mInitializing = false;
        }