コード例 #1
0
        public static void ProcessTrackButtonClick(
            StorageInterface storage, EventsConnectionManager eventConnectionManager, GpsLocationManager locationManager, PathView pathView)
        {
            eventConnectionManager.ConnectForTracking();

            locationManager.Start();
        }
コード例 #2
0
        public async Task PickDeployFolder()
        {
            string folderPath = await StorageInterface.PickDeployFolder();

            if (folderPath != String.Empty)
            {
                DeployFolderPath = folderPath;
            }
        }
コード例 #3
0
 public ClienteModule() : base("/cliente")
 {
     myStorage = ListClienteStorage.getInstance();
     Get("/all", parameters => getAllClientes());
     Post("/insert", parameters => insertCliente());
     Put("/{id:int}", parameters => editCliente(parameters.id));
     Delete("/{id:int}", parameters => deleteCliente(parameters.id));
     Get("/{id:int}", parameters => getClienteById(parameters.id));
 }
コード例 #4
0
        public async Task LoadDeployFolder()
        {
            StorageFolder folder = await StorageInterface.GetDeployFolder();

            if (folder != null)
            {
                DeployFolderPath = folder.Path;
            }
            else
            {
                DeployFolderPath = Res.GetString("ST_CurrentFolderPath");
            }
        }
コード例 #5
0
ファイル: StoryController.cs プロジェクト: hendryl/nada_nusa
 void Awake()
 {
     _bg            = background.GetComponent <Image>();
     _text          = textBox.gameObject.GetComponentInChildren <Text>();
     _textBoxRect   = textBox.GetComponent <RectTransform>();
     _prevButton    = prevButton.GetComponent <Button>();
     _nextButton    = nextButton.GetComponent <Button>();
     _menuButton    = menuButton.GetComponent <Button>();
     _textBoxButton = textBoxButton.GetComponent <Button>();
     _songCanvas    = songCanvas.GetComponent <Canvas>();
     _overlayCanvas = overlayCanvas.GetComponent <Canvas>();
     _playButton    = playButton.GetComponent <Button>();
     storage        = storageScript.GetComponent <StorageInterface>();
 }
コード例 #6
0
        private static PathInformation GetPathData(StorageInterface storage)
        {
            var locations  = storage.GetAllGpsLocations();
            var pathPoints = GpsUtils.GetPathPointsFromLocations(locations, 3000 /*ms*/);

            var initialCount = PointUtils.GetPointsCount(pathPoints);

            PointUtils.RemoveShortPaths(pathPoints, 1000 /*m*/);

            var afterFirstRemovalOfShortPaths = PointUtils.GetPointsCount(pathPoints);

            PointUtils.EnrichWithIntemediatePoints(pathPoints, 2 /*m*/);

            var enrichedCount = PointUtils.GetPointsCount(pathPoints);

            return(pathPoints);
        }
コード例 #7
0
        public static void ProcessDrawButtonClick(StorageInterface storage, PathView pathView)
        {
            var pathPoints = GetPathData(storage);

            var xyMinMax = PointUtils.GetXYMinMax(pathPoints);

            pathView.XMin = xyMinMax.Item1;
            pathView.YMin = xyMinMax.Item2;
            pathView.XMax = xyMinMax.Item3;
            pathView.YMax = xyMinMax.Item4;

            var gpsCoordinates = PointUtils.PathDataToGpsCoordinates(pathPoints);

            pathView.SetPoints(gpsCoordinates);

            pathView.Invalidate();
        }
コード例 #8
0
 public static void FinalizeApplication()
 {
     mGlobalStringMap = null;
     mNativeClassNames?.Clear();
     mNativeClassNames = null;
     mConsoleOutput    = null;
     mMessageMapper    = null;
     mStorage          = null;
     mArrayClass       = null;
     mDictionaryClass  = null;
     mVAPool           = null;
     NULL_ARG          = null;
     ArrayObject.FinalizeApplication();
     TjsByteCodeLoader.FinalizeApplication();
     CustomObject.FinalizeApplication();
     DictionaryObject.FinalizeApplication();
     MathClass.FinalizeApplication();
     Variant.FinalizeApplication();
     LexicalAnalyzer.FinalizeApplication();
 }
コード例 #9
0
 public Service(StorageInterface storedResults, List <SearchEngineInterface> searchEngines)
 {
     this.searchEngines = searchEngines;
     this.storedResults = storedResults;
 }
コード例 #10
0
 public void OnStorageAWSClick(View v)
 {
     m_storage?.Close();
     m_storage = new StorageAWS();
 }
コード例 #11
0
 public void OnStorageDBClick(View v)
 {
     m_storage?.Close();
     m_storage = new StorageLocalDB();
 }
コード例 #12
0
        /// <summary>
        /// Opens file picker and populates files list
        /// </summary>
        public async Task OpenDeployFiles()
        {
            // check if user has a worker folder
            if (StorageInterface.IsDeployFolderAvailable)
            {
                // get worker folder
                StorageFolder folder = await StorageInterface.GetDeployFolder();

                // get files from worker folder
                IReadOnlyList <StorageFile> files = await StorageInterface.GetDeployFiles();

                // handle each file
                if (files?.Count > 0)
                {
                    // new list
                    FilesList = new ObservableCollection <DeployFile>();

                    // get each file and add it to collection
                    foreach (StorageFile file in files)
                    {
                        // check for allowed extensions
                        if (Path.GetExtension(file.Path).ToLower() == ".sig")
                        {
                            // this type of file will be use latter, not now
                            continue;
                        }
                        else if (Path.GetExtension(file.Path).ToLower() != ".nmf" &&
                                 Path.GetExtension(file.Path).ToLower() != ".hex")
                        {
                            // file as different or no extension
                            // allowed files without extension are ER_FLASH, ER_RAM, ER_CONFIG, ER_DAT, ER_ResetVector
                            if (file.DisplayName != "ER_FLASH" && file.DisplayName != "ER_RAM" && file.DisplayName != "ER_CONFIG" &&
                                file.DisplayName != "ER_DAT" && file.DisplayName != "ER_ResetVector")
                            {
                                // file not allowed
                                continue;
                            }
                        }
                        // add new files
                        FilesList.Add(new DeployFile(file));
                    }
                    // any file
                    if (FilesList.Count == 0)
                    {
                        var dummy = await DialogSrv.ShowMessageAsync(Res.GetString("DP_NoValidFiles"));

                        return;
                    }
                    FilesListLoaded?.Invoke(this, EventArgs.Empty);
                }
                else
                {
                    var dummy = await DialogSrv.ShowMessageAsync(Res.GetString("DP_NoFiles"));
                }
            }
            else
            {
                // user haven't pick a folder yet, notify him
                List <Tuple <string, Action> > buttons = new List <Tuple <string, Action> >
                {
                    new Tuple <string, Action>(Res.GetString("DP_GoToSettings"), () => NavigationService.Navigate(Pages.SettingsPage, 0)),
                    new Tuple <string, Action>(Res.GetString("DP_Close"), null)
                };
                await DialogSrv.ShowMessageWithActionsAsync(Res.GetString("DP_NoWorkerFolder"), "", buttons, 0, 1);
            }
        }
コード例 #13
0
ファイル: TJS.cs プロジェクト: fantasydr/krkr-cs
 public static void FinalizeApplication()
 {
     mGlobalStringMap = null;
     if (mNativeClassNames != null)
     {
         mNativeClassNames.Clear();
     }
     mNativeClassNames = null;
     mConsoleOutput = null;
     mMessageMapper = null;
     mStorage = null;
     mArrayClass = null;
     mDictionayClass = null;
     mVAPool = null;
     NULL_ARG = null;
     ArrayObject.FinalizeApplication();
     ByteCodeLoader.FinalizeApplication();
     CustomObject.FinalizeApplication();
     DictionaryObject.FinalizeApplication();
     MathClass.FinalizeApplication();
     Variant.FinalizeApplication();
     LexicalAnalyzer.FinalizeApplication();
 }