RFID Inventory Project

pigsabusiveElectronics - Devices

Nov 29, 2013 (3 years and 10 months ago)

329 views


RFID Inventory Project


Project Sponsor: Cline Arnett, Texas Task Force 1

Team Members:

Raymond King

Alex Smith

Charles Rubach

Jay Chu

Date: 12/14/10


Contents

Introduction

................................
................................
................................
................................
..................

4

Problem Statement/Scope

................................
................................
................................
............................

4

Design Implementation Strategy and Overview

................................
................................
...........................

4

MC9090

................................
................................
................................
................................
.....................

5

Golden
-
i

................................
................................
................................
................................
.....................

5

System Requirements

................................
................................
................................
................................
...

5

System Analysis

................................
................................
................................
................................
.............

6

MC9090 and RFID Tag Analysis

................................
................................
................................
.................

6

Software Design

................................
................................
................................
................................
............

6

Implementation

Strategy


Golden
-
i

................................
................................
................................
........

6

Hierarchy Chart


Golden
-
i

................................
................................
................................
.......................

7

Description of Code


Golden
-
i

................................
................................
................................
.................

7

Hierarchy Chart


MC9090

................................
................................
................................
......................

10

MC9090 Software Implementation

................................
................................
................................
........

10

Database Design
................................
................................
................................
................................
......

15

Testing

................................
................................
................................
................................
.........................

16

MC9090 Testing

................................
................................
................................
................................
......

16

Golden
-
i
Testing

................................
................................
................................
................................
......

17

Problems/Solutions

................................
................................
................................
................................
.....

17

MC9090

................................
................................
................................
................................
...................

17

Golden
-
i

................................
................................
................................
................................
...................

18

Conclusions

................................
................................
................................
................................
.................

19

Appendix I: Golden
-
i Code

................................
................................
................................
..........................

20

WarehouseFind.cpp

................................
................................
................................
................................

20

WarehouseF
ind.h

................................
................................
................................
................................
....

28

Appendix II: MC9090 Code

................................
................................
................................
.........................

30

Welcome Screen

................................
................................
................................
................................
.....

30

Main Menu Code

................................
................................
................................
................................
....

31

Shoring Code

................................
................................
................................
................................
...........

32

Circular Saws Co
de

................................
................................
................................
................................
..

33

Tool Belts
................................
................................
................................
................................
.................

34

Senco Nailers Code

................................
................................
................................
................................
.

35

Palm Nailers Code

................................
................................
................................
................................
...

36

Miter Saws Code

................................
................................
................................
................................
.....

37

Rescue Chain

Saws Code

................................
................................
................................
.........................

38

Lifting and Moving Code

................................
................................
................................
.........................

39

Slings Code

................................
................................
................................
................................
..............

40

Air Bags Code

................................
................................
................................
................................
..........

41

Ropes Code

................................
................................
................................
................................
.............

42

Air Hose Yellow Co
de

................................
................................
................................
..............................

44

Breaching and Breaking Code

................................
................................
................................
.................

45

Sawzalls Code

................................
................................
................................
................................
..........

46

Electric Chipping Hammers Code

................................
................................
................................
............

48

Rotary Hammer Drills Code

................................
................................
................................
....................

49

Warehouse Code

................................
................................
................................
................................
.....

50

Hardhats Code

................................
................................
................................
................................
........

51

Personal Floatation Devices Code

................................
................................
................................
...........

53

Extension Cords Code

................................
................................
................................
.............................

55

Search Cameras Code

................................
................................
................................
.............................

56

Thermal
Cameras Code

................................
................................
................................
...........................

58

Delsar Listening Devices Code

................................
................................
................................
................

59

RFID Reader Code

................................
................................
................................
................................
...

60

Appendix III: MC9090 Forms

................................
................................
................................
.......................

87

Appendix IV: Golden
-
i Screenshots

................................
................................
................................
.............

94




Introduction

Texas Task Force 1 is an Urban Search and Rescue response team which responds to disaster
situations that occur in urban environments. TX
-
TF1 has a large warehouse and several shipping
container (cans) filled with equipment. Before and after the team respo
nds to a disaster they
focus on training and inventory management. During TX
-
TF1’s training period and non
-
response
time inventory is not a big issue. When they equipment is deployed in the field and returned to
the warehouse inventory management is a comp
licated and time consuming task.

The goal of this project is to make keeping inventory on the large amount of equipment easier
and more efficient. Also since the system is designed to be very easy to use it will help new
trainees find items in the warehou
se and the cans. To solve this problem the system that was
designed incorporates RFID tags, a RFID reader attached to the MC9090 and the Kopin Golden
-
I.

The Motorola Golden
-
i is a hands
-
free, voice activated head mounted computer. The primary
display is a
small LCD screen placed in front of one eye, with a small speaker next to the ear.
The Golden
-
i has basic Bluetooth and Wi
-
Fi connectivity, as well as a mini
-
USB port to connect
accessories. A Micro
-
SD card allows programs to be run and loaded without atta
ching a cable.
Two microphones on the unit allow for noise
-
cancellation to be applied to the incoming voice
commands. The built
-
in computer runs on Windows CE, and native applications are
programmed in C. Programs can also be written in C++ to run in the G
olden
-
i shell.


Problem Statement/Scope

The project that this team has agreed to is the Texas Task Force 1 RFID
RFID Inventory

project.
This project will be a proof of concept for the further implementation of future RFID item
location systems used in Tex
as Task Force 1
locations
. The project will focus on using three
items for item location. These items are the Kopin Golden
-
I and the Motorola MC9090. A
program will be created so that the user can use simple voice commands to locate an item in
the wareh
ouse. This program will be run from the Golden
-
i
. Another program will be written
for the MC9090 that will give the user a GUI to navigate the database of items. This program
will also have the ability to read RFID tags so that the user can confirm they

have found the
item they have been looking for.


Design Implementation Strategy and Overview

For this section we have split up the two key components of the project, the MC9090 and the
Kopin Golden
-
I.



MC9090

The MC9090 has been a key component of the solution to the Texas Task Force 1’s needs. It
gives the user the ability to have a whole database of items at their fingertips. The user is able
to navigate easily through different categories of items while gi
ving them the ability to scan the
actual items to see if they are located in the place they should be. This is all possible by the use
of RFID tags. Each of these tags have been scanned to get the RFID identification number. This
number has been then as
signed to a specific item in the database. This is then how we know
that we have scanned the right item because our code checks the item scanned with the
number in the database.
The programming for the MC9090 will be completed using Microsoft
Visual St
udio 2008.

Golden
-
i

The Golden
-
i system will be used to display maps and images to the user so that they can find
the items listed on the MC9090. The design will be a voice
-
driven menu system that displays
images to the user. All valid voice commands will
be featured in the Golden
-
i Help menu, so
that the user always knows what they can do. The overhead image of the site will be taken
from Google Earth, while images of the items will be taken on site with a digital camera. The
layout of the warehouse will b
e generated with Microsoft Visio. All images will be saved in PNG
form, and edited with either Adobe Photoshop or GIMP. The program will be written in C++ and
designed as a module for the Golden
-
i Shell; this will be completed using Microsoft Visual
Studio

2008.

System
Requirements

The system requirements for the RFID Inventory project are as follows:



Fully Functional C++ code for Golden
-
I



Fully Functional C# code for the MC9090



A Fully Functional Database of Texas Task Force 1 equipment



Collection of image
s used in the step by step location process



Prototype Demo



Use the Golden
-
I to look for two or three specific items in the warehouse.



This will be using the step by step visual structure that we will be building.



The Demo will be voice activated.



Docum
entation

System Analysis

There are three parts to our RFID Inventory project, the MC9090, the Golden
-
I, and RFID tags
.
The RFID tags are paired with the MC9090 while the Golden
-
I is a standalone device.

MC9090 and RFID Tag Analysis

RFID tags as stated
before in earlier sections will be placed on boxes, tools, and any other items
needed for inventory. These tags have been added to the database and will be scanned by the
RFID reader on the MC9090
.

MC
9090
RFID Tags

We had a couple of questions on the types of RFID tags that could be used. We used the simple
name tag type of RFID tags. These tags are passive and from our knowledge may not do so well
next to metal devices. Through our testing we found that for the p
roject they worked perfectly
on power tools, boxes, and other items. The MC9090 device has the capability to read several
of these tags from a short distance, about three feet. The MC9090 worked flawlessly during the
project demo while running the progra
m that we created.


Software Design

Implementation Strategy


Golden
-
i

A new class, WarehouseFind, was created for this project. The public functions for this class are
all used by the Golden
-
i shell: GetMenuContainer, Paint, TakeControl, ReleaseControl,

ButtonPressedEvent, and SelectDocument. Two new functions were created and added as
private members to the class: AddButtons and RemoveButtons.

The Golden
-
i Shell is used to launch the C++ module, which calls a number of pre
-
existing
Golden
-
i functions.
The GIDocumentViewer class is used to open up the PNG images and
display them to the screen. The GIDocumentMenu class displays the menu options in the
Golden
-
i help menu, with options such as zoom in, zoom out, headtracker on, headtracker off,
and headtrac
ker reset. Buttons were manually added to this menu using the GIMenuButton
class, as the GIDocumentMenu class source was not available.

Hierarchy Chart


Golden
-
i


Description of Code


Golden
-
i

WarehouseFind() [constructor]

This function is the class con
structor, called when the Golden
-
i shell is first executed. The
application directory and name are set here, as well as the language localization settings. The
documentMenu and documentViewer variables are initialized to NULL. The screenView
enumerated typ
e is initialized to OVERVIEW_VIEW, the itemView enumerated type is set to
FLOORPLAN_ITEM_VIEW, and the numUsedButtons variable is set to 0.

TakeControl()

TakeControl is the first function called when the user starts the WarehouseFind application. It
initia
lizes the screenView and itemView variables to OVERVIEW_VIEW and
FLOORPLAN_ITEM_VIEW, respectively. It creates a new document menu, and tells the speech
recognizer to add those button names to its current vocabulary. A new document viewer is
created to fil
l the whole screen with a 100% view scale, and the viewer is made invisible. Six
buttons are created, each 150 pixels wide by 35 pixels tall with center
-
aligned size 12 point font.
The buttonxText strings are filled with the text to be displayed for each b
utton. As this is the
first screen, the text “Warehouse”, “Tool Can 1”, “Tool Can 2”, and “Tool Can 3” are the text
fields for buttons 1 through 4. Buttons 5 and 6 have no text, and will not be displayed.
AddButtons is called to add the newly created butto
ns to the Golden
-
i Help menu. The
overhead map view file is then loaded into imageFileName, and the SelectDocument() function
is called to display that image to the screen.

GetMenuContainer()

The GetMenuContainer() function is called when a menu is display
ed to the screen. It is an
overloaded function that matches a pre
-
existing Golden
-
i Shell function. If there is no document
viewer created, or if the document viewer is invisible, the function calls the pre
-
existing
GetMenuContainer function. However, if t
he document viewer has been created, then this
function updates the Golden
-
i Help menu.

ButtonPressedEvent()

The ButtonPressedEvent function is called whenever an onscreen or offscreen button is
activated, whether by voice command or by clicking with an ex
ternal mouse. Each button has
an associated action with it. Commands “level1”, “level2”, and “level3” set the view scale (and
therefore the zoom amount) in the document viewer to 100%, 200%, or 300%, respectively. The
“zoomIn” and “zoomOut” commands add or

subtract 100 to the current view scale in the
document viewer. The “trackerOn”, “trackerOff”, and “trackerReset” control the head tracker;
the first enables the tracker, the second disables it, and the third resets the image so that it is
front and center
. The remaining button events are specific to the WarehouseFind class.

First, the screenView variable is checked, to see what screen is currently being showed. The
overview level has actions for the buttons “Warehouse”, “Tool Can 1”, “Tool Can 2”, and “Too
l
Can 3”. If the Warehouse button was pressed, then the old buttons are removed and new
buttons “Hard Hats”, “Hazmat Suits”, “PFD”, “Search Cameras”, “Show Floorplan” and “Show
Pictures” added. The next picture then loaded, which is a Google Maps view of D
isaster City
with the warehouse circled. Finally, screenView is set to WAREHOUSE_VIEW.

If any of the tool can buttons are pressed at the first screen, all the buttons are removed and
the appropriate tool can is circled on the overhead map. Also, the scree
nView is changed to
TOOL_CAN_x_VIEW.

If we are already in the warehouse view, we have 6 buttons. The default is to show the Google
Maps view for the warehouse and the floorplans for each item in the warehouse. However, this
can be changed with the “Show Pi
ctures” button, which toggles itemView to
PICTURE_ITEM_VIEW. The first time the pictures button is pressed, it will also change the
current image to the picture view as well as any future images. The “Show Floorplan” button
will change this back to the flo
orplan view, toggling itemView to FLOORPLAN_ITEM_VIEW and
redisplaying the current floorplan. Each item button (hard hats, hazmat suits, PFD, and Search
Cameras) shows each item, either in an overhead floorplan view (FLOORPLAN_ITEM_VIEW
mode) or as a pictu
re in the warehouse with the item highlighted (PICTURE_ITEM_VIEW).

If the “closeDocument” button is pressed in any level, the program will return to the highest
level overhead view.

ReleaseControl()

This function is called when the application is exited
and the user is returned to the Golden
-
i
main application menu. The speech recognizer is first stopped before doing anything else. The
document viewer is made invisible, and all menu items are removed. Both the document
viewer and document menu are set to
null. The speech recognizer is restarted, which
effectively takes out the removed buttons from the vocabulary list.

Paint(GIDC *gidc)

This function is another overloaded function that the Golden
-
i Shell calls. If the document
viewer exists and is visible,
it is painted to the screen. This means it is updated immediately.

AddButtons()

This function adds buttons to the Golden
-
i Help menu. First, the bounds of numUsedButtons
are checked to make sure it isn’t negative and it isn’t greater than the maximum numbe
r of
buttons. If this is true, then the speech recognizer is stopped and the next loop entered. This
loop iterates from 1 through the number of buttons used. In each iteration, the button’s name,
text, and speech command are changed. The button listener is

told to add the speech command
to the recognizer vocabulary, and the button is added to the menu. After the loop has been
completed, the speech recognizer is restarted; this reloads the vocabulary list, adding the new
buttons to the speech recognizer.

Rem
oveButtons()

This function removes buttons from the Golden
-
i Help menu. First, the bounds of
numUsedButtons are checked to make sure it isn’t negative and it isn’t greater than the
maximum number of buttons. If this is true, then the speech recognizer is s
topped and the next
loop entered. This loop iterates from 1 through the number of used buttons, removing each
button in turn from the document menu. Once this is completed, the speech recognizer is
restarted; this reloads the vocabulary list, thereby remov
ing the deleted buttons.

SelectDocument()

This function is called from TakeControl or ButtonPressedEvent when an image needs to be
loaded to the screen. The function first sets the view scale to 100%. A new ImageDocument is
created with the file named in i
mageFileName, and the document viewer is set to that file. The
headtracker is started, the image is set to be visible, and the screen is immediately repainted.

~WarehouseFind() [destructor]

This function is called when the Golden
-
i Shell quits, releasing r
esources on the device. If the
documentViewer or documentMenu variables are not null (meaning they have been used),
each will be deleted.


Hierarchy Chart


MC9090


Welcome Screen
Main Menu
Shoring
Lifting and Moving
Breaching and
Breaking
Warehouse
Item
Item
Item
Item
RFID Verification
RFID Verification
RFID Verification
RFID Verification


MC9090 Software Implementation

As discussed in the summary se
ction the MC9090 is needed to read the RFID tags that will be
used to tag Texas Task Force 1 equipment. As a team we created a GUI that would be able to
access the RFID Reader of the MC9090 and provide an easy to use interface for the customer to
use.
The MC9090 will give the user to find the exact item they are looking for. The GUI is
created into the key sections that are normally used by employees. The first screen that the
user will presented with is the welcome screen. This screen just gives the

user the ability to
start the RFID Inventory program or to exit it.


Once the user presses Start then the program will bring you to the Main Menu. The main menu
consists of three specific categories that are used by the Texas Task Force 1 and also a
generic
category. The three specific categories are Shoring, Lifting and Moving, and Breaching and
Breaking. The generic category was the warehouse category. Each of these categories pertain
to actual spots that specific types of equipment are located.

To access the items in any of these
categories the user will click on the buttons. The Exit button exits the whole program.



Tool Categories

The Shoring category we included several different types of tools that the Texas Task Force 1
uses.



Circular
Saws



Tool Belts



Senco Nailers



Palm Nailers



Miter Saws



Rescue Chain Saw

Each of these items lead the user to another screen where it would give the user the ability to
use the RFID reader to verify the item they were looking for. To do this the user will f
irst select
the exact item from the drop down menu. This will then give the user a pop up box that will
give the user information about where the item will be located. Once the item is chosen the
user then clicks the verify button to check the RFID tags
with the RFID reader.









Once the verify button has been clicked then the RFID reader screen will pop up on the display.
This display will stay up until the user scans the correct item. It will notify the user if they have
successfully found th
e item with a message box.


This process of selecting items and verifying them is the same for the rest of the items we have
included in the data base. The categories are then broken down in the following outline.



Lifting and Moving



Slings



Air bags



Ro
pes



Air Hose Yellow





Breaching and Breaking



Sawzalls



Electric Chipping Hammers



Rotary Hammer Drills





Warehouse



Hardhats



Personal Floatation Devices



Extension Cords



Search Cameras



Thermal Cameras



Delsar Listening Devices


Database Design

The purpose of

a database in this project is to store all of the data for each item in an organized
form. We first tried to create a SQL database with three datasets so it is easy to cross reference.
The first data set contain Item’s ID which is the ID number of RFID ta
g we are going to tag them
and second is the item’s description which allow user to give clear descriptive name to each
item. Second dataset consists item ID and box’s number and finally third dataset includes box’s
number and container’s number. All three

data sets are connected so when user has the item’s
ID user can cross
-
reference to find the container’s number and box’s number the item is in. The
SQL database structure is shown in figure 1.


We couldn’t upload or synchronize this database to the MC909
0 so we switched to different
method. The conclusion we came up is to use a CSV file as our database and show it in a
Datagrid. Figure 2 shows CSV file in a datagrid view.


As shown on the graph, there are five fields in CSV file. Location field indicates

where the item
is located, second field is the item name, third field is the item# where it is useful if there are
multiple items of the same type, fourth field is the label shows on the RFID tag and last field is
RFID tag number. When a
n

item is needed I
t can be searched by Item name or the label and the
location where be displayed step by step for search of item.


Testing

MC9090 Testing

When testing the MC9090
we had to check for several things such as, that all buttons work
correctly, that the RFID reader works, and that the code can distinguish between correct items
and incorrect items. During the process of coding the MC9090 GUI we tested every change that
w
e made to each button to make sure they navigated the program correctly. This insured that
everything worked, instead of waiting till the end to check everything where something could
slip due to the complexity of the code. When writing the RFID Reader c
ode we had to make
sure it would work with our project. We had working code in a separate Visual Studio Project
and had to import it to our project. This did present some errors that we had to fix. Once
everything was fixed we then tested the reader to
see if it read RFID tags. After the code was
proven to work in reading tags we then moved on to checking to see if our algorithm

correctly
distinguished the item the user was looking for. We tested this by reading the RFID tag
associated with the item sp
ecified as well as a wrong tag. This proved that our concept was
working. After those initial tests were done we moved onto checking to see if the RFID tags we
chose to use would work in the environment that this project was specified to work. We placed

the tags inside of the boxes Texas Task Force 1 used as well as the tags on the power tools to
see if they were able to be read with the RFID Reader. We found that our RFID tags of choice
would be suitable for the project.

Golden
-
i

Testing

The Golden
-
i

program was tested thoroughly in order to ensure it worked properly. Every menu
option was tested multiple times on every screen to make sure all possibilities were accounted
for. Also, menu options that should have been removed were tested, by speaking t
he outdated
commands. For example, on the Warehouse level, the phrase “Tool Can 1” was spoken to make
sure the command was no longer valid. Likewise, when the main screen was re
-
entered after
speaking the “closeDocument” command, options from the last menu

(such as “Hard Hats”)
were spoken to make sure this wasn’t executed either. In addition, debug messages were sent
to the Golden
-
i console printing what the current speech command was, so that we could see
what command the Golden
-
i had heard.


Problems/So
lutions

MC9090

As a group we did not run into many problems with the MC9090. The first problem that we
encountered was applying our RFID reader code to the project code. When we imported the
RFID code we encountered several errors, many that we did not u
nderstand or ever run into.
We found out the problem was a reference problem. We fixed this by adding the right
references needed to run the code. The other problem that we had was developing an
algorithm to distinguish between the correct RFID tag and
an incorrect RFID Tag. The problem
that we had was actually learning where the RFID read was stored in the original RFID code.
We spent a lot of time figuring out where this variable was so that we could check it against our
small database of items. We
found the variable by digging through the code and using watches
and other key tools in Microsoft Visual Studio 2008 to figure things out. Once we did we just
created some code that would check the RFID numbers that were being read. Those were the
only m
ain issues that we ran into for the
coding of the MC9090.

Golden
-
i

The Golden
-
i had a number of problems, many of which were solved. As the source code for the
Golden
-
i Shell was not available, the source of most of those problems could not be found. For
e
xample, the existing source code for the ImageViewer (also known as “My Pictures” on the
application page) was included, but creating a new project for this and placing it on the Golden
-
i was not successful. The speech recognizer would freeze when entering

the new ImageViewer
program for no apparent reason. The only fix for this was to move the program out of the
“Developer Studio” folder to the main application (My Programs) screen; it is not known why
this worked.

A number of problems that were fixed invo
lved the added buttons. When running the program
a second time without restarting the Golden
-
i, button text from previous runs would appear
over the buttons in the menu. To fix this, the ReleaseControl function was modified to make
sure all menu items were

removed on program exit. Also, new words would not be added and
old words would not be removed from the speech recognizer vocabulary list when buttons
were changed. To fix this, the speech recognizer was stopped when making any button changes
and then res
tarted afterwards, reloading the vocabulary list. Finally, when the button text was
updated the speech command would not reflect those changes. To fix this, in the AddButtons
function, the button name, button text, and button speech command were all change
d at once.

Some of the unsolved problems included language localization and SD card corruption. The
language localization function for new applications never worked properly with the Golden
-
i.
The language localization feature replaces text labels in code
with lines from text files in a
certain directory. For example, “buttonText” will be replaced with “This is a button” in English,
as long as the en_us.txt file in the language directory has the line “buttonText = This is a
button”. No text was ever convert
ed from its label to the proper text. Instead, a large number
of #define statements were added to the header file to take care of this. Another side effect of
this problem was that the program name was shown as “displayLabel” on the My Programs
screen. Als
o, the document menu items such as “zoomIn” were shown as just that, not as the
proper “Zoom In” from the language file. A number of fixes were attempted, including manually
setting the localization directory in code, calling Localize functions multiple ti
mes, and writing
the language file path to the preferences file to check for correctness. None of the solutions
worked.

The SD card corruption happened any time the program crashed on the Golden
-
i. The creators
of the Golden
-
i shell included no error check
ing or graceful exiting of the shell. Any time an
invalid action was run, or there was an error calling a function, the entire shell would crash
giving no useful information. To clear this error requires the user to click a button on the screen,
but becaus
e the speech recognizer died with the shell there is no way to click the button.
Turning the Golden
-
i off is the only way to clear the error without an external mouse plugged in.
Because of the sudden crash, any open files were not closed properly, corrupt
ing them. This
would require the user to repair the SD card on another computer before using it again. The
only way to avoid this error is to make sure the code runs properly on a Windows32 machine
beforehand; when this crashes, the user still has control
of the rest of the operating system.

Debugging was accomplished by different methods than a normal
Windows
-
based
program.
Normal debugging, such as stepping through code or using breakpoints, was impossible with
the Golden
-
i. First, the Golden
-
i itself ha
s no keyboard or other input method other than speech
without wiring in something to the USB port. Second, because the module is a DLL file run in
the Golden
-
i shell and not run directly, the code could not have breakpoints. Two methods
were used to get ar
ound these problems. First, debugging messages were sent to the console,
allowing the user to see what was going on in the program. Secondly, code running on the
Win32 version of the Golden
-
i shell on a l
aptop could crash, but the Just
-
in
-
t
ime Debugger
all
owed the programmer to jump to where the program crashed. This would go to the line in
the .cpp file, which could be then corrected.

Conclusions

The system was designed to be user friendly and to increase productivity be decreasing the
time it takes to loc
ate items. The system also keeps track of inventory to keep all the items
organized and easy to find. The project was designed to be a proof of concept and the
foundation for a much more valuable system. The system is designed to be scaled up to
incorporat
e all the items in the warehouse and the cans. Also the software can be built upon to
improve and expand the system. With further improvements and upgrades the system could
become a required piece of equipment for the TX
-
TF1.



Appendix I: Golden
-
i Code

W
arehouseFind.cpp

#pragma once


#include "WarehouseFind.h"

#include "GIButton.h"

#include "LayoutManager.h"

#include "GIDocumentViewer.h"

#include "ImageDocument.h"

#include "Preferences.h"


WarehouseFind::WarehouseFind()

{


SetApplicationDirectory(_T("Warehouse Mod"));


SetName(_T("WarehouseFind"));

//

SetParentApplication(_T("DeveloperZone"));


GetLocalization()
-
>SetLanguageDirectory(GetAbsoluteApplicationDirectory(),
_T("language"));


GetLocalization()
-
>SetLanguageCode(_T("
en_us"));




//documentMenu = new GIDocumentMenu();


//documentMenu
-
>SetButtonListener(this);


documentMenu = NULL;


documentViewer = NULL;


screenView = OVERVIEW_VIEW;


itemView = FLOORPLAN_ITEM_VIEW;


numUsedButtons = 0;


}


WarehouseFind::~WarehouseFind
()

{


if (documentViewer!=NULL) delete documentViewer;


if (documentMenu!=NULL) delete documentMenu;

}


GIContainer* WarehouseFind::GetMenuContainer()

{

//

GetApplicationHost()
-
>Console(_T("GetMenuContainer started "));


if (documentViewer==NULL){

//


GetApplicationHost()
-
>Console(_T("documentViewer==NULL "));



return GIApplication::GetMenuContainer();


}



if (documentViewer
-
>IsVisible()==false){

//


GetApplicationHost()
-
>Console(_T("documentViewerIsVisible(false) "));



return GIApplication::GetMenuC
ontainer();


}



if (documentViewer!=NULL){

//


GetApplicationHost()
-
>Console(_T("documentViewer!=NULL "));



documentMenu
-
>SetZoomLevel( documentViewer
-
>GetViewScale() /100);



documentMenu
-
>SetTrackerEnabled(documentViewer
-
>HeadtrackerIsRunning());



doc
umentMenu
-
>SetTotalPages(1,1);


//


GetApplicationHost()
-
>SpeechRecognizerStop();



}


//Make sure this is localized


GetLocalization()
-
>LocalizeContainer(documentMenu);


return documentMenu;


}


void WarehouseFind::AddButtons()

{


if ((numUsedButtons > 0)
&&(numUsedButtons <= MAX_BUTTONS))


{



GetApplicationHost()
-
>SpeechRecognizerStop();



for (int i = 1; i <= numUsedButtons; i++)



{




switch (i)




{




case 1:





button1
-
>SetName(button1Text);





button1
-
>SetText(button1Text);





button1
-
>SetSpeech
Command(button1Text);





button1
-
>SetButtonListener(this);





documentMenu
-
>Add(button1);





break;




case 2:





button2
-
>SetName(button2Text);





button2
-
>SetText(button2Text);





button2
-
>SetSpeechCommand(button2Text);





button2
-
>SetButtonListen
er(this);





documentMenu
-
>Add(button2);





break;




case 3:





button3
-
>SetName(button3Text);





button3
-
>SetText(button3Text);





button3
-
>SetSpeechCommand(button3Text);





button3
-
>SetButtonListener(this);





documentMenu
-
>Add(button3);





brea
k;




case 4:





button4
-
>SetName(button4Text);





button4
-
>SetText(button4Text);





button4
-
>SetSpeechCommand(button4Text);





button4
-
>SetButtonListener(this);





documentMenu
-
>Add(button4);





break;




case 5:





button5
-
>SetName(button5Text);





button5
-
>SetText(button5Text);





button5
-
>SetSpeechCommand(button5Text);





button5
-
>SetButtonListener(this);





documentMenu
-
>Add(button5);





break;




case 6:





button6
-
>SetName(button6Text);





button6
-
>SetText(button6Text);





button6
-
>Set
SpeechCommand(button6Text);





button6
-
>SetButtonListener(this);





documentMenu
-
>Add(button6);





break;






default:





break;




}



}



GetApplicationHost()
-
>SpeechRecognizerStart();


}

}


void WarehouseFind::RemoveButtons()

{


if ((numUsedButtons

> 0)&&(numUsedButtons <= MAX_BUTTONS))


{



GetApplicationHost()
-
>SpeechRecognizerStop();



for (int i = 1; i <= numUsedButtons; i++)



{




switch (i)




{




case 1:





documentMenu
-
>Remove(button1,false);





break;




case 2:





documentMenu
-
>Remove
(button2,false);





break;




case 3:





documentMenu
-
>Remove(button3,false);





break;




case 4:





documentMenu
-
>Remove(button4,false);





break;




case 5:





documentMenu
-
>Remove(button5,false);





break;




case 6:





documentMenu
-
>Remove(but
ton6,false);





break;




default:





break;




}



}



GetApplicationHost()
-
>SpeechRecognizerStart();


}

}



void WarehouseFind::TakeControl()

{



//

LocalizeApplication();


Preferences::Set(_T("Warehouse Find"), _T("Language File"), (GetLocalization()
-
>GetLanguageFile()));


GetApplicationHost()
-
>Console(_T("TakeControl Started "));


RemoveAll(true);



screenView = OVERVIEW_VIEW;


itemView = FLOORPLAN_ITEM_VIEW;


itemViewLast = itemView;



// Setup the document Menu


documentMenu = new GIDocumentMenu();


documentMenu
-
>SetButtonListener(this);




// Setup the document viewer


documentViewer = new GIDocumentViewer(0,0, GetWidth(), GetHeight());


documentViewer
-
>SetVisible(false);


documentViewer
-
>SetViewScale(100);


Add(documentViewer);



// Setup the menu
buttons


// set button text


wcsncpy(button1Text, _T(warehouseButtonText), MAX_BUTTON_STRING_LENGTH);


wcsncpy(button2Text, _T(toolCan1ButtonText), MAX_BUTTON_STRING_LENGTH);


wcsncpy(button3Text, _T(toolCan2ButtonText), MAX_BUTTON_STRING_LENGTH);


wcsncpy
(button4Text, _T(toolCan3ButtonText), MAX_BUTTON_STRING_LENGTH);


wcsncpy(button5Text, _T(""), MAX_BUTTON_STRING_LENGTH);


wcsncpy(button6Text, _T(""), MAX_BUTTON_STRING_LENGTH);


numUsedButtons = 4;



// create buttons


button1 = new GIMenuButton(button1T
ext,0,100,150,35);


button1
-
>SetTextAlignment(GIDC::TEXT_ALIGN_CENTER);


button1
-
>SetTextSize(12);



button2 = new GIMenuButton(button2Text,0,140,150,35);


button2
-
>SetTextAlignment(GIDC::TEXT_ALIGN_CENTER);


button2
-
>SetTextSize(12);



button3 = new GIMen
uButton(button3Text,0,180,150,35);


button3
-
>SetTextAlignment(GIDC::TEXT_ALIGN_CENTER);


button3
-
>SetTextSize(12);



button4 = new GIMenuButton(button4Text,0,220,150,35);


button4
-
>SetTextAlignment(GIDC::TEXT_ALIGN_CENTER);


button4
-
>SetTextSize(12);



button5 = new GIMenuButton(button5Text,0,260,150,35);


button5
-
>SetTextAlignment(GIDC::TEXT_ALIGN_CENTER);


button5
-
>SetTextSize(12);



button6 = new GIMenuButton(button6Text,0,300,150,35);


button6
-
>SetTextAlignment(GIDC::TEXT_ALIGN_CENTER);


button6
-
>Set
TextSize(12);



// add buttons


AddButtons();



// display image


wcsncpy(imageFileName, _T(OVERHEAD_MAP_FILE),100);

//

SelectDocument(_T(OVERHEAD_MAP_FILE));


SelectDocument();




// make copy of last image filename, using OVERHEAD_MAP_FILE





// try to
localize app (never works)


GetLocalization()
-
>LocalizeContainer(this);

//

LocalizeApplication();


GetApplicationHost()
-
>Console(_T("TakeControl completed"));

}




void WarehouseFind::ReleaseControl()

{


GetApplicationHost()
-
>SpeechRecognizerStop();


documentViewer
-
>SetVisible(false);


RemoveAll(true);


RemoveAllMenuItems(true);

//

RemoveButtons(4);


documentViewer=NULL;


documentMenu = NULL;


GetApplicationHost()
-
>BackgroundImageSuppress(false);


GetApplicationHost()
-
>SpeechRecognizerStart();

}


void
WarehouseFind::ButtonPressedEvent(GIComponent *component, wchar_t *componentName,
wchar_t *speechCommand)

{


GetApplicationHost()
-
>Console(_T("ButtonPressedEvent started "));


GetApplicationHost()
-
>Console(componentName);


GetApplicationHost()
-
>Console(spe
echCommand);





//Menu Options


GIDocumentMenu *menu = dynamic_cast<GIDocumentMenu*>(component);

//

if (menu!=NULL){



if (wcscmp(componentName, _T("level1"))==0)documentViewer
-
>SetViewScale(100);



if (wcscmp(componentName, _T("level2"))==0)documentViewe
r
-
>SetViewScale(200);



if (wcscmp(componentName, _T("level3"))==0)documentViewer
-
>SetViewScale(300);

//


if (wcscmp(componentName, _T("level4"))==0)documentViewer
-
>SetViewScale(400);

//


if (wcscmp(componentName, _T("level5"))==0)documentViewer
-
>SetViewSc
ale(500);




if (wcscmp(componentName, _T("zoomIn"))==0)documentViewer
-
>SetViewScale(documentViewer
-
>GetViewScale()+100);



if (wcscmp(componentName, _T("zoomOut"))==0)documentViewer
-
>SetViewScale(documentViewer
-
>GetViewScale()
-
100);




if
(wcscmp(componentName, _T("trackerOn"))==0)documentViewer
-
>HeadtrackerStart();



if (wcscmp(componentName, _T("trackerOff"))==0)documentViewer
-
>HeadtrackerStop();



if (wcscmp(componentName, _T("trackerReset"))==0)documentViewer
-
>ResetView();






if (scre
enView == OVERVIEW_VIEW)



{




if (wcscmp(componentName, _T(warehouseButtonText))==0)




{





RemoveButtons();





wcsncpy(button1Text, _T(hardHatsButtonText),
MAX_BUTTON_STRING_LENGTH);





wcsncpy(button2Text, _T(hazmatSuitsButtonText),
MAX_BUTTON_STRI
NG_LENGTH);





wcsncpy(button3Text, _T(PFDButtonText),
MAX_BUTTON_STRING_LENGTH);





wcsncpy(button4Text, _T(searchCamerasButtonText),
MAX_BUTTON_STRING_LENGTH);





wcsncpy(button5Text, _T(showFloorplanButtonText),
MAX_BUTTON_STRING_LENGTH);





wcsncpy
(button6Text, _T(showPictureButtonText),
MAX_BUTTON_STRING_LENGTH);





numUsedButtons = 6;





AddButtons();





wcsncpy(imageFileName, _T(WAREHOUSE_FILE),100);





SelectDocument();





screenView = WAREHOUSE_VIEW;

//




wcsncpy(lastImageFile, _T(OVERHEA
D_MAP_FILE),100);




}




else if (wcscmp(componentName, _T(toolCan1ButtonText))==0)




{





RemoveButtons();





numUsedButtons = 0;





wcsncpy(imageFileName, _T(TOOL_CAN_1_FILE),100);





SelectDocument();





screenView = TOOL_CAN_1_VIEW;





}




else if (wcscmp(componentName, _T(toolCan2ButtonText))==0)




{





RemoveButtons();





numUsedButtons = 0;





wcsncpy(imageFileName, _T(TOOL_CAN_2_FILE),100);





SelectDocument();





screenView = TOOL_CAN_2_VIEW;




}




else if (wcscmp(componentName,

_T(toolCan3ButtonText))==0)




{





RemoveButtons();





numUsedButtons = 0;





wcsncpy(imageFileName, _T(TOOL_CAN_3_FILE),100);





SelectDocument();





screenView = TOOL_CAN_3_VIEW;




}



}



else if (screenView == WAREHOUSE_VIEW)



{




if (wcscmp(
componentName, _T(hardHatsButtonText))==0)




{





//RemoveButtons(4);





if (itemView==FLOORPLAN_ITEM_VIEW) wcsncpy(imageFileName,
_T(HARD_HATS_FILE),100);





else wcsncpy(imageFileName, _T(HARD_HATS_PIC_FILE),100);





SelectDocument();





//screenVi
ew = WAREHOUSE_VIEW;








}




else if (wcscmp(componentName, _T(hazmatSuitsButtonText))==0)




{





//RemoveButtons(4);





if (itemView==FLOORPLAN_ITEM_VIEW) wcsncpy(imageFileName,
_T(HAZMAT_SUITS_FILE),100);





else wcsncpy(imageFileName,
_T(HAZMAT_SUITS_PIC_FILE),100);





SelectDocument();





//screenView = WAREHOUSE_VIEW;








}




else if (wcscmp(componentName, _T(PFDButtonText))==0)




{





//RemoveButtons(4);





if (itemView==FLOORPLAN_ITEM_VIEW) wcsncpy(imageFileName,
_T(PFD_FIL
E),100);





else wcsncpy(imageFileName, _T(PFD_PIC_FILE),100);





SelectDocument();





//screenView = WAREHOUSE_VIEW;








}




else if (wcscmp(componentName, _T(searchCamerasButtonText))==0)




{





//RemoveButtons(4);





if (itemView==FLOORPLAN_IT
EM_VIEW) wcsncpy(imageFileName,
_T(SEARCH_CAMERAS_FILE),100);





else wcsncpy(imageFileName,
_T(SEARCH_CAMERAS_PIC_FILE),100);





SelectDocument();





//screenView = WAREHOUSE_VIEW;








}




else if (wcscmp(componentName, _T(showFloorplanButtonText))
==0)




{





itemView = FLOORPLAN_ITEM_VIEW;





if (wcscmp(imageFileName, _T(HARD_HATS_PIC_FILE))==0)





{






wcsncpy(imageFileName, _T(HARD_HATS_FILE),100);






SelectDocument();





}





else if (wcscmp(imageFileName,
_T(HAZMAT_SUITS_PIC_FILE))==0)





{






wcsncpy(imageFileName, _T(HAZMAT_SUITS_FILE),100);






SelectDocument();





}





else if (wcscmp(imageFileName, _T(PFD_PIC_FILE))==0)





{






wcsncpy(imageFileName, _T(PFD_FILE),100);






SelectDocument();





}





else if (wcscmp(imageFileName,
_T(SEARCH_CAMERAS_PIC_FILE))==0)





{






wcsncpy(imageFileName, _T(SEARCH_CAMERAS_FILE),100);






SelectDocument();





}





else if (wcscmp(imageFileName, _T(WAREHOUSE_FILE))==0)





{






wcsncpy(imageFileNam
e, _T(WAREHOUSE_FP_FILE),100);






SelectDocument();





}



//




ImageDocument *imageDocument = documentViewer
-
>GetDocument();





}




else if (wcscmp(componentName, _T(showPictureButtonText))==0)




{





itemView = PICTURE_ITEM_VIEW;





if
(wcscmp(imageFileName, _T(HARD_HATS_FILE))==0)





{






wcsncpy(imageFileName, _T(HARD_HATS_PIC_FILE),100);






SelectDocument();





}





else if (wcscmp(imageFileName, _T(HAZMAT_SUITS_FILE))==0)





{






wcsncpy(imageFileName,
_T(HAZMAT_SUITS_PIC_F
ILE),100);






SelectDocument();





}





else if (wcscmp(imageFileName, _T(PFD_FILE))==0)





{






wcsncpy(imageFileName, _T(PFD_PIC_FILE),100);






SelectDocument();





}





else if (wcscmp(imageFileName, _T(SEARCH_CAMERAS_FILE))==0)





{






wc
sncpy(imageFileName,
_T(SEARCH_CAMERAS_PIC_FILE),100);






SelectDocument();





}





else if (wcscmp(imageFileName, _T(WAREHOUSE_FP_FILE))==0)





{






wcsncpy(imageFileName, _T(WAREHOUSE_FILE),100);






SelectDocument();





}





}



}



if (wcscmp(componentName, _T("closeDocument"))==0)



{




GetApplicationHost()
-
>Console(_T("closeDocument called "));




RemoveButtons();




wcsncpy(button1Text, _T(warehouseButtonText),
MAX_BUTTON_STRING_LENGTH);




wcsncpy(button2Text, _T(toolCan1Button
Text),
MAX_BUTTON_STRING_LENGTH);




wcsncpy(button3Text, _T(toolCan2ButtonText),
MAX_BUTTON_STRING_LENGTH);




wcsncpy(button4Text, _T(toolCan3ButtonText),
MAX_BUTTON_STRING_LENGTH);




wcsncpy(button5Text, _T(""), MAX_BUTTON_STRING_LENGTH);




wcsncpy(bu
tton6Text, _T(""), MAX_BUTTON_STRING_LENGTH);




numUsedButtons = 4;




wcsncpy(imageFileName, _T(OVERHEAD_MAP_FILE),100);




AddButtons();




SelectDocument();




screenView = OVERVIEW_VIEW;





//GetApplicationHost()
-
>SelectApplicationByName(_T(""));



}




documentViewer
-
>Repaint();



GetApplicationHost()
-
>MenuSetVisible(false);

//

}

//

else GetApplicationHost()
-
>Console(_T("Menu==NULL "));



GetApplicationHost()
-
>Console(_T("ButtonPressedEvent ended "));

}


void WarehouseFind::SelectDocument()

{

//

GetApplicationHost()
-
>Console(_T("SelectDocument started "));


documentViewer
-
>SetViewScale(100);


ImageDocument *imageDocument = new
ImageDocument(GetAbsoluteApplicationDirectory(), imageFileName);


documentViewer
-
>SetDocument(imageDocument);


documentVie
wer
-
>HeadtrackerStart();


documentViewer
-
>SetVisible(true);


GetApplicationHost()
-
>BackgroundImageSuppress(true);


RepaintImmediately();

//

GetApplicationHost()
-
>Console(_T("SelectDocument ended "));

}


void WarehouseFind::Paint(GIDC *gidc){


//If document

viewer is visible, paint it only for maximum speed efficiency


//otherwise paint as normal


if (documentViewer!=NULL){



if (documentViewer
-
>IsVisible()){




documentViewer
-
>Paint(gidc);




return;



}


}


GIApplication::Paint(gidc);

}




WarehouseFind.h

#pragma once


#include "GIApplication.h"

#include "GILabel.h"

#include "GIDocumentViewer.h"

#include "GIDocumentMenu.h"


#define testButtonText "Test Button"

#define toolCan1ButtonText "Tool Can 1"

#define toolCan2ButtonText "Tool Can 2"

#define
toolCan3ButtonText "Tool Can 3"

#define warehouseButtonText "Warehouse"


#define hardHatsButtonText "Hard Hats"

#define hazmatSuitsButtonText "Hazmat Suits"

#define PFDButtonText "P F D"

#define searchCamerasButtonText "Search Cameras"


#define showFloorpl
anButtonText "Show Floorplan"

#define showPictureButtonText "Show Picture"


#define nextButtonText "Next"

#define zoomIn "Zoom In"

#define zoomOut "Zoom Out"

#define level1 "Level 1"

#define level2 "Level 2"

#define level3 "Level 3"

#define MAX_BUTTONS 6

#
define MAX_BUTTON_STRING_LENGTH 30


#define IMAGE_PATH "
\
\
images"

#define TOOL_CAN_1_FILE "
\
\
images
\
\
Tool Can 1.png"

#define TOOL_CAN_2_FILE "
\
\
images
\
\
Tool Can 2.png"

#define TOOL_CAN_3_FILE "
\
\
images
\
\
Tool Can 3.png"

#define OVERHEAD_MAP_NO_LABELS_FILE
"
\
\
images
\
\
Overhead Map.png"

#define OVERHEAD_MAP_FILE "
\
\
images
\
\
Overhead Map with Labels.png"

#define WAREHOUSE_FILE "
\
\
images
\
\
Warehouse.png"

#define WAREHOUSE_FP_FILE "
\
\
images
\
\
Warehouse fp.png"


#define HARD_HATS_FILE "
\
\
images
\
\
Hard Hats.png"

#defin
e HAZMAT_SUITS_FILE "
\
\
images
\
\
Hazmat Suits.png"

#define PFD_FILE "
\
\
images
\
\
PFD.png"

#define SEARCH_CAMERAS_FILE "
\
\
images
\
\
Search Cameras.png"


#define HARD_HATS_PIC_FILE "
\
\
images
\
\
Hard Hats pic.png"

#define HAZMAT_SUITS_PIC_FILE "
\
\
images
\
\
Hazmat Suits

pic.png"

#define PFD_PIC_FILE "
\
\
images
\
\
PFD pic.png"

#define SEARCH_CAMERAS_PIC_FILE "
\
\
images
\
\
Search Cameras pic.png"



class WarehouseFind : public GIApplication

{


public:


WarehouseFind();


~WarehouseFind();


private:


enum screenViewType { OVERVIEW
_VIEW, WAREHOUSE_VIEW, TOOL_CAN_1_VIEW,
TOOL_CAN_2_VIEW, TOOL_CAN_3_VIEW } screenView;


enum itemViewType { FLOORPLAN_ITEM_VIEW, PICTURE_ITEM_VIEW } itemView;


itemViewType itemViewLast;


GIDocumentViewer *documentViewer;


GIDocumentMenu* documentMenu;



void AddButtons();


void RemoveButtons();


wchar_t button1Text[MAX_BUTTON_STRING_LENGTH],
button2Text[MAX_BUTTON_STRING_LENGTH], button3Text[MAX_BUTTON_STRING_LENGTH];


wchar_t button4Text[MAX_BUTTON_STRING_LENGTH],
button5Text[MAX_BUTTON_STRING_LENGTH], b
utton6Text[MAX_BUTTON_STRING_LENGTH];


wchar_t imageFileName[100];


GIMenuButton *button1, *button2, *button3, *button4, *button5, *button6;


int numUsedButtons;


public:


virtual GIContainer* GetMenuContainer();


virtual void Paint(GIDC *gidc);


virtual v
oid TakeControl();


virtual void ReleaseControl();


virtual void ButtonPressedEvent(GIComponent *component, wchar_t *componentName,
wchar_t *speechCommand);


virtual void SelectDocument(/*wchar_t *fileName*/);


};


GIApplication *myApplication;


extern "C"

{



__declspec(dllexport) int PLUGIN_MANAGER_init(){



myApplication = new WarehouseFind();



return 1;


}



__declspec(dllexport) void* PLUGIN_MANAGER_getPlugin(int index){



if (index==0) return myApplication;



return NULL;


}

}

















Appendix I
I: MC9090

Code

Welcome Screen


using

System;

using

System.Linq;

using

System.Collections.Generic;

using

System.ComponentModel;

using

System.Data;

using

System.Drawing;

using

System.Text;

using

System.Windows.Forms;


namespace

SmartDeviceProject1

{


public

partial

class

Welcome

:
Form


{


public

Welcome()


{


InitializeComponent();


}



private

void

MainMenu_KeyDown(
object

sender,
KeyEventArgs

e)


{


if

((e.KeyCode == System.Windows.Forms.
Keys
.Up))


{


// Up


}


if

((e.KeyCode == System.Windows.Forms.
Keys
.Down))


{


// Down


}


if

((e.KeyCode == System.Windows.Forms.
Keys
.Left))


{


// Left


}


if

((e.KeyCode == System.Windows.Forms.
Keys
.Right))


{


// Right


}


if

((e.KeyCode == System.Windows.Forms.
Keys
.Enter))


{


// Enter


}



}



private

void

buttonStart_Click(
object

sender,
EventArgs

e)


{


new

Menu
().Show();


this
.Hide();


}



private

void

button1_Click(
object

sender,
EventArgs

e)


{


this
.Close();


}





}

}

Main Menu Code

using

System;

using

System.Linq;

using

System.Collections.Generic;

using

System.ComponentModel;

using

System.Data;

using

System.Drawing;

using

System.Text;

using

System.Windows.Forms;



namespace

SmartDeviceProject1

{


public

partial

class

Menu

:
Form


{


public

Menu()


{


InitializeComponent();


}



private

void

buttonStart_Click(
object

sender,
EventArgs

e)


{




}





private

void

buttonShoring_Click(
object

sender,
EventArgs

e)


{


new

Shoring
().Show();


this
.Close();


}



private

v
oid

button1_Click(
object

sender,
EventArgs

e)


{


Application
.Exit();


}



private

void

buttonLifting_Click(
object

sender,
EventArgs

e)


{


new

LiftingandMoving
().Show();


this
.Close();


}



private

void

buttonBreaching_Click(
object

sender,
EventArgs

e)


{


new

BreachingandBreaking
().Show();


this
.Close();


}



private

void

button2_Click(
object

sender,
EventArgs

e)


{


new

Misc
().Show();


this
.Close();


}


}

}

Shoring Code

using

System;

using

System.Linq;

using

System.Collections.Generic;

using

System.ComponentModel;

using

System.Data;

using

System.Drawing;

using

System.Text;

using

System.Windows.Forms;



namespace

SmartDeviceProject1

{


public

partial

class

Menu

:
Form


{


public

Menu()


{


InitializeComponent();


}



private

void

buttonStart_Click(
object

sender,
EventArgs

e)


{




}





private

void

buttonShoring_Click(
object

sender,
EventArgs

e)


{


new

Shoring
().Show();


this
.Close();


}



private

void

button1_Click(
object

sender,
EventArgs

e)


{


Application
.E
xit();


}



private

void

buttonLifting_Click(
object

sender,
EventArgs

e)


{


new

LiftingandMoving
().Show();


this
.Close();


}



private

void

buttonBreaching_Click(
object

sender,
EventArgs

e)


{


new

BreachingandBreaking
().Show();


this
.Close();


}



private

void

button2_Click(
object

sender,
EventArgs

e)


{


new

Misc
().Show();


this
.Close();


}


}

}

Circular Saws
Code

using

System;

using

System.Linq;

using

System.Collections.Generic;

using

System.ComponentModel;

using

System.Data;

using

System.Drawing;

using

System.Text;

using

System.Windows.Forms;


namespace

SmartDeviceProject1

{


public

partial

class

CircularSaws

:
Form


{


public

CircularSaws()


{


InitializeComponent();


}



private

void

buttonBack_Click(
object

sender,
EventArgs

e)


{


new

Shoring
().Show();


this
.Hide();


}



private

void

buttonMenu_Click(
object

sender,
EventArgs

e)


{


new

Menu
().Show();


this
.Hide();


}



private

void

comboBox1_SelectedIndexChanged(
object

sender,
EventArgs

e)


{


MessageBo
x
.Show(
"Location: Lifting and Moving"

+


"
\
nBox: L
-
9"

+


"
\
nCan: Tool Can 1"
);




//if (comboBox1.Text == "Circular Saw 1")


// {


// MessageBox.Show("Location:
CAN1");


// MessageBox.Show("Label: CS1");


// MessageBox.Show("RFID: E2003411B802011659051648");


// MessageBox.Show("ItemDescription: Circular Saw");


Variables
.str2 =
"E2003411B802011659051648"
;


// }


}



private

void

button1_Click(
object

sender,
EventArgs

e)


{


MessageBox
.Show(
Variables
.str2);


new

CS_RFIDSample2.
ReaderForm
().Show();


this
.Hide();


}


}

}

Tool Belts

using

System;

using

System.Linq;

using

System.Collections.Generic;

using

System.ComponentModel;

using

System.Data;

using

System.Drawing;

using

System.Text;

using

System.Windows.Forms;


namespace

SmartDeviceProject1

{


public

partial

class

ToolBelts

:
Form



{


public

ToolBelts()


{


InitializeComponent();


}



private

void

buttonBack_Click(
object

sender,
EventArgs

e)


{


new

Shoring
().Show();


this
.Hide();


}



private

void

buttonMenu_Click(
object

sender,
EventArgs

e)


{


new

Menu
().Show();


this
.Hide();


}



private

void

comboBox1_SelectedIndexChanged(
object

sender,
EventArgs

e)


{


MessageBox
.Show(
"Location:
Shoring"

+


"
\
nBox: S
-
4"

+


"
\
nCan: Tool Can 3"
);




//if (comboBox1.Text == "Tool Belt 1")


//{


// MessageBox.Show("Location: CAN1");


// MessageBox.
Show("Label: TB1");


// MessageBox.Show("RFID: E2003411B802011659051647");


// MessageBox.Show("ItemDescription: Tool Belt");


Variables
.str2 =
"E2003411B802011659051647"
;


//}


}



private

void

button1_Click(
object

sender,
EventArgs

e)


{


MessageBox
.Show(
Variables
.str2);


new

CS_RFIDSample2.
ReaderForm
().Show();


this
.Hide();


}


}

}

Senco Nailers Code

using

System;

using

System.Linq;

using

System.Collections.Generic;

using

System.ComponentModel;

using

System.Data;

using

System.Drawing;

using

System.Text;

using

System.Windows.Forms;


namespace

SmartDeviceProject1

{


public

partial

class

SencoNailers

:
Form


{


public

SencoNailers()


{


InitializeComponent();


}



private

void

buttonBack_Click(
object

sender,
EventArgs

e)


{


new

Shoring
().Show();


this
.Hide();


}



private

void

buttonMenu_Click(
object

sender,
EventArgs

e)


{


new

Menu
().Show();


this
.Hide();


}



private

void

comboBox1_SelectedIndexChanged(
object

sender,
EventArgs

e)


{


MessageBox
.Show(
"Location: Shoring"

+


"
\
nBox: S
-
7"

+


"
\
nCan: Tool Can 3"
);


//if (comboBox1.Text == "Senco Nailer 1")


//{


// MessageBox.Show("Location: CAN1");


// MessageBox.Show("Label: SN1");


// MessageBox.Show("RFID: E2003411B802011659051653");


// MessageBox.Show("ItemDescription: Senco Nailer");


Variables
.str2 =
"E2003411B802011659051653"
;


//}


}



private

void

button1_Click(
object

sender,
EventArgs

e)


{


MessageBox
.Show(
Variables
.str2);


new

CS_RFIDSample2.
ReaderForm
().Show();


this
.Hide();


}


}

}

Palm Nailers Code

using

System;

using

System.Linq;

using

System.Collections.Generic;

using

System.ComponentModel;

using

System.Data;

using

System.Drawing;

using

System.Text;

using

System.Windows.Forms;


namespace

SmartDeviceProject1

{


public

partial

class

PalmNailers

:
Form


{


public

PalmNailers()


{


InitializeComponent();


}



private

void

buttonBack_Click(
object

sender,
EventArgs

e)


{


new

Shoring
().Show();


this
.Hide();


}



private

void

buttonMenu_Click(
object

sender,
EventArgs

e)


{


new

Menu
().Show();


this
.Hide();


}



private

void

comboBox1_SelectedIndexChanged(
object

sender,
EventArgs

e)


{


MessageBox
.Show(
"Location: Shoring"

+


"
\
nBox: S
-
5"

+


"