예제 #1
0
파일: Program.cs 프로젝트: dbsafe/intaker
        private static AppState CreateAppState(SampleFileStore sampleFileStore)
        {
            var appState = new AppState();

            var getSampleFileByIdResult = sampleFileStore.GetSampleFileById(1);

            if (getSampleFileByIdResult.Succeed)
            {
                appState.HomePage.InputDataContent = getSampleFileByIdResult.Data.Content;
            }

            return(appState);
        }
예제 #2
0
        private void UseSelectedSampleFile()
        {
            if (_model.SelectedSampleFileId == -1)
            {
                Toaster.Add("A sample file must be selected", MatToastType.Warning);
                return;
            }

            var getSampleFileResult = SampleFileStore.GetSampleFileById(_model.SelectedSampleFileId);

            if (!getSampleFileResult.Succeed)
            {
                Toaster.Add(getSampleFileResult.Message, MatToastType.Warning);
                return;
            }

            _editorManager.SetValue(getSampleFileResult.Data.Content);
        }