コード例 #1
0
        private async void btnChooseFile_Click(object sender, RoutedEventArgs e)
        {
            SelectExistingRamlOption();
            FileDialog fd = new OpenFileDialog();
            fd.DefaultExt = ".raml;*.rml";
            fd.Filter = "RAML files |*.raml;*.rml";

            var opened = fd.ShowDialog();

            if (opened != true)
            {
                return;
            }

            RamlTempFilePath = fd.FileName;
            RamlOriginalSource = fd.FileName;

            var title = Path.GetFileName(fd.FileName);

            
            var preview = new RamlPreview(ServiceProvider, action, RamlTempFilePath, RamlOriginalSource, title, isContractUseCase);
            
            StartProgress();
            preview.FromFile();
            StopProgress();

            var dialogResult = preview.ShowDialog();
            if(dialogResult == true)
                Close();
        }
コード例 #2
0
        private async void btnChooseFile_Click(object sender, RoutedEventArgs e)
        {
            SelectExistingRamlOption();
            FileDialog fd = new OpenFileDialog();

            fd.DefaultExt = ".raml;*.rml";
            fd.Filter     = "RAML files |*.raml;*.rml";

            var opened = fd.ShowDialog();

            if (opened != true)
            {
                return;
            }

            RamlTempFilePath   = fd.FileName;
            RamlOriginalSource = fd.FileName;

            var title = Path.GetFileName(fd.FileName);


            var preview = new RamlPreview(ServiceProvider, action, RamlTempFilePath, RamlOriginalSource, title, isContractUseCase);

            StartProgress();
            preview.FromFile();
            StopProgress();

            var dialogResult = preview.ShowDialog();

            if (dialogResult == true)
            {
                Close();
            }
        }
コード例 #3
0
        private async void LibraryButton_OnClick(object sender, RoutedEventArgs e)
        {
            SelectExistingRamlOption();
            var rmlLibrary       = new RAMLLibraryBrowser(exchangeUrl);
            var selectedRamlFile = rmlLibrary.ShowDialog();

            if (selectedRamlFile.HasValue && selectedRamlFile.Value)
            {
                var url = rmlLibrary.RAMLFileUrl;

                txtURL.Text = url;

                var preview = new RamlPreview(ServiceProvider, action, RamlTempFilePath, txtURL.Text, "title", isContractUseCase);

                StartProgress();
                preview.FromURL();
                StopProgress();

                var dialogResult = preview.ShowDialog();
                if (dialogResult == true)
                {
                    Close();
                }
            }
        }
コード例 #4
0
        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            var preview = new RamlPreview(ServiceProvider, action, txtTitle.Text);

            preview.NewContract();
            preview.ShowDialog();
            Close();
        }
コード例 #5
0
        private async void GoButton_Click(object sender, RoutedEventArgs e)
        {
            //TODO: check title !
            SelectExistingRamlOption();
            var preview = new RamlPreview(ServiceProvider, action, RamlTempFilePath, txtURL.Text, "title", isContractUseCase);

            StartProgress();
            preview.FromURL();
            StopProgress();

            var dialogResult = preview.ShowDialog();

            if (dialogResult == true)
            {
                Close();
            }
        }
コード例 #6
0
 private void btnOk_Click(object sender, RoutedEventArgs e)
 {
     var preview = new RamlPreview(ServiceProvider, action, txtTitle.Text);
     preview.NewContract();
     preview.ShowDialog();
     Close();
 }
コード例 #7
0
        private async void GoButton_Click(object sender, RoutedEventArgs e)
        {
            //TODO: check title !
            SelectExistingRamlOption();
            var preview = new RamlPreview(ServiceProvider, action, RamlTempFilePath, txtURL.Text, "title", isContractUseCase);
            
            StartProgress();
            preview.FromURL();
            StopProgress();

            var dialogResult = preview.ShowDialog();
            if(dialogResult == true)
                Close();
        }
コード例 #8
0
        private async void LibraryButton_OnClick(object sender, RoutedEventArgs e)
        {
            SelectExistingRamlOption();
            var rmlLibrary = new RAMLLibraryBrowser(exchangeUrl);
            var selectedRamlFile = rmlLibrary.ShowDialog();

            if (selectedRamlFile.HasValue && selectedRamlFile.Value)
            {
                var url = rmlLibrary.RAMLFileUrl;

                txtURL.Text = url;

                var preview = new RamlPreview(ServiceProvider, action, RamlTempFilePath, txtURL.Text, "title", isContractUseCase);
                
                StartProgress();
                preview.FromURL();
                StopProgress();

                var dialogResult = preview.ShowDialog();
                if (dialogResult == true)
                    Close();
            }
        }