Exemple #1
0
 public DiwiUIButton(Graphics g, int x, int y, string t, DiwiButtonCallbackHandler cb, DiwiPageBase form)
 {
     mParentForm = form;
     mText.text  = t;
     mRect       = new Rectangle(x, y, 12 + mText.width, 24);
     mCallback   = cb;
 }
Exemple #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);
        }
Exemple #3
0
        void doKiesRoute(int i, string s)
        {
            if (AppController.sKwxClient.agentKey == null)
            {
                mIsActive = false;
                doLogin(0, null);
            }

            if (AppController.sKwxClient.agentKey != null)
            {
                if (AppController.sRoutes == null)
                {
                    AppController.sRoutes = AppController.sKwxClient.getRouteList();
                }

                if (selectRoutePage == null)
                {
                    selectRoutePage = new SelectRoutePage(this);
                }
                mIsActive = false;
                selectRoutePage.ShowDialog();

                if (AppController.sActiveRouteID != -1)
                {
                    mIsActive = false;
                    walkRoute(0, null);
                }
            }
        }
Exemple #4
0
        public LoginPage(DiwiPageBase parent)
            : base(parent)
        {
            mMenu.addItem("Terug", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug), AppController.sTerugIcon);
            mOkButton = new DiwiUIButton(offScreenGraphics, 146, 170, "Login", buttonOK, this);

            AppController.sKwxClient.messageCallback += new KwxClient.MessageCallback(serverMessage);

            mUserText.text   = "user:"******"pass:"******"";

            addDrawable(mUserText);
            addDrawable(mPassText);
            addDrawable(mOkButton);
            addDrawable(mServerMess);

            this.Controls.Add(mUserBox);
            this.Controls.Add(mPassBox);


            reOrient();

            title = "Login";
        }
Exemple #5
0
        public PoiSelectPage(DiwiPageBase parent)
            : base(parent)
        {
            mMenu.addItem("Toon Inhoud", new DiwiUIMenu.DiwiMenuCallbackHandler(doView), null);
            mMenu.addItem("Volgende", new DiwiUIMenu.DiwiMenuCallbackHandler(doNext), AppController.sVolgIcon);

            this.Controls.Add(mTextBox);

            addDrawable(mDnlMess);

            mTextBox.Font       = new Font("Tahoma", 12, FontStyle.Regular);
            mTextBox.Multiline  = true;
            mTextBox.ReadOnly   = true;
            mTextBox.ScrollBars = ScrollBars.Vertical;
            mTextBox.ForeColor  = Color.Black;
            mTextBox.BackColor  = Color.FromArgb(198, 255, 0);

            reOrient();

            sPoiPage = new PoiViewerPage(this);

            AppController.sPoiSelectPage = this;

            title = "";
        }
Exemple #6
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;
        }
Exemple #7
0
        public MakePhotoPage(DiwiPageBase parent, string fileName)
            : base(parent)
        {
            mMenu.addItem("Voeg toe", new DiwiUIMenu.DiwiMenuCallbackHandler(voegToe), AppController.sVoegToeIcon);
            mMenu.addItem("Opnieuw", new DiwiUIMenu.DiwiMenuCallbackHandler(doFoto), AppController.sFotoIcon);
            mMenu.addItem("Terug", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug), AppController.sTerugIcon);

            title           = "Maak Foto";
            currentFilename = fileName;

            mFoto      = new DiwiScalingImage(this);
            mFoto.size = new Size(192, 144);
            mFoto.x    = 10;
            if (horizontal)
            {
                mFoto.y = 36;
            }
            else
            {
                mFoto.y = 120;
            }
            addDrawable(mFoto);

            this.Controls.Add(mNameBox);


            mFoto.bitmap = new Bitmap(currentFilename);
        }
 public SelectRoutePage(DiwiPageBase parent)
     : base(parent)
 {
     sr = new DiwiUIMenu.DiwiMenuCallbackHandler(doBekijkRoute);
     doFillMenu();
     AppController.sActiveRoute = null;
     title = "Kies Route";
 }
Exemple #9
0
 public StartPage(DiwiPageBase parent)
     : base(parent)
 {
     AppController.activate();
     title = "";
     mDrawableElements.Clear();
     mIsInitialized = true;
 }
Exemple #10
0
        public UitlegPage(DiwiPageBase parent)
            : base(parent)
        {
            mMenu.addItem("Over DiWi", new DiwiUIMenu.DiwiMenuCallbackHandler(doOver), null);
            mMenu.addItem("FAQ", new DiwiUIMenu.DiwiMenuCallbackHandler(doFaq), null);
            mMenu.addItem("Terug", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug), AppController.sTerugIcon);

            title = "Uitleg";
        }
Exemple #11
0
 void walkRoute(int i, string s)
 {
     mIsActive = false;
     if (walkRoutePage == null)
     {
         walkRoutePage = new WalkRoutePage(this);
     }
     walkRoutePage.ShowDialog();
 }
Exemple #12
0
 void doLogin(int i, string s)
 {
     mIsActive = false;
     if (liPage == null)
     {
         liPage = new LoginPage(this);
     }
     liPage.ShowDialog();
 }
Exemple #13
0
 void doTest(int i, string s)
 {
     mIsActive = false;
     if (testPage == null)
     {
         testPage = new TestPage(this);
     }
     testPage.ShowDialog();
 }
Exemple #14
0
 void doGPS(int i, string s)
 {
     mIsActive = false;
     if (gpsPage == null)
     {
         gpsPage = new GpsPage(this);
     }
     gpsPage.ShowDialog();
 }
Exemple #15
0
 protected override void OnActivated(EventArgs e)
 {
     base.OnActivated(e);
     sCurrentPage = this;
     mIsActive    = true;
     Visible      = true;
     mDoDrawMenu  = true;
     blendCount   = 4;
     draw();
 }
Exemple #16
0
 void doTimeoutT(Object stateInfo)
 {
     if (!AppController.sQuitting)
     {
         index++;
         if (index > 3)
         {
             index = 0;
         }
         DiwiPageBase.drawMini(mLogo[index]);
     }
 }
Exemple #17
0
        public MakeTextPage(DiwiPageBase parent, string fileName)
            : base(parent)
        {
            mMenu.addItem("Voeg toe", new DiwiUIMenu.DiwiMenuCallbackHandler(voegToe), AppController.sVoegToeIcon);
            mMenu.addItem("Terug", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug), AppController.sTerugIcon);

            title = "Commentaar bij locatie";

            mNameBox.Multiline = true;
            mNameBox.ForeColor = Color.Black;
            mNameBox.BackColor = Color.Transparent;
            this.Controls.Add(mNameBox);
        }
Exemple #18
0
 public DiwiUIMenu(DiwiPageBase form)
 {
     mParentForm = form;
     mParentRect = form.ClientRectangle;
     mItems      = new ArrayList();
     mCallbacks  = new ArrayList();
     mItemRects  = new ArrayList();
     mIcons      = new ArrayList();
     if (mMiniLogo == null)
     {
         mMiniLogo = new Bitmap(AppController.sAssembly.GetManifestResourceStream(@"Diwi.Resources.minis.gif"));
     }
 }
Exemple #19
0
        public TestPage(DiwiPageBase parent)
            : base(parent)
        {
            mMenu.addItem("GetRouteList", new DiwiUIMenu.DiwiMenuCallbackHandler(doGRL), null);
            mMenu.addItem("GetRoute", new DiwiUIMenu.DiwiMenuCallbackHandler(doGR), null);
            mMenu.addItem("Terug", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug), null);

            title = "Test";

            //getRoutes();
            //Stream mov = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("");
            //File f = File.Create("sdc");
            //viewVideoFileInWMP(f);
        }
Exemple #20
0
        public MakeVideoPage(DiwiPageBase parent, string fileName)
            : base(parent)
        {
            mMenu.addItem("Voeg toe", new DiwiUIMenu.DiwiMenuCallbackHandler(voegToe), AppController.sVoegToeIcon);
            mMenu.addItem("Speel af", new DiwiUIMenu.DiwiMenuCallbackHandler(doPlay), AppController.sTerugRIcon);
            mMenu.addItem("Opnieuw", new DiwiUIMenu.DiwiMenuCallbackHandler(doVideo), AppController.sVideoIcon);
            mMenu.addItem("Terug", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug), AppController.sTerugIcon);

            title           = "Maak Video";
            currentFilename = fileName;


            this.Controls.Add(mNameBox);
        }
Exemple #21
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;
        }
Exemple #22
0
        public RouteInfoPage(DiwiPageBase parent)
            : base(parent)
        {
            mapDownloaded = new mediaCallback(this.openMap);

            mMenu.addItem("Verberg beschrijving", new DiwiUIMenu.DiwiMenuCallbackHandler(hideText), AppController.sTextIcon);
            mMenu.addItem("Loop deze route", new DiwiUIMenu.DiwiMenuCallbackHandler(doLoopRoute), AppController.sStruinIcon);
            mMenu.addItem("Terug", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug), AppController.sTerugIcon);

            this.Controls.Add(mTextBox);
            mTextBox.Font      = mTextBox.Font = new Font("Tahoma", 11, FontStyle.Bold);
            mTextBox.ForeColor = Color.Black;
            mTextBox.BackColor = Color.FromArgb(198, 255, 0);
            reOrient();
        }
        public CheckStruinPage(DiwiPageBase parent)
            : base(parent)
        {
            title = "Route verlaten";
            mMenu.addItem("Ga Struinen", new DiwiUIMenu.DiwiMenuCallbackHandler(doStruin), null);
            mMenu.addItem("Vervolg route", new DiwiUIMenu.DiwiMenuCallbackHandler(doVervolg), null);
            mIsInitialized = true;
            this.Controls.Add(mTextBox);

            mTextBox.Font      = new Font("Tahoma", 12, FontStyle.Regular);
            mTextBox.ForeColor = Color.Black;
            mTextBox.BackColor = Color.FromArgb(198, 255, 0);
            mTextBox.Text      = "U bent een flink eind van uw route afgeweken... \n\nWilt u gaan struinen?\nOf wilt u de route vervolgen?";
            reOrient();
        }
Exemple #24
0
        public MainPage(DiwiPageBase parent)
            : base(parent)
        {
            // mMenu.addItem("Intro Video", new DiwiUIMenu.DiwiMenuCallbackHandler(doVideo), AppController.sVideoIcon);
            mMenu.addItem("Struinen", new DiwiUIMenu.DiwiMenuCallbackHandler(doStruin), AppController.sStruinIcon);
            mMenu.addItem("Kies route", new DiwiUIMenu.DiwiMenuCallbackHandler(doKiesRoute), AppController.sKiesIcon);
            mMenu.addItem("Terug naar route", new DiwiUIMenu.DiwiMenuCallbackHandler(walkRoute),
                          new Icon(AppController.sAssembly.GetManifestResourceStream(@"Diwi.Resources.terug-r.ico"))
                          );
            mMenu.addItem("Terug naar start", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerugStart),
                          new Icon(AppController.sAssembly.GetManifestResourceStream(@"Diwi.Resources.home.ico"))
                          );
            mMenu.addItem("GPS Status", new DiwiUIMenu.DiwiMenuCallbackHandler(doGPS),
                          new Icon(AppController.sAssembly.GetManifestResourceStream(@"Diwi.Resources.gps.ico"))
                          );
            mMenu.addItem("Stop", new DiwiUIMenu.DiwiMenuCallbackHandler(doTerug),
                          new Icon(AppController.sAssembly.GetManifestResourceStream(@"Diwi.Resources.stop.ico"))
                          );

            title = "Hoofdmenu";
        }
Exemple #25
0
        public PoiViewerPage(DiwiPageBase parent)
            : base(parent)
        {
            mMenu.addItem("Volgende", new DiwiUIMenu.DiwiMenuCallbackHandler(doNext), AppController.sVolgIcon);

            this.Controls.Add(mTextBox);
            mImage = new DiwiScalingImage(this);

            mTextBox.Font       = new Font("Arial", 12, FontStyle.Bold);
            mTextBox.Multiline  = true;
            mTextBox.ReadOnly   = true;
            mTextBox.ScrollBars = ScrollBars.Vertical;
            mTextBox.ForeColor  = Color.Black;
            mTextBox.BackColor  = Color.Transparent;

            addDrawable(mNameMess);

            reOrient();

            addDrawable(mImage);

            title = "";
        }