Esempio n. 1
0
        private async void WindowLoaded()
        {
            if (string.IsNullOrWhiteSpace(_credentials.GetEmail()))
            {
                return;
            }
            Busy = true;
            var access = await Task.Run(() => _credentials.TryGetWebApiToken());

            if (access)
            {
                TransferToEditorWindow();
            }
            else
            {
                Busy = false;
            }
        }
Esempio n. 2
0
        private void App_OnStartup(object sender, StartupEventArgs e)
        {
            LocalLogger.StoragePath = Settings.SystemRelatedStoragePath;
            ConfigFileManager.PrepareConfigDataFile(Settings.ApiUrl, Path.Combine(Settings.SystemRelatedStoragePath, "ArktinMonitorData.an"));

            var credentials = new CredentialsManager(Settings.ApiUrl, Settings.UserRelatedStoragePath, Settings.SystemRelatedStoragePath, "ArktinMonitor");
            var access      = credentials.TryGetWebApiToken();

            if (access)
            {
                var editorWindow = new EditorWindow();
                editorWindow.Show();
            }
            else
            {
                var logInWindow = new LoginWindow();
                logInWindow.Show();
            }
        }