public ApplicationController( IMainScreen mainScreen, ICanControlTargetConnection targetConnection, IHasModelLocation realTimeModelProperties, ICanMonitorRealTime realTimeMonitor, ISimulationState simulationState) { // Register needed models and views MainScreen = mainScreen; TargetConnection = targetConnection; RealTimeModelProperties = realTimeModelProperties; RealTimeMonitor = realTimeMonitor; SimulationState = simulationState; // Subscribe to events MainScreen.LoadModelToggleButtonClicked += new MouseEventHandler(HandleLoadModelToggleButtonClicked); MainScreen.RebootTargetPCButtonClicked += new MouseEventHandler(HandleRebootTargetPCButtonClicked); MainScreen.StartSimulationToggleButtonClicked += new MouseEventHandler(HandleStartSimulationToggleButtonClicked); MainScreen.StopTimeTextChanged += new EventHandler<StopTimeChangedEventArgs>(HandleStopTimeTextChanged); TargetConnection.TargetConnectionStateChanged += new EventHandler<TargetConnectionStateChangedEventArgs>(HandleTargetConnectionStateChanged); RealTimeMonitor.ApplicationPropertiesChanged += new EventHandler<ApplicationPropertiesChangedEventArgs>(HandleApplicationPropertiesChanged); RealTimeMonitor.PropertyUpdateTimerElapsed += new EventHandler(HandlePropertyUpdateTimerElapsed); SimulationState.MaximumTeTChanged += new EventHandler<MaximumTeTChangedEventArgs>(HandleMaximumTeTChanged); SimulationState.StopTimeChanged += new EventHandler<StopTimeChangedEventArgs>(HandleStopTimeChanged); }
private void Awake() { MainScreen = CompositionRoot.GetMainScreen(); MainScreen.Show(); player = CompositionRoot.GetPlayer(); player.Hello(); }
// e t c // создаем новый GameObject и вешаем на него компанент MainScreen public static IMainScreen GetMainScreen() { if (MainScreen == null) { MainScreen = MonoExtensions.MakeComponent <MainScreen>(); } return(MainScreen); }
public ShellViewModel(IMainScreen mainScreen, IMessageBus bus) { _navigationStack.Push(mainScreen); bus.Listen<NavigateMainModuleMessage>().SubscribeUI(msg => NavigateTo(msg.Module.MainViewModel)); NavigateBackCommand = new ReactiveCommand(); NavigateBackCommand.SubscribeUI(NavigateBack); }
static public void UpdateLocation(IMainScreen ms, CLLocation newLocation) { ms.LblAltitude.Text = newLocation.Altitude.ToString() + " meters"; ms.LblLongitude.Text = newLocation.Coordinate.Longitude.ToString() + "º"; ms.LblLatitude.Text = newLocation.Coordinate.Latitude.ToString() + "º"; ms.LblCourse.Text = newLocation.Course.ToString() + "º"; ms.LblSpeed.Text = newLocation.Speed.ToString() + " meters/s"; // get the distance from here to paris ms.LblDistanceToParis.Text = (newLocation.DistanceFrom(new CLLocation(48.857, 2.351)) / 1000).ToString() + " km"; }
public void BeforeEachTest() { _mainScreen = new AndroidMainScreen(); #if DEBUG app = ConfigureApp.Android.EnableLocalScreenshots() .StartApp(); #else app = ConfigureApp.Android .ApkFile("../../../com.jamoby.myfirsttestandroid-Signed.apk") .StartApp(); #endif }
public void HandleLocationChanged(object sender, LocationUpdatedEventArgs e) { // handle foreground updates CLLocation location = e.Location; IMainScreen ms = mainScreen; ms.LblAltitude.Text = location.Altitude + " meters"; ms.LblLongitude.Text = location.Coordinate.Longitude.ToString(); ms.LblLatitude.Text = location.Coordinate.Latitude.ToString(); ms.LblCourse.Text = location.Course.ToString(); ms.LblSpeed.Text = location.Speed.ToString(); Console.WriteLine("foreground updated"); }
// Loads either the iPad or iPhone view, based on the current device protected void LoadViewForDevice() { // load the appropriate view based on the device if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) { mainViewController_iPad = new MainViewController_iPad (); this.View.AddSubview (mainViewController_iPad.View); mainScreen = mainViewController_iPad; } else { mainViewController_iPhone = new MainViewController_iPhone (); var b = this.View.Bounds; this.View.AddSubview (mainViewController_iPhone.View); mainViewController_iPhone.View.Frame = b; // for 4 inch iPhone5 screen mainScreen = mainViewController_iPhone; } }
public CommunicationController( IMainScreen mainScreen, ICanControlTargetConnection targetConnection) { // Register needed models and views MainScreen = mainScreen; TargetConnection = targetConnection; // Subscribe to events MainScreen.ConnectToggleButtonClicked += new MouseEventHandler(HandleToggleButtonClicked); MainScreen.IPaddressTextChanged += new EventHandler(HandleIPaddressTextChanged); MainScreen.PortTextChanged += new EventHandler(HandlePortTextChanged); TargetConnection.TargetConnectionStateChanged += new EventHandler <TargetConnectionStateChangedEventArgs>(HandleTargetConnectionStateChanged); }
// Loads either the iPad or iPhone view, based on the current device protected void LoadViewForDevice() { // load the appropriate view based on the device if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) { mainViewController_iPad = new MainViewController_iPad(); this.View.AddSubview(mainViewController_iPad.View); mainScreen = mainViewController_iPad as IMainScreen; } else { mainViewController_iPhone = new MainViewController_iPhone(); this.View.AddSubview(mainViewController_iPhone.View); mainScreen = mainViewController_iPhone as IMainScreen; } }
public RealTimeModelController( IMainScreen mainScreen, ICanControlTargetConnection targetConnection, IHasModelLocation realTimeModelProperties, ISimulationState simulationState) { // Register needed models and views MainScreen = mainScreen; TargetConnection = targetConnection; RealTimeModelProperties = realTimeModelProperties; SimulationState = simulationState; // Subscribe to events MainScreen.BrowseForModelFileButtonClicked += new MouseEventHandler(HandleBrowseForModelFileButtonClicked); TargetConnection.TargetConnectionStateChanged += new EventHandler <TargetConnectionStateChangedEventArgs>(HandleTargetConnectionStateChanged); RealTimeModelProperties.RealTimeModelLocationChanged += new EventHandler(HandleRealTimeModelLocationChanged); }
public MainPresenter(SynchronizationContext syncContext, IMainScreen screen, IMainModel model) { this.syncContext = syncContext; this.model = model; this.model.StateAdded += OnStateAdded; this.model.TransitionAdded += OnTransitionAdded; this.screen = screen; this.screen.LoadAssembly += ScreenOnLoadAssembly; this.screen.LoadContracts += ScreenOnLoadContracts; this.screen.StartAnalysis += async(sender, analysisEventArgs) => await StartAnalisis(analysisEventArgs); this.screen.StopAnalysis += (sender, args) => this.model.Stop(); this.screen.ExportGraph += ScreenOnExportGraph; this.screen.GenerateAssembly += (sender, outputFileInfo) => GenerateAssembly(outputFileInfo, this.model.GeneratedEpa); }
// Loads either the iPad or iPhone view, based on the current device protected void LoadViewForDevice() { // load the appropriate view based on the device if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) { mainViewController_iPad = new MainViewController_iPad(); this.View.AddSubview(mainViewController_iPad.View); mainScreen = mainViewController_iPad; } else { mainViewController_iPhone = new MainViewController_iPhone(); var b = this.View.Bounds; this.View.AddSubview(mainViewController_iPhone.View); mainViewController_iPhone.View.Frame = b; // for 4 inch iPhone5 screen mainScreen = mainViewController_iPhone; } }
//======================================================================== //======================================================================== #region -= protected methods =- //======================================================================== /// <summary> /// Loads either the iPad or iPhone view, based on the current device /// </summary> protected void LoadViewForDevice() { //---- load the appropriate view based on the device switch (((AppDelegate)UIApplication.SharedApplication.Delegate).CurrentDevice) { case DeviceType.iPad: this._mainViewController_iPad = new MainViewController_iPad(); this.View.AddSubview(this._mainViewController_iPad.View); this._mainScreen = this._mainViewController_iPad as IMainScreen; break; case DeviceType.iPhone: this._mainViewController_iPhone = new MainViewController_iPhone(); this.View.AddSubview(this._mainViewController_iPhone.View); this._mainScreen = this._mainViewController_iPhone as IMainScreen; break; default: break; } }
public FileSystemController( IMainScreen mainScreen, ICanControlTargetConnection targetConnection, ICanControlTargetFileSystem targetFileSystem, ICanLogData dataLogManager, ISimulationState simulationState) { // Register needed models and views MainScreen = mainScreen; TargetConnection = targetConnection; TargetFileSystem = targetFileSystem; DataLogManager = dataLogManager; SimulationState = simulationState; // Subscribe to events MainScreen.LoadModelToggleButtonClicked += new MouseEventHandler(HandleLoadModelToggleButtonClicked); MainScreen.UseLogTimeCheckboxChanged += new EventHandler <UseLogTimeChangedEventArgs>(HandleUseLogTimeCheckboxChecked); MainScreen.UserEnteredLoggingTime += new EventHandler <LogTimeChangedEventArgs>(HandleUserEnteredLoggingTIme); MainScreen.StartLoggingToggleButtonClicked += new EventHandler(HandleStartLoggingToggleButtonClicked); TargetConnection.TargetConnectionStateChanged += new EventHandler <TargetConnectionStateChangedEventArgs>(HandleTargetConnectionStateChanged); }
public Application(IMainScreen startScreen, IPresenter presenter, IDataBus dataBus) { this.presenter = presenter; this.currentScreen = startScreen; this.dataBus = dataBus; }
private void OnDestroy() { MainScreen = null; Player = null; }
public LocationDelegate(IMainScreen mainScreen) : base() { ms = mainScreen; }
protected override void OnNavigatedTo(NavigationEventArgs e) { this.mainScreen = (IMainScreen)e.Parameter; }
public MainScreenController(IMainScreen screen, CommandLineArguments args) { _screen = screen; _args = args; }
static public void UpdateLocation (IMainScreen ms, CLLocation newLocation) { ms.LblAltitude.Text = newLocation.Altitude.ToString () + " meters"; ms.LblLongitude.Text = newLocation.Coordinate.Longitude.ToString () + "º"; ms.LblLatitude.Text = newLocation.Coordinate.Latitude.ToString () + "º"; ms.LblCourse.Text = newLocation.Course.ToString () + "º"; ms.LblSpeed.Text = newLocation.Speed.ToString () + " meters/s"; // get the distance from here to paris ms.LblDistanceToParis.Text = (newLocation.DistanceFrom(new CLLocation(48.857, 2.351)) / 1000).ToString() + " km"; }
public LocationDelegate (IMainScreen mainScreen) : base() { ms = mainScreen; }
public void GetPage(IMainScreen pageObject) { driver.Navigate().GoToUrl(pageObject.BaseUrl); Init(pageObject); }
public MainScreenController(IMainScreen screen, CommandLineArguments args) { _screen = screen; _args = args; }