private static void ExceptionScreen(Exception exception) { _executionContext.CurrentScreen = ScreenFactory.CreateScreen(_render, ScreenTypeEnum.Main, new CommandModel(null, exception.ToString())); _executionContext.Command = null; _render.Clear(); }
private static void PerformCommand() { if (CommandIsNotAllowed()) { return; } CommandExecutionResult result = null; try { result = CommandHandlerFactory .Create(_executionContext.Command.CommandType) .Execute(_executionContext.Command.Parameters, _executionContext.CurrentScreen.Model); } catch (Exception exception) { ExceptionScreen(exception); return; } _executionContext.CurrentScreen = result.NextScreenType.HasValue ? ScreenFactory.CreateScreen(_render, result.NextScreenType.Value, result.Model) : null; _executionContext.Command = null; _render.Clear(); }
public override Screen Tap(string elementName, bool precise = false) { var screen = base.Tap(elementName, precise); if (elementName == "Alert Dialogs") { return(ScreenFactory.CreateScreen <AlertDialogsScreen>()); } if (elementName == "Activity") { return(ScreenFactory.CreateScreen <ActivityScreen>()); } if (elementName == "Fragment") { return(ScreenFactory.CreateScreen <FragmentScreen>()); } if (elementName == "Notification") { return(ScreenFactory.CreateScreen <NotificationScreen>()); } return(screen); }
static void Main(string[] args) { Screen screenDepartures = ScreenFactory.CreateScreen("Departure"); Screen screenArrivals = ScreenFactory.CreateScreen("Arrival"); //Whatever you are doing with the screens here.. Console.ReadLine(); }
static void Main(string[] args) { ScreenFactory screenFactor = new ScreenFactory(); screenFactor.CreateScreen(IScreenFactory.ScreenModel.Web).Draw(); LoggerFactory loggerFactory = new LoggerFactory(); loggerFactory.CreateLogger(ILoggerFactory.logger.DbLogger).Log(); }
public override Screen Tap(string elementName, bool precise = false) { var screen = base.Tap(elementName, precise); if (elementName == "Incoming Message") { return(ScreenFactory.CreateScreen <IncomingMessageScreen>()); } return(screen); }
static ApiDemoScreen() { var assembly = Assembly.GetExecutingAssembly(); ModalDialogDetector = new AndroidModalDialogDetector(assembly, typeof(ApiDemoModalDialog)); var unknownScreen = ScreenFactory.CreateScreen <NullApiDemoScreen>(); ScreenDetector = new AndroidScreenDetector(assembly, typeof(ApiDemoScreen), unknownScreen); }
public override Screen Tap(string elementName, bool precise = false) { var screen = base.Tap(elementName, precise); if (elementName == "Context Menu") { return(ScreenFactory.CreateScreen <ContextMenuScreen>()); } return(screen); }
public override Joyride.Platforms.Screen Tap(string elementName, bool precise = false) { var screen = base.Tap(elementName, precise); switch (elementName) { case "Long": return(ScreenFactory.CreateScreen <LongScreen>()); default: return(screen); } }
public new Mobile CreateMobile(string maker, int memory, int size, int resolution, int volume, string material) { var screen = ScreenFactory.CreateScreen(size, resolution); var battery = BatteryFactory.CreateBattery(volume, material); return(new Mobile { Maker = maker, Memory = memory, Screen = screen, Battery = battery }); }
public override Screen Tap(string elementName, bool precise = false) { var screen = base.Tap(elementName, precise); switch (elementName) { case "Default Layout Animations": return(ScreenFactory.CreateScreen <DefaultLayoutAnimationsScreen>()); default: return(screen); } }
public override Screen Tap(string elementName, bool precise = false) { var screen = base.Tap(elementName, precise); switch (elementName) { case "Scroll View": return(ScreenFactory.CreateScreen <ScrollViewScreen>()); default: return(screen); } }
public static void Main(string[] args) { var chinaScreenFactory = new ScreenFactory(); var i14 = chinaScreenFactory.CreateScreen(14, 720); var taiwanScreenfactory = new ScreenFactory(); var i15 = taiwanScreenfactory.CreateScreen(15, 1024); var japanBatteryFactory = new BatteryFactory(); var liIon = japanBatteryFactory.CreateBattery(400, "li-ion"); var koreaBatteryFactory = new BatteryFactory(); var nicd = koreaBatteryFactory.CreateBattery(500, "NiCd"); var Apple = new MobileFactory(); var iPhone = GetIPhone(Apple); var Sumsung = new MobileFactory(); var Galaxy = Sumsung.CreateMobile("Sumsung", 128, 5, 720, 500, "NiCd"); }
public override Screen Tap(string elementName, bool precise = false) { var screen = base.Tap(elementName, precise); switch (elementName) { case "App": return(ScreenFactory.CreateScreen <AppScreen>()); case "Animation": return(ScreenFactory.CreateScreen <AnimationScreen>()); case "Views": return(ScreenFactory.CreateScreen <ViewsScreen>()); default: return(screen); } }
public override Screen Tap(string elementName, bool precise = false) { var screen = base.Tap(elementName, precise); switch (elementName) { case "Layouts": return(ScreenFactory.CreateScreen <LayoutsScreen>()); case "Webview": return(ScreenFactory.CreateScreen <WebviewScreen>()); case "Drag And Drop": return(ScreenFactory.CreateScreen <DragAndDropScreen>()); default: return(screen); } }
public override Screen Tap(string elementName, bool precise = false) { var screen = base.Tap(elementName, precise); if (elementName == "Custom Title") { return(ScreenFactory.CreateScreen <CustomTitleScreen>()); } if (elementName == "Presentation") { return(ScreenFactory.CreateScreen <PresentationScreen>()); } if (elementName == "Quick Contacts Demo") { return(ScreenFactory.CreateScreen <QuickContactsDemoScreen>()); } return(screen); }
public override Screen GoBack() { Driver.Navigate().Back(); return(ScreenFactory.CreateScreen <AppScreen>()); }
private static void MainScreen() { _executionContext.CurrentScreen = ScreenFactory.CreateScreen(_render, ScreenTypeEnum.Main, new CommandModel(Text.MainScreen.DefaultBody)); }
public override void Launch() { base.Launch(); CurrentScreen = ScreenFactory.CreateScreen <MainScreen>(); }
public override void Close() { base.Close(); CurrentScreen = ScreenFactory.CreateScreen <NullApiDemoScreen>(); }
/// <summary> /// LoadedScreenName プロパティが示す Screen をロードします。 /// このメソッドは非同期に呼び出されます。 /// </summary> /// <returns>ロードされた Screen。</returns> protected virtual Screen LoadScreen() { return(ScreenFactory.CreateScreen(LoadedScreenName)); }