Ejemplo n.º 1
0
        public void SelectPricesFile()
        {
            string newFile = Filebrowser.GetExcelFileName("Select Prices file");

            if (newFile.Length > 0)
            {
                try
                {
                    Globals.RawExcelPriceFile = ExcelReader.ExcelToDataSet(newFile);
                }
                catch (Exception ex)
                {
                    ShowReadFileMessage(ex);
                    return;
                }

                try
                {
                    ProcessPriceData();
                    PricesFileSelected = newFile;
                }
                catch (Exception ex)
                {
                    // Give the user a notice about the error
                    string mbText = $"Could not process Prices data\n\nError:\n{ex.Message}";

                    MessageBox.Show(
                        messageBoxText: mbText,
                        caption: $"An unexpected error has occurred",
                        button: MessageBoxButton.OK,
                        icon: MessageBoxImage.Error
                        );
                }
            }
        }
Ejemplo n.º 2
0
    public void UnLoad(bool resetFileBrowser)
    {
        MapCreator._Map     = null;
        MapCreator._MapInfo = null;
        if (resetFileBrowser)
        {
            Filebrowser.ResetAllPaths();
        }

        IsLoaded = false;
    }
Ejemplo n.º 3
0
 private void Start()
 {
     filebrowser = GameObject.Find("Filebrowser").GetComponent <Filebrowser>();
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     Instance = this;
     Input.simulateMouseWithTouches = true;
     Filebrowser.CreateCustomSongsPath();
 }