Esempio n. 1
0
        private void JianceConfig_Load(object sender, EventArgs e)
        {
            Myadapter_p = new Dt_PlateInfoTableAdapter();
            try
            {
                this.dt_PlateInfoTableAdapter.Fill(this.myDataSet.Dt_PlateInfo);
                DGPlatConfig.ClearSelection();
            }
            catch (Exception)
            {
                MessageBox.Show("本地数据库连接异常");
            }
            // TODO: 这行代码将数据加载到表“myDataSet.Dt_PlateInfo”中。您可以根据需要移动或删除它。
            flag = false;
            this.DGPlatConfig.AllowUserToAddRows = false;

            fc = new FormControl(this);
            fc.GetInit(this, fc);

            this.formStartX = this.Width;
            this.formStartY = this.Height;

            TB_IP.Text   = CommonFunction.dicBooks["strMainHostIP"];
            TB_PORT.Text = CommonFunction.dicBooks["strMainHostPort"];
        }
 public NewDirectory(TreeView root, string userName)
 {
     this.InitializeComponent();
     this._control = new FormControl(root, null, this);
     this._control.DefineDirectory(this.textDir);
     this._userName = userName;
 }
        public ActionResult FRender(string tableName = "", string formTitle = "", string targetArea = "", bool allowAU = false)
        {
            FormInfo formInfo = new FormInfo(formTitle, "/" + targetArea + "/" + tableName.Replace("tbl", ""));

            object[]  parms = new object[] { "@tableName", tableName.Trim() };
            DataTable table = new SqlFieldFilterAutoDao().GetDataTable(parms, "cofTableRenderAuto_GetAllColumnForFilter");

            if (table != null && table.Rows.Count > 0)
            {
                foreach (DataRow row in table.Rows)
                {
                    if (row["FieldType"] != null)
                    {
                        if (row["FieldType"].ToString() != "")
                        {
                            int         fieldType = Convert.ToInt32(row["FieldType"]);
                            FormControl control   = new FormControl(fieldType, row["COLUMN_NAME"].ToString(), row["COLUMN_NAME"].ToString(), Request[row["COLUMN_NAME"].ToString()] != null ? Request[row["COLUMN_NAME"].ToString()].ToString() : "", row["DisplayName"].ToString(), row["PlaceHolder"].ToString(), "");
                            if (row["DataSource"] != null)
                            {
                                control.DataSource = row["DataSource"].ToString();
                            }
                            formInfo.Controls.Add(control);
                        }
                    }
                }
            }
            ViewBag.AllowAU = allowAU;
            return(View(formInfo));
        }
Esempio n. 4
0
        internal static FormControl CreateFormControl()
        {
            var formctl = new FormControl();

            formctl.InputControlBuilder.AddSink(new AddressSink());
            return(formctl);
        }
Esempio n. 5
0
        public FormControl GetFormControl(ParentForm parentForm, string name)
        {
            FormControl formControl = new FormControl();

            FormControls.TryGetValue(parentForm.Id.ToString() + "." + name, out formControl);
            return(formControl);
        }
Esempio n. 6
0
        public IActionResult Post([FromBody] FormControl data)
        {
            Console.WriteLine(data.Name);

            using (var db = new InventoryContext())
            {
                var item = db.Inventories.Where(x => x.Name == data.Name);

                if (item.Count() < 1)
                {
                    db.Inventories.Add(data);
                    db.SaveChanges();
                }
            }



            /*
             * Make sure to create a new instance of
             * inventoryContext. You may refer to your notes or gitbook.
             * https://cn1109.gitbooks.io/saintermediate/content/dotnet-core-entityframework.html
             *
             * Look under the section: Updating the Values Controller to use Entity Framework
             */

            return(Json("DONE!"));
        }
Esempio n. 7
0
        public Translation GetTranslation(FormControl formControl, Language language)
        {
            Translation translation = new Translation();

            Translations.TryGetValue(formControl.Id + "." + language.Id, out translation);
            return(translation);
        }
Esempio n. 8
0
 public NewFile(
     TreeView root,
     string nameArq,
     string txtArq,
     bool[] lstPerm,
     bool isEdit,
     bool isPermit,
     string userName)
 {
     this.InitializeComponent();
     this._control  = new FormControl(root, null, this);
     this._userName = userName;
     this._control.EditableFile(
         nameArq,
         this.textArqName,
         this.textArq,
         this.chLeitura,
         this.chEscrita,
         this.chExecucao,
         lstPerm,
         txtArq,
         this.btnSave,
         isEdit,
         isPermit);
 }
        public async Task <IActionResult> Edit(int id, [Bind("Name,FormSectionId,FormDataTypeId,IsVisible,Order,CssClass,Id,Rowversion,CreatedBy,Created,ModifiedBy,Modified,IsActive,InActivated,InActivatedBy")] FormControl formControl)
        {
            if (id != formControl.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(formControl);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!FormControlExists(formControl.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["FormDataTypeId"] = new SelectList(_context.FormDataTypes, "Id", "Id", formControl.FormDataTypeId);
            ViewData["FormSectionId"]  = new SelectList(_context.FormSections, "Id", "Id", formControl.FormSectionId);
            return(View(formControl));
        }
Esempio n. 10
0
        void FindMenuItem(ToolStripMenuItem menuItem)
        {
            menuItem.MouseEnter += FormEvents.MenuItem_MouseEnter;
            menuItem.MouseUp    += FormEvents.MouseUp;
            var item = new FormControl
            {
                Name         = menuItem.Name,
                ParentFormID = activeForm.GetID(),
                Type         = menuItem.GetType().ToString(),
                OriginalText = menuItem.Text
            };

            item.Insert();

            if (menuItem.HasDropDownItems)
            {
                foreach (var childItem in menuItem.DropDownItems)
                {
                    if (childItem is ToolStripMenuItem)
                    {
                        FindMenuItem(childItem as ToolStripMenuItem);
                    }
                }
            }
        }
        public async Task <ActionResult> Edit(string path)
        {
            string userAuthenResult = await UserAuthentication();

            if (!userAuthenResult.Equals(string.Empty))
            {
                return(View(userAuthenResult));
            }

            User   user  = GetUser();
            string token = user.Token;

            FormControl formControl = await _formControlService.FindByPathForm(path);

            if (formControl == null)
            {
                return(View(ViewName.ERROR_404));
            }
            string assign = formControl.Assign;

            bool isFormPending = CalculateUtil.IsFormPendingOrExpired(formControl.Start);
            bool isFormExpired = !CalculateUtil.IsFormPendingOrExpired(formControl.Expired);

            if (isFormPending || isFormExpired)
            {
                return(View(ViewName.ERROR_403));
            }

            bool isFormAssignToUser = await IsFormAssignToUser(token, assign, user.IdGroup);

            if (assign.Equals(Keywords.AUTHENTICATED) || isFormAssignToUser)
            {
                string res1 = await _formService.FindFormWithToken(token, path);

                JObject resJSON = JObject.Parse(res1);

                string res2 = await _submissionService.FindSubmissionsByPage(token, path, 1);

                JArray jsonArray      = JArray.Parse(res2);
                bool   isNotSubmitted = jsonArray.Count == 0;
                if (isNotSubmitted)
                {
                    ViewBag.Link  = string.Empty;
                    ViewBag.Title = Messages.HAS_NOT_SUBMITTED_MESSAGE;
                }
                else
                {
                    ViewBag.Link  = APIs.ModifiedForm(path);
                    ViewBag.Title = resJSON.GetValue(Keywords.TITLE).ToString();
                    ViewBag.Id    = ((JObject)jsonArray[0]).GetValue(Keywords.ID).ToString();
                    ViewBag.Data  = ((JObject)jsonArray[0]).GetValue(Keywords.DATA).ToString();
                }
                ViewBag.User = user;

                return(View(ViewName.EDIT_REPORT));
            }

            return(View(ViewName.ERROR_404));
        }
Esempio n. 12
0
        public Node(Form form)
        {
            this.InitializeComponent();
            this._control = new FormControl(this.root, form, this);

            // bloquear o diretório para leitura  para outros usuários caso o usuário que criou tenha marcado leitura = false
            // O mesmo aplica-se as outras ideias
        }
Esempio n. 13
0
        private void button3_Click(object sender, EventArgs e)
        {
            FormControl control = new FormControl();

            this.Hide();
            control.ShowDialog();
            this.Show();
        }
Esempio n. 14
0
        // FormControl (instance)

        public static FormControl <THelper> FormControl <THelper>(this IFormControlCreator <THelper> creator, string label = null, string labelFor = null)
            where THelper : BootstrapHelper <THelper>
        {
            FormControl <THelper> formControl = new FormControl <THelper>(creator);

            formControl.Label = new ControlLabel <THelper>(formControl.Helper, label).For(labelFor);
            return(formControl);
        }
Esempio n. 15
0
        public CrudEditorForm(T @object, ViewType viewType, FormControl <T> formControl)
        {
            InitializeComponent();

            _formControl = formControl;

            InitializeView(viewType);
            InitializeForm(@object, formControl);
        }
Esempio n. 16
0
        private void Form1_Load(object sender, EventArgs e)
        {
            FormControl formControl = new FormControl(this);

            Button[] btn_search = { back, forward, reload, close, add };
            design.search_btn_style(btn_search, this);
            addPage(defaultUrl);
            tabControl1.Selected += tabSwitch;
        }
Esempio n. 17
0
 /// <summary>
 /// Creates a form item with this form control.
 /// </summary>
 /// <param name="formControl">Do not pass null.</param>
 /// <param name="setup"></param>
 /// <param name="label">The form-item label.</param>
 public static FormItem ToFormItem(
     this FormControl <FlowComponent> formControl, FormItemSetup setup = null, IReadOnlyCollection <PhrasingComponent> label = null)
 {
     label = label ?? Enumerable.Empty <PhrasingComponent>().Materialize();
     return(formControl.PageComponent.ToFormItem(
                setup: setup,
                label: label.Any() && formControl.Labeler != null ? formControl.Labeler.CreateLabel(label) : label,
                validation: formControl.Validation));
 }
Esempio n. 18
0
 public MineClone()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     // camera = new Camera(this, new Vector3(0, 2, 10), new Vector3(0, 0, 0), new Vector3(0, 1, 0));
     this.Window.AllowUserResizing = true;
     FormControl.Maximize(this.Window);
     chunks = new List <Pair>();
 }
Esempio n. 19
0
 public static void TranslateColumn(DataGridViewColumn column, FormControl formControl)
 {
     if (TranslationAvailable(formControl.Id, activeLanguage.GetID()))
     {
         column.HeaderText = GetTranslatedText(formControl, activeLanguage.Language);
     }
     else
     {
         column.HeaderText = GetOriginalText(formControl.Id);
     }
 }
Esempio n. 20
0
 public static void TranslateToolStripItem(ToolStripItem toolStripItem, FormControl formControl)
 {
     if (TranslationAvailable(formControl.Id, activeLanguage.GetID()))
     {
         toolStripItem.Text = GetTranslatedText(formControl, activeLanguage.Language);
     }
     else
     {
         toolStripItem.Text = GetOriginalText(formControl.Id);
     }
 }
Esempio n. 21
0
 public static void TranslateControl(Control control, FormControl formControl)
 {
     if (TranslationAvailable(formControl.Id, activeLanguage.GetID()))
     {
         control.Text = GetTranslatedText(formControl, activeLanguage.Language);
     }
     else
     {
         control.Text = GetOriginalText(formControl.Id);
     }
 }
Esempio n. 22
0
 public NewUser(TreeView root)
 {
     this.InitializeComponent();
     this._control = new FormControl(root, this, this);
     this._control.NewUser(
         this.textGroup,
         this.checkCreateArq,
         this.checkReadArq,
         this.checkCreateDir,
         this.checkReadDir);
 }
Esempio n. 23
0
        protected virtual void ScanControls(DependencyObject panelName, FrameworkElement formUserControl = null)
        {
            int count = VisualTreeHelper.GetChildrenCount(panelName);

            for (int i = 0; i < count; i++)
            {
                DependencyObject control = VisualTreeHelper.GetChild(panelName, i);

                if (control is StackPanel || control is Grid || control is Border || control is RelativePanel)
                {
                    ScanControls(control, formUserControl);
                }
                else if (control is TextBox textBox)
                {
                    FormControl formControl = new FormControl((FrameworkElement)control, formUserControl)
                    {
                        BaseBorderColor = textBox.BorderBrush
                    };
                    _formControlsList.Add(formControl);
                }
                else if (control is ComboBox comboBox)
                {
                    FormControl formControl = new FormControl((FrameworkElement)control, formUserControl)
                    {
                        BaseBorderColor = comboBox.BorderBrush
                    };
                    _formControlsList.Add(formControl);
                }
                else if (control is CheckBox || control is RichTextBlock)
                {
                    FormControl formControl = new FormControl((FrameworkElement)control, formUserControl);
                    _formControlsList.Add(formControl);
                }
                else if (control is RadioButtons)
                {
                    FormControl formControl = new FormControl((FrameworkElement)control, formUserControl);
                    _formControlsList.Add(formControl);
                }
                else if (control is AutoSuggestBox)
                {
                    FormControl formControl = new FormControl((FrameworkElement)control, formUserControl)
                    {
                        BaseBorderColor = TextBoxBorderBrush
                    };
                    _formControlsList.Add(formControl);
                }
                else if (control is ToggleSwitch)
                {
                    FormControl formControl = new FormControl((FrameworkElement)control, formUserControl);
                    _formControlsList.Add(formControl);
                }
            }
        }
        public bool Insert(FormControl formControl)
        {
            BsonDocument document = new BsonDocument {
                { Keywords.PATH_FORM, formControl.PathForm },
                { Keywords.OWNER, formControl.Owner },
                { Keywords.ASSIGN, formControl.Assign },
                { Keywords.START, formControl.Start },
                { Keywords.EXPIRED, formControl.Expired }
            };

            return(_mongoRepository.Insert(document));
        }
Esempio n. 25
0
 public override void onMetronomeEvent(object sender, metronomeEventArgs e)
 {
     if (listBox.InvokeRequired)
     {
         FormControl formControl = new FormControl(updateListBox);
         listBox.Invoke(formControl, new object[] { e });
     }
     else
     {
         updateListBox(e);
     }
 }
Esempio n. 26
0
 private void InitializeForm(T @object, FormControl <T> formControl)
 {
     try
     {
         panelForm.Controls.Add(formControl);
         formControl.Value = @object;
     }
     catch (ValidationException e)
     {
         MessageBox.Show(e.Message, "Ошибка инициализации формы");
     }
 }
Esempio n. 27
0
 public override void onMetronomeEvent(object sender, metronomeEventArgs e)
 {
     if (spinBox.InvokeRequired)
     {
         //making new delegate
         FormControl formControl = new FormControl(updateSpinBox);
         spinBox.Invoke(formControl, new object[] {e});
     }
     else
     {
         updateSpinBox(e);
     }
 }
Esempio n. 28
0
 public override void onMetronomeEvent(object sender, metronomeEventArgs e)
 {
     if (spinBox.InvokeRequired)
     {
         //making new delegate
         FormControl formControl = new FormControl(updateSpinBox);
         spinBox.Invoke(formControl, new object[] { e });
     }
     else
     {
         updateSpinBox(e);
     }
 }
Esempio n. 29
0
        protected override void Initialize()
        {
            Log.Debug("Initialize");
            IsMouseVisible = true;
            base.Initialize();
            Camera = new Camera(graphics.GraphicsDevice.Viewport);
            var formControl = new FormControl {
                Evolutio = this
            };

            formControl.AllowMaximizeForm(Window);
            formControl.Maximize(Window);
        }
        public async Task <IActionResult> Create([Bind("Name,FormSectionId,FormDataTypeId,IsVisible,Order,CssClass,Id,Rowversion,CreatedBy,Created,ModifiedBy,Modified,IsActive,InActivated,InActivatedBy")] FormControl formControl)
        {
            if (ModelState.IsValid)
            {
                _context.Add(formControl);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["FormDataTypeId"] = new SelectList(_context.FormDataTypes, "Id", "Id", formControl.FormDataTypeId);
            ViewData["FormSectionId"]  = new SelectList(_context.FormSections, "Id", "Id", formControl.FormSectionId);
            return(View(formControl));
        }
Esempio n. 31
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Project project = new Project()
            {
                Id   = 1,
                Name = "不凡帝"
            };

            ProjectForm form1 = new ProjectForm()
            {
                DisableDate = DateTime.Now.AddYears(5),
                EnableDate  = DateTime.Now,
                Id          = 1,
                Name        = "必备分销品"
            };

            ProjectForm form2 = new ProjectForm()
            {
                DisableDate = DateTime.Now.AddYears(5),
                EnableDate  = DateTime.Now,
                Id          = 1,
                Name        = "断缺货"
            };


            project.Forms = new ProjectForm[] { form1, form2 };

            var line1 = new FormLine()
            {
                Id   = 1,
                Name = "比巴卜",
            };

            form1.FormLines = new FormLine[] { line1 };

            var control1 = new FormControl
            {
                Id   = 1,
                Name = "数量"
            };

            var control2 = new FormControl
            {
                Id   = 2,
                Name = "照片"
            };



            line1.Controls = new FormControl[] { control1, control2 };
        }
		/// <summary>
		/// Adds a <paramref name="control"/> to this container.
		/// </summary>
		/// <param name="control">The <see cref="FormControl"/> which to add.</param>
		public void AddFormControl(FormControl control)
		{
			// validate arguments
			if (control == null)
				throw new ArgumentNullException("control");

			// check if the control is allowed
			var controlType = control.GetType();
			if (!IsControlAllowed(controlType))
				throw new InvalidOperationException(string.Format("The control of type '{0}' is not allowed as a direct child of '{1}'", controlType, GetType()));

			// add the control to the list
			formControls.Add(control);
		}
Esempio n. 33
0
		/// <summary>
		/// Executes the validation rule.
		/// </summary>
		/// <param name="context">The <see cref="IMansionWebContext"/>.</param>
		/// <param name="form">The <see cref="Form"/> being validated.</param>
		/// <param name="control">The actual <see cref="FormControl"/> being validated.</param>
		/// <param name="results">The <see cref="ValidationResults"/> containing the validation results.</param>
		public void Validate(IMansionWebContext context, Form form, FormControl control, ValidationResults results)
		{
			// validate arguments
			if (context == null)
				throw new ArgumentNullException("context");
			if (form == null)
				throw new ArgumentNullException("form");
			if (control == null)
				throw new ArgumentNullException("control");
			if (results == null)
				throw new ArgumentNullException("results");

			// invoke template method
			DoValidate(context, form, control, results);
		}
Esempio n. 34
0
		/// <summary>
		/// Executes the validation rule.
		/// </summary>
		/// <param name="context">The <see cref="IMansionWebContext"/>.</param>
		/// <param name="form">The <see cref="Form"/> being validated.</param>
		/// <param name="control">The actual <see cref="FormControl"/> being validated.</param>
		/// <param name="results">The <see cref="ValidationResults"/> containing the validation results.</param>
		protected abstract void DoValidate(IMansionWebContext context, Form form, FormControl control, ValidationResults results);
Esempio n. 35
0
 public override void onMetronomeEvent(object sender, metronomeEventArgs e)
 {
     if (listBox.InvokeRequired)
     {
         FormControl formControl = new FormControl(updateListBox);
         listBox.Invoke(formControl, new object[] { e });
     }
     else
     {
         updateListBox(e);
     }
 }
Esempio n. 36
0
        private string FormFieldName(FormControl control)
        {
            if (control.IsLayoutControl)
                return null;

            var behaviorResolver = ObjectFactory.Resolve<IControlBehaviorResolver>();
            var controlInstance = FormsManager.GetManager().LoadControl(control);
            var controller = behaviorResolver.GetBehaviorObject(controlInstance);
            var fieldController = controller as IFormFieldControl;

            if (fieldController != null && fieldController.MetaField != null)
                return fieldController.MetaField.FieldName;
            else
                return null;
        }
Esempio n. 37
0
        private void CreateDocument()
        {
            FormTable tL = new FormTable();
            tL.Columns = "50%;*";
            tL.Width = "100%";
            tL.CellPadding = 5;

            FormRow row1 = new FormRow();
            FormCell cell11 = new FormCell();
            cell11.ColSpan = 2;
            cell11.Name = "cell_11";
            row1.Cells.Add(cell11);
            tL.Rows.Add(row1);

            FormRow row2 = new FormRow();
            FormCell cell21 = new FormCell();
            FormCell cell22 = new FormCell();
            cell21.ColSpan = 1;
            cell22.ColSpan = 1;
            cell21.Name = "cell_21";
            cell22.Name = "cell_22";
            row2.Cells.Add(cell21);
            row2.Cells.Add(cell22);
            tL.Rows.Add(row2);

            FormRow row3 = new FormRow();
            FormCell cell31 = new FormCell();
            cell31.ColSpan = 2;
            cell31.Name = "cell_31";
            row3.Cells.Add(cell31);
            tL.Rows.Add(row3);

            FormSection sec1 = new FormSection();
            sec1.BorderType = 1;
            sec1.ItemIndex = 1;
            sec1.ShowLabel = true;
            sec1.Uid = "dd6acdd98240403984e561399d33d9a9";
            sec1.Labels.Add(new FormLabel("Sec1", Thread.CurrentThread.CurrentUICulture.Name));
            cell11.Sections.Add(sec1);

            FormSection sec2 = new FormSection();
            sec2.BorderType = 0;
            sec2.ItemIndex = 1;
            sec2.ShowLabel = true;
            sec2.Uid = "886cb9a3aae34e68ac8ef234d0ce8ce2";
            sec2.Labels.Add(new FormLabel("Sec2", Thread.CurrentThread.CurrentUICulture.Name));
            cell21.Sections.Add(sec2);

            FormSection sec3 = new FormSection();
            sec3.BorderType = 0;
            sec3.ItemIndex = 1;
            sec3.ShowLabel = true;
            sec3.Uid = "bb6acbb98240403784e561397b33d7a7";
            sec3.Labels.Add(new FormLabel("Sec3", Thread.CurrentThread.CurrentUICulture.Name));
            cell22.Sections.Add(sec3);

            FormSection sec4 = new FormSection();
            sec4.BorderType = 0;
            sec4.ItemIndex = 1;
            sec4.ShowLabel = true;
            sec4.Uid = Guid.NewGuid().ToString("N");
            sec4.Labels.Add(new FormLabel("Sec4", Thread.CurrentThread.CurrentUICulture.Name));
            cell31.Sections.Add(sec4);

            FormControl ctrl1 = new FormControl(FormController.SmartTableLayoutType);
            ctrl1.Columns = "50%;*";
            ctrl1.Width = "100%";
            ctrl1.CellPadding = 5;

            FormItem item1 = new FormItem();
            item1.LabelWidth = "120px";
            item1.ShowLabel = true;
            item1.Labels.Add(new FormLabel("test label1:", Thread.CurrentThread.CurrentUICulture.Name));
            item1.Uid = "9b3c4642e59b405faa2a1f38559a06cc";
            item1.RowIndex = 1;
            item1.CellIndex = 1;
            item1.RowSpan = 1;
            item1.ColSpan = 2;
            FormControl item1c = new FormControl(FormController.MetaPrimitiveControlType);
            item1c.Uid = Guid.NewGuid().ToString("N");
            item1c.Source = "Title";
            item1.Control = item1c;
            ctrl1.Items.Add(item1);

            FormItem item2 = new FormItem();
            item2.LabelWidth = "120px";
            item2.ShowLabel = true;
            item2.Labels.Add(new FormLabel("test label2:", Thread.CurrentThread.CurrentUICulture.Name));
            item2.Uid = "cafa725a31b74ad6a069e3b6446d89c0";
            item2.RowIndex = 2;
            item2.CellIndex = 1;
            item2.RowSpan = 1;
            item2.ColSpan = 1;
            FormControl item2c = new FormControl(FormController.MetaPrimitiveControlType);
            item2c.Uid = Guid.NewGuid().ToString("N");
            item2c.Source = "Priority";
            item2.Control = item2c;
            ctrl1.Items.Add(item2);

            FormItem item3 = new FormItem();
            item3.LabelWidth = "120px";
            item3.ShowLabel = true;
            item3.Labels.Add(new FormLabel("test label3:", Thread.CurrentThread.CurrentUICulture.Name));
            item3.Uid = "8d36be893c3f4cf1b5295be6853eb246";
            item3.RowIndex = 3;
            item3.CellIndex = 1;
            item3.RowSpan = 1;
            item3.ColSpan = 1;
            FormControl item3c = new FormControl(FormController.MetaPrimitiveControlType);
            item3c.Uid = Guid.NewGuid().ToString("N");
            item3c.Source = "Created";
            item3.Control = item3c;
            ctrl1.Items.Add(item3);

            FormItem item4 = new FormItem();
            item4.LabelWidth = "120px";
            item4.ShowLabel = true;
            item4.Labels.Add(new FormLabel("test label4:", Thread.CurrentThread.CurrentUICulture.Name));
            item4.Uid = "a5d87024cbf849cea5d273d77a292e6f";
            item4.RowIndex = 2;
            item4.CellIndex = 2;
            item4.RowSpan = 2;
            item4.ColSpan = 1;
            FormControl item4c = new FormControl(FormController.MetaPrimitiveControlType);
            item4c.Uid = Guid.NewGuid().ToString("N");
            item4c.Source = "Description";
            item4.Control = item4c;
            ctrl1.Items.Add(item4);

            sec1.Control = ctrl1;

            //FormDocument fd = new FormDocument();
            FormDocument fd = FormDocument.Load("Task", "[MC_BaseForm]");
            fd.MetaClassName = "Task";
            fd.Name = "[MC_BaseForm]";
            fd.FormTable = tL;
            fd.Save();
        }