Example #1
0
        public static string getAlertTypeNameFromID(int alertTypeID)
        {
            alertTypeID++; //Add one to match server
            ControlVars   c          = new ControlVars();
            List <string> alertTypes = c.getAlertTypeDescriptions();

            return(alertTypes[alertTypeID]);
        }
Example #2
0
        public static int getAlertTypeIDFromName(string alertTypeName)
        {
            ControlVars   c          = new ControlVars();
            List <string> alertTypes = c.getAlertTypeDescriptions();
            int           index      = 1;

            foreach (string s in alertTypes)
            {
                if (s.Equals(alertTypeName))
                {
                    return(index);
                }
                else
                {
                    index++;
                }
            }
            //If not found
            return(-1);
        }
Example #3
0
        public App()
        {
            InitializeComponent();

            //Initialise control vars
            ControlVars c = new ControlVars();

            c.setAlert(new Alert("NONE", "NONE", "NONE", DateTime.Now, false));

            //Initialise server connection
            serverConnection conn = new serverConnection();

            /*
             * Task<string> task = serverConnection.testRequest();
             * task.Wait();
             * string x = task.Result;
             * Console.WriteLine(x);
             */

            //MainPage = new MainPage();
            MainPage = new NavigationPage(new MainPage());
        }