Exemple #1
0
        private void buttonAddVersion_Click(object sender, EventArgs e)
        {
            Version     version = new Version();
            FormVersion form    = new FormVersion(version);

            if (form.ShowDialog() == DialogResult.OK)
            {
                versions.Add(version);
                DrawVersions();
                RefreshOthers();
            }
        }
Exemple #2
0
 private void buttonChangeVersion_Click(object sender, EventArgs e)
 {
     if (listViewVersions.SelectedIndices.Count == 1)
     {
         Version     version = (Version)listViewVersions.SelectedItems[0].Tag;
         FormVersion form    = new FormVersion(version);
         if (form.ShowDialog() == DialogResult.OK)
         {
             DrawVersions();
             RefreshOthers();
         }
     }
 }
Exemple #3
0
        public Task <FormVersionCompleteModel> Handle(CreateOrUpdateFormRequest request, CancellationToken cancellationToken)
        {
            FormVersion formVersion = _mapper.Map <FormVersion>(request.ToCreateOrUpdate);

            if (request.isCreatingNew)
            {
                _context.FormVersions.Add(formVersion);
            }
            else
            {
                _context.Set <FormVersion>().Attach(formVersion);
            }
            _context.SaveChanges();
            return(null);
        }
        public void Test()
        {
            // Setup

            // Create Form
            Form        form        = EntityFactory.GetForm();
            FormVersion formVersion = EntityFactory.GetFormVersion();

            formVersion.Version = 1;
            formVersion.Form    = form;

            // Create Field
            Field firstNameField = EntityFactory.GetField();

            firstNameField.Type = FieldType.Text;
            FieldVersion firstNameFieldVersion = EntityFactory.GetFieldVersion();

            firstNameFieldVersion.Version = 1;
            firstNameFieldVersion.Name    = "FirstName";
            firstNameFieldVersion.Field   = firstNameField;

            Field lastNameField = EntityFactory.GetField();

            lastNameField.Type = FieldType.Text;
            FieldVersion lastNameFieldVersion = EntityFactory.GetFieldVersion();

            lastNameFieldVersion.Version = 1;
            lastNameFieldVersion.Name    = "LastName";
            lastNameFieldVersion.Field   = lastNameField;

            formVersion.Fields = new List <FieldVersion>();
            formVersion.Fields.Add(firstNameFieldVersion);
            formVersion.Fields.Add(lastNameFieldVersion);

            // Test
            Form result = _crudRepository.Create(form);

            // Assert
            Assert.NotNull(result);
        }
Exemple #5
0
        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormVersion form = new FormVersion("About FLDesigner");
            form.ShowDialog(this);

            //Form aboutForm = new AboutForm();
            //aboutForm.ShowDialog();
        }