Exemplo n.º 1
0
        private void NewFile()
        {
            //Create and show
            NewTagViewModel newTagViewModel = new NewTagViewModel();
            NewFileDialog   newFileDialog   = new NewFileDialog()
            {
                Owner = Owner, DataContext = newTagViewModel
            };

            if (newFileDialog.ShowDialog() ?? false)
            {
                //Get tag group
                Group tagGroup = TagLookup.CreateTagGroup(newTagViewModel.SelectedTagDefinition.GroupTag);

                //Create file
                TagFileModel newTagFileModel = new TagFileModel($"new_{tagGroup.GroupName}.{tagGroup.GroupName}", new AbideTagGroupFile()
                {
                    TagGroup = tagGroup
                })
                {
                    IsDirty = true, CloseCallback = File_Close
                };
                newTagFileModel.OpenTagReferenceRequested += OpenTagReferenceRequested;
                Files.Add(newTagFileModel);

                //Set
                SelectedFile = newTagFileModel;
            }
        }
Exemplo n.º 2
0
        public ActionResult NewTag()
        {
            var wells   = _client.GetPdgtmWells();
            var objects = _client.GetWitsmlObjects("WITSML");
            var tags    = _client.GetWitsmlElements("WITSML", objects.First());

            var model = new NewTagViewModel
            {
                Wells          = wells,
                WitsmlObjects  = objects,
                WitsmlElements = tags
            };

            return(View(model));
        }