void OnSceneDeactivated(Tizen.Ui.Scenes.SceneId currentSceneId, Tizen.Ui.Scenes.SceneId nextSceneId) { // TODO: // Add your scene deactivate code here Utilities.AppLog("OnSceneDeactivated"); }
// Called when the UiApp is terminating. public override bool OnAppTerminating(Tizen.App.AppRegistry appRegistry, bool forcedTermination = false) { // TODO: // Deallocate resources allocated by this App for termination. // The App's permanent data and context can be saved via appRegistry. return true; }
void OnSceneActivatedN(Tizen.Ui.Scenes.SceneId previousSceneId, Tizen.Ui.Scenes.SceneId currentSceneId, Tizen.Base.Collection.IList args) { // TODO: // Add your scene activate code here Utilities.AppLog("OnSceneActivatedN"); }
internal Geoposition(Tizen.Location.Location location) { Coordinate = new Geolocation.Geocoordinate(); Coordinate.Point = new Geolocation.Geopoint(new Geolocation.BasicGeoposition() { Latitude = location.Latitude, Longitude = location.Longitude, Altitude = location.Altitude }); Coordinate.Accuracy = location.HorizontalAccuracy; Coordinate.Timestamp = new DateTimeOffset(location.Timestamp); Coordinate.Heading = location.Direction; Coordinate.Speed = location.Speed; }
/*override*/ public Tizen.UI.Controls.Panel CreatePanelN(Tizen.Base.String panelId, Tizen.Ui.Scenes.SceneId sceneId) { SceneManager sceneManager = SceneManager.GetInstance(); Utilities.AppAssert(sceneManager != null); Tizen.UI.Controls.Panel newPanel = null; // TODO: // Add your panel creation code here return newPanel; }
public static PedometerStepKind FromState(Tizen.Sensor.PedometerState s) { switch(s) { case Tizen.Sensor.PedometerState.Run: return PedometerStepKind.Running; case Tizen.Sensor.PedometerState.Walk: return PedometerStepKind.Walking; default: return PedometerStepKind.Unknown; } }
// Called when the UiApp is initializing. public override bool OnAppInitializing(Tizen.App.AppRegistry appRegistry) { // TODO: // Initialize Frame and App specific data. // The App's permanent data and context can be obtained from the appRegistry. // // If this method is successful, return true; otherwise, return false. // If this method returns false, the App will be terminated. // Uncomment the following statement to listen to the screen on/off events. //PowerManager.SetScreenEventListener(this); // TODO: // Add your initialization code here return true; }
public Tizen.Ui.Controls.Form CreateFormN(Tizen.Base.String formId, Tizen.Ui.Scenes.SceneId sceneId) { SceneManager sceneManager = SceneManager.GetInstance(); Utilities.AppAssert(sceneManager != null); Tizen.Ui.Controls.Form newForm = null; if (formId.Equals(Constants.IDF_FORM)) { HelloTizenMainForm form = new HelloTizenMainForm(); form.Initialize(); sceneManager.AddSceneEventListener(sceneId, form); newForm = form; } // TODO: // Add your form creation code here return newForm; }
void OnActionPerformed(Tizen.Ui.Control source, int actionId) { //SceneManager sceneManager = SceneManager::GetInstance(); //Utilities.AppAssert(pSceneManager); switch(actionId) { case ID_BUTTON_OK: Utilities.AppLog("OK Button is clicked!"); clicks++; var sb = new StringBuilder("Hello, Tizen"); for (var i = 0; i < clicks; i++) sb.Append ("!"); SetHeaderTitleText(sb.ToString()); break; default: break; } }
private static void Main(string[] args) { Log.Logger = new LoggerConfiguration() .ReadFrom.AppSettings() .CreateLogger(); var options = new CommandLineOptions(); // allow app to be debugged in visual studio. if (Debugger.IsAttached) { // args = "--help ".Split(' '); args = "--platform=essentials".Split(' '); // args = new[] // { // "--platform=none", // @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Xamarin.iOS.dll" // }; } // Parse in 'strict mode'; i.e. success or quit if (Parser.Default.ParseArgumentsStrict(args, options)) { try { if (!string.IsNullOrWhiteSpace(options.Template)) { _mustacheTemplate = options.Template; Log.Debug("Using {template} instead of the default template.", _mustacheTemplate); } if (!string.IsNullOrWhiteSpace(options.ReferenceAssemblies)) { _referenceAssembliesLocation = options.ReferenceAssemblies; Log.Debug($"Using {_referenceAssembliesLocation} instead of the default reference assemblies location."); } IPlatform platform = null; switch (options.Platform) { case AutoPlatform.None: if (!options.Assemblies.Any()) { throw new Exception("Assemblies to be used for manual generation were not specified."); } platform = new Bespoke(); platform.Assemblies = options.Assemblies; if (PlatformHelper.IsRunningOnMono()) { platform.CecilSearchDirectories = platform.Assemblies.Select(Path.GetDirectoryName).Distinct().ToList(); } else { platform.CecilSearchDirectories.Add(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5"); } break; case AutoPlatform.Android: platform = new Android(_referenceAssembliesLocation); break; case AutoPlatform.iOS: platform = new iOS(_referenceAssembliesLocation); break; case AutoPlatform.Mac: platform = new Mac(_referenceAssembliesLocation); break; case AutoPlatform.TVOS: platform = new TVOS(_referenceAssembliesLocation); break; case AutoPlatform.WPF: platform = new WPF(); break; case AutoPlatform.XamForms: platform = new XamForms(); break; case AutoPlatform.Tizen: platform = new Tizen(); break; case AutoPlatform.UWP: platform = new UWP(); break; case AutoPlatform.Winforms: platform = new Winforms(); break; case AutoPlatform.Essentials: platform = new Essentials(); _mustacheTemplate = "XamarinEssentialsTemplate.mustache"; break; default: throw new ArgumentOutOfRangeException(); } ExtractEventsFromAssemblies(platform); Environment.Exit((int)ExitCode.Success); } catch (Exception ex) { Log.Fatal(ex.ToString()); if (Debugger.IsAttached) { Debugger.Break(); } } } Environment.Exit((int)ExitCode.Error); }
public static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() .ReadFrom.AppSettings() .CreateLogger(); // allow app to be debugged in visual studio. if (Debugger.IsAttached) { args = "--platform=essentials --output-path=test.txt".Split(' '); } await new Parser(parserSettings => parserSettings.CaseInsensitiveEnumValues = true).ParseArguments <CommandLineOptions>(args).MapResult( async options => { try { if (!string.IsNullOrWhiteSpace(options.Template)) { _mustacheTemplate = options.Template; Log.Debug("Using {template} instead of the default template.", _mustacheTemplate); } if (!string.IsNullOrWhiteSpace(options.ReferenceAssemblies)) { _referenceAssembliesLocation = options.ReferenceAssemblies; Log.Debug($"Using {_referenceAssembliesLocation} instead of the default reference assemblies location."); } IPlatform platform = null; switch (options.Platform) { case AutoPlatform.None: if (options.Assemblies.Any() == false) { throw new Exception("Assemblies to be used for manual generation were not specified."); } platform = new Bespoke(); platform.Assemblies.AddRange(options.Assemblies); if (PlatformHelper.IsRunningOnMono()) { platform.CecilSearchDirectories.AddRange(platform.Assemblies.Select(Path.GetDirectoryName).Distinct().ToList()); } else { platform.CecilSearchDirectories.Add(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5"); } break; case AutoPlatform.Android: platform = new Android(_referenceAssembliesLocation); break; case AutoPlatform.iOS: platform = new iOS(_referenceAssembliesLocation); break; case AutoPlatform.Mac: platform = new Mac(_referenceAssembliesLocation); break; case AutoPlatform.TVOS: platform = new TVOS(_referenceAssembliesLocation); break; case AutoPlatform.WPF: platform = new WPF(); break; case AutoPlatform.XamForms: platform = new XamForms(); break; case AutoPlatform.Tizen4: platform = new Tizen(); break; case AutoPlatform.UWP: platform = new UWP(); break; case AutoPlatform.Winforms: platform = new Winforms(); break; case AutoPlatform.Essentials: platform = new Essentials(); _mustacheTemplate = "XamarinEssentialsTemplate.mustache"; break; default: throw new ArgumentException($"Platform not {options.Platform} supported"); } await ExtractEventsFromAssemblies(options.OutputPath, platform).ConfigureAwait(false); Environment.Exit((int)ExitCode.Success); } catch (Exception ex) { Log.Fatal(ex.ToString()); if (Debugger.IsAttached) { Debugger.Break(); } } Environment.Exit((int)ExitCode.Error); }, _ => Task.CompletedTask).ConfigureAwait(false); }
private static StorageFolder GetStorageFolderForDirectoryType(Tizen.System.DirectoryType type) { foreach (Tizen.System.Storage s in Tizen.System.StorageManager.Storages) { if (s.State == Tizen.System.StorageState.Mounted) { return new StorageFolder(s.GetAbsolutePath(type)); } } return null; }
/*result*/ public void AddFrame(Tizen.Ui.Controls.Frame frame) { }
void OnFormBackRequested(Tizen.Ui.Controls.Form source) { //Tizen.App.UiApp app = UiApp::GetInstance(); //Utilities.AppAssert(app != null); //app.Terminate(); }
private ConnectionProfile(Tizen.Network.Connection.ConnectionItem item) { _item = item; }
public virtual bool OnAppTerminating(Tizen.App.AppRegistry appRegistry, bool forcedTermination = false) { return true; }
public virtual void OnBatteryLevelChanged(Tizen.System.BatteryLevel batteryLevel) { }
// Called when the battery level changes. public override void OnBatteryLevelChanged(Tizen.System.BatteryLevel batteryLevel) { // TODO: // Handle any changes in battery level here. // Stop using multimedia features(camera, mp3 etc.) if the battery level is CRITICAL. }