Exemple #1
0
        private void AcceptButton_Click(object sender, RoutedEventArgs e)
        {
            WebContext context;

            if (_isUpdateMode)
            {
                context = _sourceObject;
            }
            else
            {
                context = new WebContext();
            }

            var info = WebElementControl.GetWebElementInfo();

            context.AllowedTags  = AllowedTagsControl.Tags;
            context.Name         = info.Name;
            context.Description  = info.Description;
            context.IsKeyElement = info.IsKeyElement;
            context.Tags         = info.Tags;
            context.WebLocator   = info.WebLocator.GetCopy();

            WebContext = context;

            DialogResult = true;
            Close();
        }
 private void Render()
 {
     if (_isUpdateMode)
     {
         AcceptButton.Content = "Update";
         WebElementControl.SetWebElement(_clearedObject);
     }
     else
     {
         AcceptButton.Content = "Create";
     }
 }
Exemple #3
0
 private void Render()
 {
     if (_isUpdateMode)
     {
         AcceptButton.Content = "Update";
         WebElementControl.SetWebElement(_sourceObjectCleaned);
         AllowedTagsControl.SetTags(_sourceObjectCleaned.AllowedTags);
     }
     else
     {
         AcceptButton.Content = "Create";
     }
 }