Exemplo n.º 1
0
 static Screens()
 {
     All.Add("1", UssdScreen.Menu("Main menu", ScreenResponses.Menus.MainMenu));
     All.Add("1.1", UssdScreen.Notice("Account info", ScreenResponses.Notices.AccountInfo));
     All.Add("1.2", UssdScreen.Menu("Corner Shop menu", ScreenResponses.Menus.CornerShopMenu));
     All.Add("1.2.1", UssdScreen.Input("Airtime topup"
                                       , new List <UssdInput>()
     {
         new UssdInput("Network", new List <UssdInputOption>()
         {
             new UssdInputOption("Airtel"),
             new UssdInputOption("MTN"),
             new UssdInputOption("Glo"),
             new UssdInputOption("Tigo"),
             new UssdInputOption("Vodafone")
         }),
         new UssdInput("Mobile", "Mobile Number"),
         new UssdInput("Amount"),
         new UssdInput("Pin", "MPower Pin")
     }, InputProcessors.AirtimeTopup));
     All.Add("1.2.2", UssdScreen.Input("Check ECG bill"
                                       , new List <UssdInput>()
     {
         new UssdInput("AccountNumber", "Account Number")
     }, InputProcessors.CheckEcg));
 }
Exemplo n.º 2
0
 public UssdNavigator(string pointerStream)
 {
     if (pointerStream.Contains("ussd:action"))
     {
         NavType = UssdNavigatorTypes.ToAction;
         Id      = pointerStream.Replace("ussd:action:", string.Empty);
     }
     else
     {
         NavType    = UssdNavigatorTypes.ToScreen;
         Id         = pointerStream.Replace("ussd:nav:", string.Empty);
         UssdScreen = new UssdScreen
         {
             Id = Id
         };
     }
 }
Exemplo n.º 3
0
        static Screens()
        {
            All.Add("1", UssdScreen.Menu("Main menu", ScreenResponses.Menus.MainMenu));

            All.Add("1.1", UssdScreen.Notice("Simple Greeting", ScreenResponses.Notices.SimpleGreeting));

            All.Add("1.2", UssdScreen.Input("Your details."
                                            , new List <UssdInput>()
            {
                new UssdInput("FirstName", "First Name"),
                new UssdInput("LastName", "Last Name", true),
                new UssdInput("Company", new List <UssdInputOption>()
                {
                    new UssdInputOption("SMSGH"),
                    new UssdInputOption("MPower"),
                    new UssdInputOption("JumpFon"),
                })
            }, InputProcessors.CustomGreeting));

            All.Add("1.3", UssdScreen.Menu("Another menu", ScreenResponses.Menus.AnotherMenu));
        }
        static Screens()
        {
            All.Add("1", UssdScreen.Menu("Main menu", ScreenResponses.Menus.MainMenu));

            All.Add("1.1", UssdScreen.Notice("General greeting", ScreenResponses.Notices.GeneralGreeting));

            All.Add("1.2", UssdScreen.Input("Custom greeting"
                                            , new List <UssdInput>()
            {
                new UssdInput("Title", new List <UssdInputOption>()
                {
                    new UssdInputOption("Mr"),
                    new UssdInputOption("Mrs"),
                    new UssdInputOption("Miss"),
                    new UssdInputOption("Dr"),
                    new UssdInputOption("Prof"),
                }),
                new UssdInput("FirstName", "First Name"),
                new UssdInput("LastName", "Last Name"),
            }, InputProcessors.CustomGreeting));
        }
Exemplo n.º 5
0
 public UssdNavigator(string pointerStream)
 {
     if (pointerStream.StartsWith("ussd:action"))
     {
         NavType = UssdNavigatorTypes.ToAction;
         Id = pointerStream.Replace("ussd:action:", string.Empty);
     }
     if (pointerStream.StartsWith("ussd:script"))
     {
         NavType = UssdNavigatorTypes.ToScript;
         Id = pointerStream.Replace("ussd:script:", string.Empty);
     }
     else
     {
         NavType = UssdNavigatorTypes.ToScreen;
         Id = pointerStream.Replace("ussd:nav:", string.Empty);
         UssdScreen = new UssdScreen
         {
             Id = Id
         };
     }
    
 }