Beispiel #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            int row = 0;

            foreach (TaskInfo taskInfo in ListTaskInfos)
            {
                EditorRow editRow = null;

                if (row < vGridTaskInfos.Rows.Count)
                {
                    editRow = vGridTaskInfos.Rows[row] as EditorRow;
                }

                if (editRow != null)
                {
                    taskInfo.WorkerIP = GetWorkerIP(editRow.Properties.Value.ToString());
                }

                taskInfo.SimulatorPath        = GetSimulatorPath(taskInfo.WorkerIP);
                taskInfo.SimulatorLicensePath = GetSimulatorLicensePath(taskInfo.WorkerIP);

                row++;
            }

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Beispiel #2
0
        public void ItemSetList(string Id, DataTable Table, string ValueField, string NameField, string Filter, int[] HiddenColumns)
        {
            try
            {
                EditorRow            erow = null;
                DynamicParameterItem pi   = ItemGet(Id);
                if (pi != null)
                {
                    erow = pi.Row;
                }

                if (erow != null)
                {
                    if (pi.ValueType == DynamicParameterType.List)
                    {
                        RepositoryItemLookUpEdit edit = (RepositoryItemLookUpEdit)erow.Properties.RowEdit;
                        if (pi.ValueType == DynamicParameterType.List)
                        {
                            FormUtility.LookUpEdit_SetList(ref edit, Table, ValueField.ToUpper(), NameField.ToUpper());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
Beispiel #3
0
        private void AddTextRow(Section section, string title, string text, string propertyName, int index, LeadRect bounds)
        {
            EditorRow row = new EditorRow()
            {
                Title = title,
                Text  = text,
            };

            if (title == "Website")
            {
                row.Keyboard = Keyboard.Url;
            }
            else if (section.Header == "Tel")
            {
                row.Keyboard = Keyboard.Telephone;
            }
            else if (section.Header == "Email")
            {
                row.Keyboard = Keyboard.Email;
            }
            else
            {
                row.Keyboard = Keyboard.Default;
            }

            row.OnFocusAction = OnFocusAction(bounds);

            row.OnUnfocusAction = UnfocusAction();

            row.RowTappedAction = RowTappedAction(section.Header, title, index);

            row.TextChangedAction = TextChangedAction(propertyName, index);

            section.Rows.Add(row);
        }
Beispiel #4
0
        void VGrid_CustomUnboundData(object sender, DevExpress.XtraVerticalGrid.Events.CustomDataEventArgs e)
        {
            if (e.Row != null && (e.Row.Tag is ABCGridColumn.ColumnConfig || e.Row.Tag is ABCGridBandedColumn.ColumnConfig) &&
                (this.ABCGrid == null ||
                 (this.ABCGrid.OwnerView != null && this.ABCGrid.OwnerView.Mode != ViewMode.Design)))
            {
                if (e.Row.Index >= 0 && String.IsNullOrWhiteSpace(this.ABCGrid.TableName) == false && e.Row.Properties.FieldName.Contains(":"))
                {
                    EditorRow gridRow    = e.Row as EditorRow;
                    object    objDataRow = this.VGrid.GetRecordObject(e.ListSourceRowIndex);
                    if (objDataRow == null)
                    {
                        return;
                    }

                    String       strBaseField = e.Row.Properties.FieldName.Split(':')[0];
                    PropertyInfo proInfo      = objDataRow.GetType().GetProperty(strBaseField);
                    if (proInfo == null)
                    {
                        return;
                    }

                    object objValue = proInfo.GetValue(objDataRow, null);
                    e.Value = DataCachingProvider.GetCachingObjectAccrossTable(this.ABCGrid.TableName, ABCHelper.DataConverter.ConvertToGuid(objValue), e.Row.Properties.FieldName);
                }
            }
        }
Beispiel #5
0
        private void CreateEditorRows()
        {
            if (campaignQuestionnaire != null) {
                EditorRow oRow = new EditorRow("TextPrefix");
                oRow.Properties.Caption = "TextPrefix";
                oRow.Properties.ReadOnly = false;
                propertyGridControl1.Rows.Add(oRow);
                oRow = new EditorRow("DefaultInputValue");
                oRow.Properties.Caption = "DefaultInputValue";
                oRow.Properties.ReadOnly = false;
                propertyGridControl1.Rows.Add(oRow);
                oRow = new EditorRow("TextboxMaxWidth");
                oRow.Properties.Caption = "TextboxMaxWidth";
                oRow.Properties.ReadOnly = false;
                propertyGridControl1.Rows.Add(oRow);
                oRow = new EditorRow("TextboxMaxHeight");
                oRow.Properties.Caption = "TextboxMaxHeight";
                oRow.Properties.ReadOnly = false;
                propertyGridControl1.Rows.Add(oRow);
                oRow = new EditorRow("Enabled");
                oRow.Properties.Caption = "Enabled";
                oRow.Properties.ReadOnly = false;
                RepositoryItemComboBox repositoryItemComboBoxEnabled = new RepositoryItemComboBox();
                repositoryItemComboBoxEnabled.Items.AddRange(new object[] { "True", "False" });
                repositoryItemComboBoxEnabled.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                oRow.Properties.RowEdit = repositoryItemComboBoxEnabled;
                propertyGridControl1.Rows.Add(oRow);
                if(oChoiceOption == OtherChoiceOptions.OtherChoice)
                    listBoxControlMembers.DataSource = answerOptionList[SelectedIndex].OtherChoices;

                listBoxControlMembers.DisplayMember = "TextPrefix";
            }
        }
Beispiel #6
0
        private void InitVericalGrid(BarItemLinkCollection menuItemLinks)
        {
            menuEditoGrid.CloseEditor();
            menuEditoGrid.Rows.Clear();
            var cRow = new CategoryRow("Menu items");

            menuEditoGrid.OptionsView.AutoScaleBands = true;
            foreach (BarItemLink link in menuItemLinks)
            {
                if (link.Item.Tag == menuItemLinks)
                {
                    continue;
                }
                var    eRow = new EditorRow();
                var    a    = link.Item.Tag as MenuAction;
                string caption;
                if (a != null && a.ItemsStorage != null)
                {
                    caption = a.ItemsStorage.GetString(a.ResourceKey, null, Localizer.lngEn);
                }
                else
                {
                    caption = link.Caption;
                }
                eRow.Properties.Caption = caption;
                eRow.Properties.Value   = link.Caption;
                eRow.Tag = link;
                cRow.ChildRows.Add(eRow);
            }
            menuEditoGrid.Rows.Add(cRow);
        }
Beispiel #7
0
        public void FieldFindRefresh()
        {
            vGridControl1.Rows.Clear();
            foreach (FindValueItem fi in _afields)
            {
                EditorRow erow = new EditorRow();
                erow.Properties.Caption = fi._caption;

                switch (fi._valuetype.Name)
                {
                case "String":
                    erow.Properties.RowEdit = vGridControl1.RepositoryItems[0];
                    break;

                case "DateTime":
                    erow.Properties.RowEdit = vGridControl1.RepositoryItems[2];
                    break;

                default:
                    erow.Properties.RowEdit = vGridControl1.RepositoryItems[1];
                    break;
                }
                erow.Properties.Value = fi._value;
                erow.Name             = fi._id;
                vGridControl1.Rows.Add(erow);
            }
        }
        private void initialvgridcontrol()
        {
            vGridControl1.ShowButtonMode = ShowButtonModeEnum.ShowAlways;
            vGridControl1.LayoutStyle    = LayoutViewStyle.SingleRecordView;
            vGridControl1.Rows.Add(rowMain);
            // creating and modifying the Trademark row
            EditorRow datasmooth = new EditorRow("model");

            datasmooth.Properties.Caption = "裂缝模型";
            RepositoryItemComboBox datasmoothedit = new RepositoryItemComboBox();

            datasmoothedit.Items.AddRange(new string[] { "PKN", "KGD" });
            // adding the Trademark row to the Main row's child collection
            rowMain.ChildRows.Add(datasmooth);
            vGridControl1.RepositoryItems.Add(datasmoothedit);
            //Now you can define the repository item as an inplace editor of columns
            // populating the combo box with data
            datasmooth.Properties.Value   = "KGD";
            datasmooth.Properties.RowEdit = datasmoothedit;

            addNewRow("tf", "施工时间", 40, "min");
            addNewRow("G", "岩石弹性模量", 25200, "MPa");
            addNewRow("Q", "施工排量", 2, "m3/min");
            addNewRow("v", "岩石泊松比", 0.007, "");
            addNewRow("mu", "压裂液粘度", 20, "mPa·s");
            addNewRow("h", "缝高", 29, "m");
        }
Beispiel #9
0
        public Form1()
        {
            InitializeComponent();

            var categoryRow = new CategoryRow("CategoryRow1");

            vGridControl.Rows.Add(categoryRow);

            var editRow1 = new EditorRow {
                Name = "EditorRow1"
            };

            editRow1.Properties.Caption = "EditorRow1";
            editRow1.Properties.Value   = 1;
            editRow1.Properties.RowEdit = new RepositoryItemTextEdit();
            categoryRow.ChildRows.Add(editRow1);

            var editRow2 = new EditorRow {
                Name = "EditorRow2"
            };

            editRow2.Properties.Caption = "EditorRow2";
            editRow2.Properties.Value   = 2;
            editRow2.Properties.RowEdit = new RepositoryItemTextEdit();
            categoryRow.ChildRows.Add(editRow2);

            var editRow3 = new EditorRow {
                Name = "EditorRow3"
            };

            editRow3.Properties.Caption = "EditorRow3";
            editRow3.Properties.Value   = 3;
            editRow3.Properties.RowEdit = new RepositoryItemTextEdit();
            categoryRow.ChildRows.Add(editRow3);
        }
Beispiel #10
0
        public RestorePage() : base("RestorePage")
        {
            EnableStatus();

            AddTitleRow("Title");

            AddHeaderRow("Account");

            _accountId = AddEntryRow(null, "AccountId");
            _accountId.SetDetailViewIcon(Icons.Coins);

            AddSeparatorRow();

            _name = AddEntryRow("", "RegisterPage.Name");
            _name.SetDetailViewIcon(Icons.Pencil);
            _password1 = AddPasswordRow("", "RegisterPage.Password1");
            var password2 = AddPasswordRow("", "RegisterPage.Password2");

            Status.AddBusyView(_accountId);
            Status.Add(_accountId.Edit, T("AccountStatus"), StatusValidators.PositiveNumberValidator);

            Status.Add(_password1.Edit, T("RegisterPage.PasswordStatus", WalletApp.MinPasswordLength), (sv, entry, newText, oldText) =>
            {
                var pw1 = _password1.Edit.Text;
                var pw2 = password2.Edit.Text;

                return(WalletApp.IsValidPassword(pw1) && WalletApp.IsValidPassword(pw2) && pw1 == pw2);
            }).
            AddBusyView(password2);

            AddFooterRow();


            AddHeaderRow("AuthorizeAccountPage.SignatureKey");

            _passphrase = AddEntryRow(null, "AuthorizeAccountPage.Passphrase", ServiceNodeManager.MinimumServiceAccountPassphraseLength);
            var button = AddButtonRow("AuthorizeAccountPage.NewPassphrase", Generate);

            Status.AddBusyView(button);

            _key = AddEditorRow(null, "AuthorizeAccountPage.SignatureKey");
            _key.SetDetailViewIcon(Icons.Key);
            Status.Add(_key.Edit, T("RestoreAccountPage.KeyStatus"), (sv, edit, newText, oldText) =>
            {
                return(StatusValidators.HexValidator(64, sv, edit, newText, oldText));
            });

            AddFooterRow();


            password2.Edit.TextChanged += (sender, e) =>
            {
                Status.ReValidate();
            };

            AddSubmitRow("Restore", Restore);
        }
Beispiel #11
0
 public static void DongShortTimeEdit(EditorRow Row, string RowField)
 {
     if (Row != null)
     {
         HelpEditorRow.SetHorzAlignment(Row, DevExpress.Utils.HorzAlignment.Center);
         Row.Properties.RowEdit = HelpRepository.GetCotPLShortTimeEdit();
         Row.Properties.FieldName = RowField;
     }
 }
        public AddTodoTaskPage(TodoList todoList) : base("AddTodoTaskPage")
        {
            Subscribe <NewTodoTaskEvent>(TodoTask);

            AddTitleRow("Title");

            AddHeaderRow("TodoList");

            var selectionList = new SelectionItemList <TodoList>();

            foreach (var serviceNode in ServiceNodeManager.Current.ServiceNodes)
            {
                var todo = TodoApp.Current.GetTodo(serviceNode);
                if (todo != null)
                {
                    foreach (var list in todo.TodoLists)
                    {
                        selectionList.Add(new SelectionItem <TodoList>(list, TodoApp.GetTodoListName(list)));
                    }
                }
            }

            _listSelection = AddSelectionRows(selectionList, todoList);
            _listSelection.SelectionChanged = SelectionChanged;

            Status.Add(T("ListStatus"), (sv) =>
            {
                return(_listSelection.Selection != null);
            });

            AddFooterRow();

            _editor = AddEditorRow("", "Text");
            _editor.SetDetailViewIcon(Icons.Pencil);

            FocusElement = _editor.Edit;

            Status.Add(_editor.Edit, T("TextStatus"), (sv, edit, newText, oldText) =>
            {
                return(!string.IsNullOrWhiteSpace(newText) && newText.Length >= 2);
            });


            AddSubmitRow("Submit", Submit);

            AddHeaderRow("Common.SubmitAccount");
            _submitAccount = AddRow(new SubmitAccountButtonRow <TodoListSubmitAccount>(null, this, SelectSubmitAccount));
            AddInfoRow("Common.SubmitAccountInfo");
            AddFooterRow();
            SelectionChanged(todoList);

            Status.Add(T("SubmitAccountStatus"), (sv) =>
            {
                return(_submitAccount.SubmitAccount != null);
            });
        }
Beispiel #13
0
        public void Initialize( )
        {
            foreach (DevExpress.XtraGrid.Columns.GridColumn gridCol in ABCGrid.GridDefaultView.Columns)
            {
                EditorRow row = new EditorRow();
                row.Properties.FieldName = gridCol.FieldName;
                row.Properties.Caption   = gridCol.Caption;
                row.Enabled                        = gridCol.OptionsColumn.AllowEdit;
                row.Properties.RowEdit             = gridCol.ColumnEdit;
                row.Visible                        = true;
                row.Properties.Format.Format       = gridCol.DisplayFormat.Format;
                row.Properties.Format.FormatString = gridCol.DisplayFormat.FormatString;
                row.Properties.Format.FormatType   = gridCol.DisplayFormat.FormatType;

                row.Properties.UnboundType = gridCol.UnboundType;
                if (gridCol is ABCGridBandedColumn)
                {
                    row.Tag = (gridCol as ABCGridBandedColumn).Config;
                }
                if (gridCol is ABCGridColumn)
                {
                    row.Tag = (gridCol as ABCGridColumn).Config;
                }

                this.VGrid.Rows.Add(row);

                if (gridCol.VisibleIndex < 0)
                {
                    row.Index = this.VGrid.Rows.Count - 1;
                }
                else
                {
                    row.Index = gridCol.VisibleIndex;
                }

                if (gridCol.Width > iMaxWidth)
                {
                    iMaxWidth = gridCol.Width;
                }
            }

            BindingSource         = new System.Windows.Forms.BindingSource();
            this.VGrid.DataSource = BindingSource;

            if (this.ABCGrid.GridDataSource is BindingSource)
            {
                (this.ABCGrid.GridDataSource as BindingSource).PositionChanged += new EventHandler(ABCGridRowDetail_PositionChanged);
            }
            else
            {
                this.ABCGrid.GridDefaultView.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(GridDefaultView_FocusedRowChanged);
            }

            this.Text = "Chi tiết " + ABCGrid.ViewCaption;
        }
 private void CreateRows()
 {
     string [] captions = Properties.GetRowCaptions();
     for (int i = 0; i < 5; i++)
     {
         EditorRow row = new EditorRow(captions[i]);
         row.Properties.UnboundType = DevExpress.Data.UnboundColumnType.String;
         row.Properties.Caption     = captions[i];
         row.Height = RepositoryItemCustomEdit.RowHeight;
         grid.Rows.Add(row);
     }
 }
Beispiel #15
0
 public static EditorRow[] CreateEditorRow(string[] Captions, bool[] Visible, int[] widths)
 {
     EditorRow[] Rows = new EditorRow[Captions.Length];
     for (int i = 0; i < Captions.Length; i++)
     {
         Rows[i] = new EditorRow();
         Rows[i].Properties.Caption = Captions[i];
         Rows[i].Visible = Visible[i];
         Rows[i].MaxCaptionLineCount = 1;
         //PHUOCNC : Vấn đề width chua giai quyet xong
     }
     return Rows;
 }
Beispiel #16
0
        private void DrawLinkButton(DevExpress.XtraVerticalGrid.Events.CustomDrawRowValueCellEventArgs e)
        {
            if (this.ABCGrid == null ||
                (this.ABCGrid.OwnerView != null && this.ABCGrid.OwnerView.Mode != ViewMode.Design))
            {
                if (e.Row != null && e.Row.Tag is ABCGridColumn.ColumnConfig && String.IsNullOrWhiteSpace(this.ABCGrid.TableName) == false && e.CellValue != null && e.CellValue.GetType() == typeof(int))
                {
                    Boolean isDraw = false;

                    EditorRow gridRow      = e.Row as EditorRow;
                    String    strTableName = this.ABCGrid.TableName;
                    if (gridRow.Properties.FieldName.Contains(":") == false)
                    {
                        if (ForeignColumnList.TryGetValue(gridRow.Properties.FieldName, out isDraw) == false)
                        {
                            if (DataStructureProvider.IsForeignKey(strTableName, gridRow.Properties.FieldName))
                            {
                                ForeignColumnList.Add(gridRow.Properties.FieldName, true);
                            }
                            else
                            {
                                ForeignColumnList.Add(gridRow.Properties.FieldName, false);
                            }
                        }
                    }
                    else
                    {
                        DataCachingProvider.AccrossStructInfo acrrosInfo = DataCachingProvider.GetAccrossStructInfo(strTableName, ABCHelper.DataConverter.ConvertToGuid(e.CellValue), e.Row.Properties.FieldName);
                        if (acrrosInfo != null && (acrrosInfo.FieldName == DataStructureProvider.GetNOColumn(acrrosInfo.TableName) ||
                                                   acrrosInfo.FieldName == DataStructureProvider.GetNAMEColumn(acrrosInfo.TableName)))
                        {
                            isDraw = true;
                        }
                    }

                    if (isDraw)
                    {
                        e.Graphics.DrawImage(ABCControls.ABCImageList.GetImage16x16("DocLink"), e.Bounds.Location);

                        Rectangle r = e.Bounds;
                        r.Width -= 18;
                        r.X     += 18;
                        e.Appearance.DrawString(e.Cache, e.CellText, r);

                        e.Handled = true;
                    }
                }
            }
        }
Beispiel #17
0
        public void RunFocusedLink( )
        {
            if (String.IsNullOrWhiteSpace(this.ABCGrid.TableName) == false)
            {
                if (this.ABCGrid == null || (this.ABCGrid.OwnerView != null && this.ABCGrid.OwnerView.Mode != ViewMode.Design))
                {
                    String strTableName = this.ABCGrid.TableName;
                    String strFieldName = VGrid.FocusedRow.Properties.FieldName;

                    String strLinkTableName = String.Empty;
                    Guid   iLinkID          = Guid.Empty;


                    EditorRow gridRow      = this.VGrid.FocusedRow as EditorRow;
                    object    objCellValue = this.VGrid.GetCellValue(gridRow, VGrid.FocusedRecord);
                    if (objCellValue == null || objCellValue.GetType() != typeof(Guid))
                    {
                        return;
                    }
                    if (gridRow.Properties.FieldName.Contains(":"))
                    {
                        DataCachingProvider.AccrossStructInfo acrrosInfo = DataCachingProvider.GetAccrossStructInfo(strTableName, ABCHelper.DataConverter.ConvertToGuid(objCellValue), gridRow.Properties.FieldName);
                        if (acrrosInfo != null && (acrrosInfo.FieldName == DataStructureProvider.GetNOColumn(acrrosInfo.TableName) ||
                                                   acrrosInfo.FieldName == DataStructureProvider.GetNAMEColumn(acrrosInfo.TableName)))
                        {
                            strLinkTableName = acrrosInfo.TableName;
                            iLinkID          = acrrosInfo.TableID;
                        }
                    }
                    else if (DataStructureProvider.IsForeignKey(strTableName, strFieldName))
                    {
                        strLinkTableName = DataStructureProvider.GetTableNameOfForeignKey(strTableName, strFieldName);
                        iLinkID          = ABCHelper.DataConverter.ConvertToGuid(objCellValue);
                    }

                    if (iLinkID != Guid.Empty)
                    {
                        if (this.ABCGrid.OwnerView != null)
                        {
                            ABCScreen.ABCScreenHelper.Instance.RunLink(strLinkTableName, this.ABCGrid.OwnerView.Mode, false, iLinkID, ABCScreenAction.None);
                        }
                        else
                        {
                            ABCScreen.ABCScreenHelper.Instance.RunLink(strLinkTableName, ViewMode.Runtime, false, iLinkID, ABCScreenAction.None);
                        }
                    }
                }
            }
        }
Beispiel #18
0
        public object ItemGetValue(string Id)
        {
            object value            = null;
            DynamicParameterItem pi = ItemGet(Id);

            if (pi != null)
            {
                EditorRow row = pi.Row;
                if (row != null)
                {
                    value = row.Properties.Value;
                }
            }
            return(value);
        }
Beispiel #19
0
        /// <summary>
        /// Method to De-activate the Adjusters present in the <see cref="vGridControl1"/>
        /// </summary>
        /// <param name="_index">Index of the <see cref="clb_OutboardAdjPoints"/> item whose checkstate was set to Unchecked</param>
        private void Deactivate_OutboardAdjusters(int _index)
        {
            EditorRow upper = Outboard_CategoryRows[_index].ChildRows[0] as EditorRow;
            EditorRow lower = Outboard_CategoryRows[_index].ChildRows[1] as EditorRow;

            upper.Enabled = false;

            lower.Enabled = false;

            MultiEditorRow upperXYZ = Outboard_CategoryRows[_index].ChildRows[0].ChildRows[0] as MultiEditorRow;
            MultiEditorRow lowerXYZ = Outboard_CategoryRows[_index].ChildRows[1].ChildRows[0] as MultiEditorRow;

            upperXYZ.Enabled = false;
            lowerXYZ.Enabled = false;
        }
Beispiel #20
0
        /// <summary>
        /// Method to Activate the Adjusters present in the <see cref="vGridControl1"/>
        /// </summary>
        /// <param name="_index">Index of the <see cref="clb_InboardAdjPoints"/> item whose checkstate was set to Checked</param>
        private void Activate_InboardPointAdjusters(int _index)
        {
            EditorRow upper = Inboard_CategoryRows[_index].ChildRows[0] as EditorRow;
            EditorRow lower = Inboard_CategoryRows[_index].ChildRows[1] as EditorRow;

            upper.Enabled = true;

            lower.Enabled = true;

            MultiEditorRow upperXYZ = Inboard_CategoryRows[_index].ChildRows[0].ChildRows[0] as MultiEditorRow;
            MultiEditorRow lowerXYZ = Inboard_CategoryRows[_index].ChildRows[1].ChildRows[0] as MultiEditorRow;

            upperXYZ.Enabled = true;
            lowerXYZ.Enabled = true;
        }
Beispiel #21
0
        private void PublishTaskForm_Load(object sender, EventArgs e)
        {
            InitSimulationHostsComboBox();

            foreach (TaskInfo taskInfo in ListTaskInfos)
            {
                EditorRow itemTaskInfo = new EditorRow();
                itemTaskInfo.Name = taskInfo.Name;
                itemTaskInfo.Properties.Caption = taskInfo.Name;
                itemTaskInfo.Properties.RowEdit = comboBoxHostList;
                itemTaskInfo.Properties.Value   = localHostStr;

                vGridTaskInfos.Rows.Add(itemTaskInfo);
            }
        }
Beispiel #22
0
        public void FieldFindRefresh()
        {
            vGridControl1.Rows.Clear();
            foreach (DataRow row in _table.Rows)
            {
                EditorRow erow = new EditorRow();
                erow.Properties.Caption = Static.ToStr(row["name"]);

                ItemInfo ii = new ItemInfo();
                ii.row = row;

                switch (Static.ToInt(row["addtype"]))
                {
                case 1:     // number type
                    erow.Properties.RowEdit = vGridControl1.RepositoryItems[1];
                    //erow.Properties.RowEdit.OwnerEdit.Text = Static.ToStr(row["value"]);
                    erow.Properties.Value = Static.ToInt(row["value"]);
                    break;

                case 2:     // date type
                    erow.Properties.RowEdit = vGridControl1.RepositoryItems[2];
                    erow.Properties.Value   = Static.ToDate(row["value"]);
                    //erow.Properties.RowEdit.OwnerEdit.Text = Static.ToStr(row["value"]);
                    break;

                case 3:     // picture type
                    erow.Properties.RowEdit = vGridControl1.RepositoryItems[4];
                    //ulong attachid = (ulong)Static.ToLong(row["attachid"]);
                    string attachid = Static.ToStr(row["attachid"]);
                    erow.Properties.Value = attachid;
                    ii.isnew = (string.IsNullOrEmpty(attachid));
                    break;

                case 4:     // file type
                    erow.Properties.RowEdit = vGridControl1.RepositoryItems[3];
                    erow.Properties.Value   = Static.ToStr(row["value"]).ToUpper();
                    break;

                default:     // 1 and others is string type
                    erow.Properties.RowEdit = vGridControl1.RepositoryItems[0];
                    erow.Properties.Value   = Static.ToStr(row["value"]).ToUpper();
                    break;
                }

                erow.Tag = ii;
                vGridControl1.Rows.Add(erow);
            }
        }
Beispiel #23
0
        private void initialvgridcontrol()
        {
            vGridControl1.ShowButtonMode = ShowButtonModeEnum.ShowAlways;
            vGridControl1.LayoutStyle    = LayoutViewStyle.SingleRecordView;
            vGridControl1.Rows.Add(rowMain);
            if (temp_para.Type != null)
            {
                addNewRow("pi", "原始地层压力", temp_para.Pi, "MPa");
                addNewRow("h", "井深", temp_para.H, "m");
                addNewRow("a", "实验参数a", temp_para.A, "");
                addNewRow("b", "实验参数b", temp_para.B, "");
                addNewRow("v", "注入速度", temp_para.V, "m^3/min");
                addNewRow("rou", "密度", temp_para.Rou, "kg/m^3");
                addNewRow("radiu", "封堵半径", temp_para.Radiu, "m");
            }
            else
            {
                addNewRow("pi", "原始地层压力", 15, "MPa");
                addNewRow("h", "井深", 1999.1, "m");
                addNewRow("a", "实验参数a", 0.03, "");
                addNewRow("b", "实验参数b", 0.05, "");
                addNewRow("v", "注入速度", 16.5, "m^3/min");
                addNewRow("rou", "密度", 985, "kg/m^3");
                addNewRow("radiu", "封堵半径", 40, "m");
            }


            EditorRow datasmooth = new EditorRow("Type");

            datasmooth.Properties.Caption = "堵剂类型";
            RepositoryItemComboBox datasmoothedit = new RepositoryItemComboBox();

            datasmoothedit.Items.AddRange(new string[] { "触变型", "聚合物", "SP-1" });
            // adding the Trademark row to the Main row's child collection
            rowMain.ChildRows.Add(datasmooth);
            vGridControl1.RepositoryItems.Add(datasmoothedit);
            //Now you can define the repository item as an inplace editor of columns
            // populating the combo box with data
            if (temp_para.Type != null)
            {
                datasmooth.Properties.Value = temp_para.Type;
            }
            else
            {
                datasmooth.Properties.Value = "聚合物";
            }
            datasmooth.Properties.RowEdit = datasmoothedit;
        }
Beispiel #24
0
        private void addNewRow(string name, string cap, double defaultvalue, string unitcap)
        {
            EditorRow ni = new EditorRow(name);

            ni.Properties.Caption = cap;//"递减指数"

            rowMain.ChildRows.Add(ni);
            ni.Properties.Value = defaultvalue;
            if (unitcap != "")
            {
                RepositoryItemButtonEdit rib = new RepositoryItemButtonEdit();                   //Button按钮
                rib.Buttons[0].Caption = unitcap;
                rib.Buttons[0].Kind    = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph; //按钮样式
                ni.Properties.RowEdit  = rib;
            }
        }
        private void addNewRow(string name, string cap, double defaultvalue, string unitcap)
        {
            EditorRow ni = new EditorRow(name);

            ni.Properties.Caption = cap;//"递减指数"
            // adding the Category row to the Model row's child collection
            rowMain.ChildRows.Add(ni);
            ni.Properties.Value = defaultvalue;
            if (unitcap != "")
            {
                RepositoryItemButtonEdit rib = new RepositoryItemButtonEdit();//Button按钮
                //rib.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;//隐藏文字
                rib.Buttons[0].Caption = unitcap;
                rib.Buttons[0].Kind    = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph;//按钮样式
                ni.Properties.RowEdit  = rib;
            }
        }
Beispiel #26
0
        public AuthorizeDerivedKeyPage(int chainId, string derivedPassword) : base(chainId, "JoinChainPage")
        {
            _derivedPassword = derivedPassword;

            SetupPage();
            AddSubmitSection();

            AddHeaderRow("PrivatePublicKey");

            _keyView = new KeyView(null, true);
            AddViewRow(_keyView);

            _export = AddEditorRow(null, "DerivedKeyInfo");
            _export.SetDetailViewIcon(Icons.Info);
            AddInfoRow("DerivedInfo");
            AddFooterRow();
        }
        private void CreateRows()
        {
            EditorRow rowLastName = new EditorRow("LastName");

            rowLastName.Properties.Caption = "Last name";
            propertyGridControl1.Rows.Add(rowLastName);
            CategoryRow rowCategory = new CategoryRow("Address");

            propertyGridControl1.Rows.Add(rowCategory);
            EditorRow rowAddressLine1 = new EditorRow("AddressLine1");

            rowAddressLine1.Properties.Caption = "Address Line 1";
            rowCategory.ChildRows.Add(rowAddressLine1);
            EditorRow rowZip = new EditorRow("Zip");

            rowZip.Properties.Caption = "Zip Code";
            rowCategory.ChildRows.Add(rowZip);
        }
Beispiel #28
0
        /// <summary>
        /// 生成理化检验值临时表
        /// </summary>
        /// <param name="items"></param>
        public void InitInspectionItemsGrid(List <SmeltInspectionItem> items)
        {
            dtInspection.Clear();
            dtInspection.Columns.Clear();
            vgrdInspectParams.Rows.Clear();
            if (items.Count > 0)
            {
                foreach (SmeltInspectionItem item in items)
                {
                    string     colName = string.Format("Column{0}", item.Ordinal);
                    DataColumn dc      = dtInspection.Columns.Add(colName, typeof(string));
                    dc.Caption = item.T20Name;

                    EditorRow row = new EditorRow();
                    row.Properties.Caption   = item.T20Name;
                    row.Properties.FieldName = colName;
                    vgrdInspectParams.Rows.Add(row);
                }

                for (int i = 0; i < dtInspection.Columns.Count; i++)
                {
                    items[i].ResolveDataXML();
                    for (int j = 0; j < items[i].ItemValues.Count; j++)
                    {
                        DataRow dr = null;
                        if (dtInspection.Rows.Count < j + 1)
                        {
                            dr = dtInspection.NewRow();
                            dtInspection.Rows.Add(dr);
                        }
                        else
                        {
                            dr = dtInspection.Rows[j];
                        }

                        dr[i] = items[i].ItemValues[j].Metric01;
                    }
                }
                inspectionidx  = items[0].ItemValues.Count;
                _readOnlyCount = dtInspection.Rows.Count;
                this.vgrdInspectParams.DataSource = dtInspection;
                this.vgrdInspectParams.BestFit();
            }
        }
Beispiel #29
0
        private void VGridControl1_CellValueChanged(object sender, DevExpress.XtraVerticalGrid.Events.CellValueChangedEventArgs e)
        {
            int mainIndex = 0;

            if (vGridControl1.FocusedRow is MultiEditorRow)
            {
                MultiEditorRow row = vGridControl1.FocusedRow as MultiEditorRow;

                EditorRow eRow = row.ParentRow as EditorRow;

                CategoryRow cRow = eRow.ParentRow as CategoryRow;

                string coordName = "";

                if (Inboard_CategoryRows.Contains(cRow))
                {
                    mainIndex = Inboard_CategoryRows.IndexOf(cRow);

                    coordName = clb_InboardAdjPoints.Items[mainIndex].Value as string;
                }
                else if (Outboard_CategoryRows.Contains(cRow))
                {
                    mainIndex = Outboard_CategoryRows.IndexOf(cRow);

                    coordName = clb_OutboardAdjPoints.Items[mainIndex].Value as string;
                }

                if (KO_CV.KO_MasterAdjs.ContainsKey(coordName))
                {
                    if (row.Name == ("UpperLimit" + mainIndex))
                    {
                        KO_CV.KO_MasterAdjs[coordName].UpperCoordinateLimit = new Point3D((double)row.PropertiesCollection[0].Value,
                                                                                          (double)row.PropertiesCollection[1].Value,
                                                                                          (double)row.PropertiesCollection[2].Value);
                    }
                    else if (row.Name == ("LowerLimit" + mainIndex))
                    {
                        KO_CV.KO_MasterAdjs[coordName].LowerCoordinateLimit = new Point3D((double)row.PropertiesCollection[0].Value,
                                                                                          (double)row.PropertiesCollection[1].Value,
                                                                                          (double)row.PropertiesCollection[2].Value);
                    }
                }
            }
        }
Beispiel #30
0
 private void CreateEditorRows()
 {
     if (campaignQuestionnaire != null) {
         EditorRow oRow = new EditorRow("TextPrefix");
         oRow.Properties.Caption = "TextPrefix";
         oRow.Properties.ReadOnly = false;
         propertyGridControl1.Rows.Add(oRow);
         oRow = new EditorRow("Checked");
         oRow.Properties.Caption = "Checked";
         oRow.Properties.ReadOnly = false;
         RepositoryItemComboBox repositoryItemComboBoxChecked = new RepositoryItemComboBox();
         repositoryItemComboBoxChecked.Items.AddRange(new object[] { "True", "False" });
         repositoryItemComboBoxChecked.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
         oRow.Properties.RowEdit = repositoryItemComboBoxChecked;
         propertyGridControl1.Rows.Add(oRow);
         listBoxControlMembers.DataSource = answerOptionList[SelectedIndex].MultipleChoiceValues;
         listBoxControlMembers.DisplayMember = "TextPrefix";
     }
 }
Beispiel #31
0
        /// <summary>
        /// 生成质量检验值临时表
        /// </summary>
        /// <param name="items"></param>
        private void InitInspectionItemsGrid(List <InspectionItem> items)
        {
            dtInspection.Clear();
            dtInspection.Columns.Clear();

            vgrdInspectParams.Rows.Clear();

            foreach (InspectionItem item in items)
            {
                string     colName = string.Format("Column{0}", item.Ordinal);
                DataColumn dc      = dtInspection.Columns.Add(colName, typeof(string));
                dc.Caption = item.T20Name;

                EditorRow row = new EditorRow();
                row.Properties.Caption   = item.T20Name;
                row.Properties.FieldName = colName;
                vgrdInspectParams.Rows.Add(row);
            }

            //for (int i = 0; i < dtInspection.Columns.Count; i++)
            //{
            //    List<PPParamValue> values = items[i].ResolveDataXML();
            //    for (int j = 0; j < values.Count; j++)
            //    {
            //        DataRow dr = null;
            //        if (dtInspection.Rows.Count < j + 1)
            //        {
            //            dr = dtInspection.NewRow();
            //            dtInspection.Rows.Add(dr);
            //        }
            //        else
            //        {
            //            dr = dtInspection.Rows[j];
            //        }

            //        dr[i] = values[j].Metric01;
            //    }
            //}

            vgrdInspectParams.DataSource = dtInspection;
            vgrdInspectParams.BestFit();
        }
Beispiel #32
0
        private void InitMethodParamsGrid(List <ProductionProcessParam> ppParams)
        {
            dtParams.Clear();
            dtParams.Columns.Clear();

            vgrdMethodParams.Rows.Clear();

            foreach (ProductionProcessParam param in ppParams)
            {
                string     colName = string.Format("Column{0}", param.Ordinal);
                DataColumn dc      = dtParams.Columns.Add(colName, typeof(string));
                dc.Caption = param.T20Name;

                EditorRow row = new EditorRow();
                row.Properties.Caption   = param.T20Name;
                row.Properties.FieldName = colName;
                vgrdMethodParams.Rows.Add(row);
            }

            for (int i = 0; i < dtParams.Columns.Count; i++)
            {
                List <PPParamValue> values = ppParams[i].ResolveDataXML();
                for (int j = 0; j < values.Count; j++)
                {
                    DataRow dr = null;
                    if (dtParams.Rows.Count < j + 1)
                    {
                        dr = dtParams.NewRow();
                        dtParams.Rows.Add(dr);
                    }
                    else
                    {
                        dr = dtParams.Rows[j];
                    }

                    dr[i] = values[j].Metric01;
                }
            }

            vgrdMethodParams.DataSource = dtParams;
            vgrdMethodParams.BestFit();
        }
 private static Cell GetEditorRow(EditorRow row)
 {
     return(new ViewCell
     {
         Height = 140,
         View = new Grid
         {
             BackgroundColor = Color.White,
             Children =
             {
                 new Editor
                 {
                     Text = row.Text,
                     Margin = new Thickness(10, 0, 0, 0),
                     IsEnabled = false
                 }
             }
         }
     });
 }
        public SignTextPage() : base("SignTextPage")
        {
            AddTitleRow("Title");

            AddHeaderRow("Sign");
            _text = AddEntryRow("", "TextToSign");
            _text.SetDetailViewIcon(Icons.Pencil);

            _signedText = AddEditorRow("", null);
            _signedText.SetDetailViewIcon(Icons.Signature);

            var submit = AddSubmitRow("SignButton", Submit);

            submit.IsEnabled        = false;
            _text.Edit.TextChanged += (sender, e) =>
            {
                submit.IsEnabled = !string.IsNullOrWhiteSpace(e.NewTextValue);
            };

            AddFooterRow();
        }
Beispiel #35
0
 public static void DongRepository(EditorRow Row, string RowField, RepositoryItem Repos, HorzAlignment HorzAlign)
 {
     HelpEditorRow.SetHorzAlignment(Row, HorzAlign);
     Row.Properties.RowEdit = Repos;
     if (RowField != null) Row.Properties.FieldName = RowField;
 }
Beispiel #36
0
 public virtual void actionPerformed(System.Object event_sender, System.EventArgs event_Renamed)
 {
     //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"'
     if (event_sender == assertButton)
     {
         channel.executeCommand(getCurrentDeftemplateString(false));
         JOptionPane.showMessageDialog(this, "Template created.\nPlease check the log for Messages.");
     }
     else
     {
         //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"'
         if (event_sender == cancelButton)
         {
             close();
         }
         else
         {
             //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"'
             if (event_sender == reloadButtonDumpAreaTemplate)
             {
                 dumpAreaTemplate.setText(getCurrentDeftemplateString(true));
             }
             else
             {
                 //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"'
                 if (event_sender == addSlotButton)
                 {
                     EditorRow row = new EditorRow(new DeleteButton(IconLoader.getImageIcon("delete"), rows.size()), new JLabel("Slot " + (rows.size() + 1)), NewTypesCombo, new JTextField());
                     row.deleteButton.addActionListener(this);
                     addRemoveButton(templatePanel, row.deleteButton, gridbag, gridbagConstraints, (rows.size() + 1));
                     addLabel(templatePanel, row.rowLabel, gridbag, gridbagConstraints, (rows.size() + 1));
                     addTypesCombo(templatePanel, row.typeBox, gridbag, gridbagConstraints, (rows.size() + 1));
                     addNameField(templatePanel, row.nameField, gridbag, gridbagConstraints, (rows.size() + 1));
                     rows.add(row);
                     templatePanel.revalidate();
                 }
                 else
                 {
                     //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"'
                     if (event_sender is DeleteButton)
                     {
                         //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"'
                         DeleteButton deleteButton = (DeleteButton) event_sender;
                         rows.remove(deleteButton.Row);
                         templatePanel.removeAll();
                         initTemplatePanel();
                         for (int i = 0; i < rows.size(); ++i)
                         {
                             EditorRow editorRow = (EditorRow) rows.get(i);
                             editorRow.deleteButton.Row = i;
                             editorRow.rowLabel.setText("Slot " + (i + 1));
                             addRemoveButton(templatePanel, editorRow.deleteButton, gridbag, gridbagConstraints, i + 1);
                             addLabel(templatePanel, editorRow.rowLabel, gridbag, gridbagConstraints, i + 1);
                             addTypesCombo(templatePanel, editorRow.typeBox, gridbag, gridbagConstraints, i + 1);
                             addNameField(templatePanel, editorRow.nameField, gridbag, gridbagConstraints, i + 1);
                         }
                         templatePanel.repaint();
                         templatePanel.revalidate();
                     }
                 }
             }
         }
     }
 }
 /// <summary>
 /// Khởi tạo kiểu dữ liệu của dòng thuộc VGrid
 /// </summary>
 /// <param name="row"></param>
 private void InitEditorRowType(EditorRow row)
 {
     switch (GetFieldType(row.Properties.FieldName))
     {
         case FB_DATA_TYPE.SMALLINT:
         case FB_DATA_TYPE.INTEGER:
         case FB_DATA_TYPE.INT64:
             HelpEditorRow.DongSpinEdit(row, row.Properties.FieldName, 1);
             break;
         case FB_DATA_TYPE.FLOAT:
         case FB_DATA_TYPE.D_FLOAT:
         case FB_DATA_TYPE.DOUBLE:
             HelpEditorRow.DongCalcEdit(row, row.Properties.FieldName, 3);
             break;
         case FB_DATA_TYPE.BOOLEAN:
             HelpEditorRow.DongCheckEdit(row, row.Properties.FieldName);
             break;
         case FB_DATA_TYPE.DATE:
             HelpEditorRow.DongDateEdit(row, row.Properties.FieldName);
             break;
         case FB_DATA_TYPE.TIMESTAMP:
             //Tạm thời dùng timestamp cho time -> Chưa hỗ trợ Date và Time cùng lúc
             //Nếu có hỗ trợ date và time mình sẽ đọc chuỗi định dạng từ Description
             //PHUOCNT TODO
             HelpEditorRow.DongTimeEdit(row, row.Properties.FieldName, "HH:mm:ss");
             break;
         default:
             HelpEditorRow.DongTextLeft(row, row.Properties.FieldName);
             break;
     }
 }
Beispiel #38
0
        private void CreateEditorRows()
        {
            if (campaignQuestionnaire != null) {
                if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.Dropbox) {
                    EditorRow oRow = new EditorRow("TextPrefix");
                    oRow.Properties.Caption = "TextPrefix";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("DropBoxValues");
                    oRow.Properties.Caption = "DropBoxValues";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("DefaultSelectionValue");
                    oRow.Properties.Caption = "DefaultSelectionValue";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("DefaultSelectionValueIfOther");
                    oRow.Properties.Caption = "DefaultSelectionValueIfOther";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("DropboxMaxWidth");
                    oRow.Properties.Caption = "DropboxMaxWidth";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    listBoxControlMembers.DataSource = answerOptionList;
                    listBoxControlMembers.DisplayMember = "TextPrefix";
                } else if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.MultipleChoice) {
                    EditorRow oRow = new EditorRow("MultipleChoiceColumns");
                    oRow.Properties.Caption = "MultipleChoiceColumns";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("MultipleChoiceValues");
                    oRow.Properties.Caption = "MultipleChoiceValues";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemButtonEdit repositoryItemButtonEditMultipleChoiceValues = new RepositoryItemButtonEdit();
                    repositoryItemButtonEditMultipleChoiceValues.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    repositoryItemButtonEditMultipleChoiceValues.Click += new EventHandler(repositoryItemButtonEditMultipleChoiceValues_ButtonClick);
                    repositoryItemButtonEditMultipleChoiceValues.CustomDisplayText += new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(repositoryItemButtonEditMultipleChoiceValues_CustomDisplayText);
                    oRow.Properties.RowEdit = repositoryItemButtonEditMultipleChoiceValues;
                    propertyGridControl1.Rows.Add(oRow);
                    propertyGridControl1.DefaultEditors.Add(typeof(List<MultipleChoiceValue>), repositoryItemButtonEditMultipleChoiceValues);
                    oRow = new EditorRow("OtherChoices");
                    oRow.Properties.Caption = "OtherChoices";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemButtonEdit repositoryItemButtonEditOtherChoices = new RepositoryItemButtonEdit();
                    repositoryItemButtonEditOtherChoices.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    repositoryItemButtonEditOtherChoices.Click += new EventHandler(repositoryItemButtonEditOtherChoices_ButtonClick);
                    repositoryItemButtonEditOtherChoices.CustomDisplayText += new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(repositoryItemButtonEditOtherChoices_CustomDisplayText);
                    oRow.Properties.RowEdit = repositoryItemButtonEditOtherChoices;
                    propertyGridControl1.Rows.Add(oRow);
                    propertyGridControl1.DefaultEditors.Add(typeof(List<OtherChoice>), repositoryItemButtonEditOtherChoices);
                    listBoxControlMembers.DataSource = answerOptionList;
                    listBoxControlMembers.DisplayMember = "MultipleChoiceValues";
                    simpleButtonAdd.Enabled = false;
                    simpleButtonRemove.Enabled = false;
                    simpleButtonMoveUp.Enabled = false;
                    simpleButtonMoveDown.Enabled = false;

                } else if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.Textbox) {
                    EditorRow oRow = new EditorRow("TextPrefix");
                    oRow.Properties.Caption = "TextPrefix";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("DefaultInputValue");
                    oRow.Properties.Caption = "DefaultInputValue";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("TextboxMaxWidth");
                    oRow.Properties.Caption = "TextboxMaxWidth";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("TextboxMaxHeight");
                    oRow.Properties.Caption = "TextboxMaxHeight";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    listBoxControlMembers.DataSource = answerOptionList;
                    listBoxControlMembers.DisplayMember = "TextPrefix";

                } else if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.Schedule) {
                    EditorRow oRow = new EditorRow("CalendarButtonLabel");
                    oRow.Properties.Caption = "CalendarButtonLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("UseContactButtonLabel");
                    oRow.Properties.Caption = "UseContactButtonLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("CalendarOption");
                    oRow.Properties.Caption = "CalendarOption";
                    oRow.Properties.ReadOnly = true;

                    EditorRow oChildRow = new EditorRow("CalendarOption.TextPrefix");
                    oChildRow.Properties.Caption = "TextPrefix";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    oChildRow = new EditorRow("CalendarOption.CalendarSelectedValue");
                    oChildRow.Properties.Caption = "CalendarSelectedValue";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    //oChildRow = new EditorRow("CalendarValues");
                    //oChildRow.Properties.Caption = "CalendarValues";
                    //oChildRow.Properties.ReadOnly = false;
                    //oRow.ChildRows.Add(oChildRow);
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("ScheduleDate");
                    oRow.Properties.Caption = "ScheduleDate";
                    oRow.Properties.ReadOnly = false;

                    oChildRow = new EditorRow("ScheduleDate.TextPrefix");
                    oChildRow.Properties.Caption = "TextPrefix";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    oChildRow = new EditorRow("ScheduleDate.DefaultInputValue");
                    oChildRow.Properties.Caption = "DefaultInputValue";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    oChildRow = new EditorRow("ScheduleDate.Enabled");
                    oChildRow.Properties.Caption = "Enabled";
                    oChildRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxEnabled = new RepositoryItemComboBox();
                    repositoryItemComboBoxEnabled.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxEnabled.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oChildRow.Properties.RowEdit = repositoryItemComboBoxEnabled;
                    oRow.ChildRows.Add(oChildRow);
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("StartTime");
                    oRow.Properties.Caption = "StartTime";
                    oRow.Properties.ReadOnly = false;

                    oChildRow = new EditorRow("StartTime.TextPrefix");
                    oChildRow.Properties.Caption = "TextPrefix";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    oChildRow = new EditorRow("StartTime.DefaultInputValue");
                    oChildRow.Properties.Caption = "DefaultInputValue";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    oChildRow = new EditorRow("StartTime.Enabled");
                    oChildRow.Properties.Caption = "Enabled";
                    oChildRow.Properties.ReadOnly = false;
                    repositoryItemComboBoxEnabled = new RepositoryItemComboBox();
                    repositoryItemComboBoxEnabled.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxEnabled.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oChildRow.Properties.RowEdit = repositoryItemComboBoxEnabled;
                    oRow.ChildRows.Add(oChildRow);
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("EndTime");
                    oRow.Properties.Caption = "EndTime";
                    oRow.Properties.ReadOnly = false;

                    oChildRow = new EditorRow("EndTime.TextPrefix");
                    oChildRow.Properties.Caption = "TextPrefix";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    oChildRow = new EditorRow("EndTime.DefaultInputValue");
                    oChildRow.Properties.Caption = "DefaultInputValue";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    oChildRow = new EditorRow("EndTime.Enabled");
                    oChildRow.Properties.Caption = "Enabled";
                    oChildRow.Properties.ReadOnly = false;
                    repositoryItemComboBoxEnabled = new RepositoryItemComboBox();
                    repositoryItemComboBoxEnabled.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxEnabled.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oChildRow.Properties.RowEdit = repositoryItemComboBoxEnabled;
                    oRow.ChildRows.Add(oChildRow);
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("AttendiesLabel");
                    oRow.Properties.Caption = "AttendiesLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("AddContactButtonLabel");
                    oRow.Properties.Caption = "AddContactButtonLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("OtherChoices");
                    oRow.Properties.Caption = "OtherChoices";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemButtonEdit repositoryItemButtonEditOtherChoices = new RepositoryItemButtonEdit();
                    repositoryItemButtonEditOtherChoices.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    repositoryItemButtonEditOtherChoices.Click += new EventHandler(repositoryItemButtonEditOtherChoices_ButtonClick);
                    repositoryItemButtonEditOtherChoices.CustomDisplayText += new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(repositoryItemButtonEditOtherChoices_CustomDisplayText);
                    oRow.Properties.RowEdit = repositoryItemButtonEditOtherChoices;
                    propertyGridControl1.Rows.Add(oRow);
                    propertyGridControl1.DefaultEditors.Add(typeof(List<OtherChoice>), repositoryItemButtonEditOtherChoices);

                    //oRow = new EditorRow("MeetingPlaceDetails");
                    //oRow.Properties.Caption = "MeetingPlaceDetails";
                    //oRow.Properties.ReadOnly = false;
                    //RepositoryItemButtonEdit repositoryItemButtonEditMeetingPlaceDetails = new RepositoryItemButtonEdit();
                    //repositoryItemButtonEditMeetingPlaceDetails.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    //repositoryItemButtonEditMeetingPlaceDetails.Click += new EventHandler(repositoryItemButtonEditMeetingPlaceDetails_Click);
                    //repositoryItemButtonEditMeetingPlaceDetails.CustomDisplayText += new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(repositoryItemButtonEditMeetingPlaceDetails_CustomDisplayText);
                    //oRow.Properties.RowEdit = repositoryItemButtonEditMeetingPlaceDetails;
                    //propertyGridControl1.Rows.Add(oRow);
                    //propertyGridControl1.DefaultEditors.Add(typeof(List<MeetingPlaceDetail>), repositoryItemButtonEditMeetingPlaceDetails);

                    listBoxControlMembers.DataSource = answerOptionList;
                    listBoxControlMembers.DisplayMember = "Attendies";
                    simpleButtonAdd.Enabled = false;
                    simpleButtonRemove.Enabled = false;
                    simpleButtonMoveUp.Enabled = false;
                    simpleButtonMoveDown.Enabled = false;

                }
                //else if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.Seminar) {
                //    EditorRow oRow = new EditorRow("SeminarSchedule");
                //    oRow.Properties.Caption = "SeminarSchedule";
                //    oRow.Properties.ReadOnly = false;

                //    EditorRow oChildRow = new EditorRow("SeminarSchedule.TextPrefix");
                //    oChildRow.Properties.Caption = "TextPrefix";
                //    oChildRow.Properties.ReadOnly = false;
                //    oRow.ChildRows.Add(oChildRow);
                //    oChildRow = new EditorRow("SeminarSchedule.SelectedValue");
                //    oChildRow.Properties.Caption = "SelectedValue";
                //    oChildRow.Properties.ReadOnly = false;
                //    oRow.ChildRows.Add(oChildRow);
                //    propertyGridControl1.Rows.Add(oRow);
                //    oRow = new EditorRow("AttendiesLabel");
                //    oRow.Properties.Caption = "AttendiesLabel";
                //    oRow.Properties.ReadOnly = false;
                //    propertyGridControl1.Rows.Add(oRow);
                //    oRow = new EditorRow("AddContactButtonLabel");
                //    oRow.Properties.Caption = "AddContactButtonLabel";
                //    oRow.Properties.ReadOnly = false;
                //    propertyGridControl1.Rows.Add(oRow);

                //    listBoxControlMembers.DataSource = answerOptionList;
                //    listBoxControlMembers.DisplayMember = "Attendies";
                //    simpleButtonAdd.Enabled = false;
                //    simpleButtonRemove.Enabled = false;
                //    simpleButtonMoveUp.Enabled = false;
                //    simpleButtonMoveDown.Enabled = false;
                //}
            }
        }
 private void InitGridNghiepVu(EditorRow[] RowList)
 {
     foreach (ParamGroup pg in ParamGroupList)
     {
         //duchs: bo dong group CategoryRow cr = new CategoryRow();// CategoryRow(pg.NAME);
         foreach (EditorRow er in RowList)
             if (GetParamGroupID(er.Properties.FieldName).Equals(pg.ID))
                 if (frmAppParamsHelp.TonTaiThamSo(er.Properties.FieldName))
                 {
                     er.Properties.Caption = GetParamEndUser(er.Properties.FieldName);
                     er.Height = 25;
                     //cr.ChildRows.Add(er);
                     vGridMain.Rows.Add(er);
                 }
         //vGridMain.Rows.Add(cr);
     }
     ShowGrid(false);
 }
        private void AssignBasicPropertiesPanel()
        {
            EditorRow editorRow = new EditorRow();
            editorRow.Name = "BackColor";
            editorRow.Properties.Caption = "BackColor";
            editorRow.Properties.RowEdit = VGridMainForm.RepositoryItems["repositoryItemColorEditBackColor"];
            editorRow.Properties.Value = controlBackColor;
            VGridMainForm.Rows["categoryRowAppearance"].ChildRows.Add(editorRow);

            editorRow = new EditorRow();
            editorRow.Name = "Name";
            editorRow.Properties.Caption = "Name";
            editorRow.Properties.Value = controlName;
            VGridMainForm.Rows["categoryRowDesign"].ChildRows.Add(editorRow);

            editorRow = new EditorRow();
            editorRow.Name = "Location";
            editorRow.Properties.Caption = "Location";
            VGridMainForm.Rows["categoryRowLayout"].ChildRows.Add(editorRow);

            EditorRow editorRowSub = new EditorRow();
            editorRow.Name = "X";
            editorRowSub.Properties.Caption = "X";
            editorRowSub.Name = "X";
            editorRowSub.Properties.Value = controlLocation.X;
            editorRow.ChildRows.Add(editorRowSub);

            editorRowSub = new EditorRow();
            editorRow.Name = "Y";
            editorRowSub.Properties.Caption = "Y";
            editorRowSub.Name = "Y";
            editorRowSub.Properties.Value = controlLocation.Y;
            editorRow.ChildRows.Add(editorRowSub);
        }
        protected void AddComboBoxRowToVGrid(string categoryRow, string fieldName, string caption, object value, object[] option)
        {
            EditorRow editorRow = new EditorRow();
            editorRow.Name = fieldName;
            editorRow.Properties.Caption = caption;
            editorRow.Properties.Value = value;
            editorRow.Properties.RowEdit = VGridMainForm.RepositoryItems["repositoryItemComboBox"];

            RepositoryItemComboBox repositoryItemComboBox =
                (RepositoryItemComboBox)VGridMainForm.RepositoryItems["repositoryItemComboBox"];
            repositoryItemComboBox.Items.Clear();
            for (int i = 0; i < option.Count(); i++)
            {
                repositoryItemComboBox.Items.Add(option[i]);
            }
            VGridMainForm.Rows[categoryRow.ToString()].ChildRows.Add(editorRow);
        }
 protected void AddEditorRowToVGrid(string categoryRow, string fieldName, string caption, object value)
 {
     EditorRow editorRow = new EditorRow();
     editorRow.Name = fieldName;
     editorRow.Properties.Caption = caption;
     editorRow.Properties.Value = value;
     VGridMainForm.Rows[categoryRow.ToString()].ChildRows.Add(editorRow);
 }
Beispiel #43
0
 private void InitGrid(EditorRow[] RowList)
 {
     foreach (ParamGroup pg in ParamGroupList)
     {
         CategoryRow cr = new CategoryRow(pg.NAME);
         foreach (EditorRow er in RowList)
             if (GetParamGroupID(er.Properties.FieldName).Equals(pg.ID))
                 if (frmAppParamsHelp.TonTaiThamSo(er.Properties.FieldName))
                 {
                     er.Properties.Caption = GetParamEndUser(er.Properties.FieldName); ;
                     cr.ChildRows.Add(er);
                 }
         vGridMain.Rows.Add(cr);
     }
     ShowGrid(false);
 }
Beispiel #44
0
        private void CreateEditorRows()
        {
            if (campaignQuestionnaire != null) {
                if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.Dropbox) {
                    EditorRow oRow = new EditorRow("TextPrefix");
                    oRow.Properties.Caption = "TextPrefix";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("DropBoxValues");
                    oRow.Properties.Caption = "DropBoxValues";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("DefaultSelectionValue");
                    oRow.Properties.Caption = "DefaultSelectionValue";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("SelectionValueRequired");
                    oRow.Properties.Caption = "SelectionValueRequired";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxSelectionValueRequired = new RepositoryItemComboBox();
                    repositoryItemComboBoxSelectionValueRequired.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxSelectionValueRequired.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxSelectionValueRequired;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("DefaultSelectionValueIfOther");
                    oRow.Properties.Caption = "DefaultSelectionValueIfOther";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("SelectionValueIfOtherRequired");
                    oRow.Properties.Caption = "SelectionValueIfOtherRequired";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxSelectionValueIfOtherRequired = new RepositoryItemComboBox();
                    repositoryItemComboBoxSelectionValueIfOtherRequired.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxSelectionValueIfOtherRequired.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxSelectionValueIfOtherRequired;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("SelectionValueIfOtherVisible");
                    oRow.Properties.Caption = "SelectionValueIfOtherVisible";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxSelectionValueVisible = new RepositoryItemComboBox();
                    repositoryItemComboBoxSelectionValueVisible.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxSelectionValueVisible.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxSelectionValueVisible;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("DropboxMaxWidth");
                    oRow.Properties.Caption = "DropboxMaxWidth";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    listBoxControlMembers.DataSource = answerOptionList;
                    listBoxControlMembers.DisplayMember = "TextPrefix";
                } else if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.MultipleChoice) {
                    EditorRow oRow = new EditorRow("MultipleChoiceColumns");
                    oRow.Properties.Caption = "MultipleChoiceColumns";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("MultipleChoiceValues");
                    oRow.Properties.Caption = "MultipleChoiceValues";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemButtonEdit repositoryItemButtonEditMultipleChoiceValues = new RepositoryItemButtonEdit();
                    repositoryItemButtonEditMultipleChoiceValues.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    repositoryItemButtonEditMultipleChoiceValues.Click += new EventHandler(repositoryItemButtonEditMultipleChoiceValues_ButtonClick);
                    repositoryItemButtonEditMultipleChoiceValues.CustomDisplayText += new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(repositoryItemButtonEditMultipleChoiceValues_CustomDisplayText);
                    oRow.Properties.RowEdit = repositoryItemButtonEditMultipleChoiceValues;
                    propertyGridControl1.Rows.Add(oRow);
                    propertyGridControl1.DefaultEditors.Add(typeof(List<MultipleChoiceValue>), repositoryItemButtonEditMultipleChoiceValues);

                    oRow = new EditorRow("MultipleChoiceRequired");
                    oRow.Properties.Caption = "MultipleChoiceRequired";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxMultipleChoiceRequired = new RepositoryItemComboBox();
                    repositoryItemComboBoxMultipleChoiceRequired.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxMultipleChoiceRequired.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxMultipleChoiceRequired;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("OtherChoices");
                    oRow.Properties.Caption = "OtherChoices";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemButtonEdit repositoryItemButtonEditOtherChoices = new RepositoryItemButtonEdit();
                    repositoryItemButtonEditOtherChoices.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    repositoryItemButtonEditOtherChoices.Click += new EventHandler(repositoryItemButtonEditOtherChoices_ButtonClick);
                    repositoryItemButtonEditOtherChoices.CustomDisplayText += new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(repositoryItemButtonEditOtherChoices_CustomDisplayText);
                    oRow.Properties.RowEdit = repositoryItemButtonEditOtherChoices;
                    propertyGridControl1.Rows.Add(oRow);
                    propertyGridControl1.DefaultEditors.Add(typeof(List<OtherChoice>), repositoryItemButtonEditOtherChoices);
                    listBoxControlMembers.DataSource = answerOptionList;
                    listBoxControlMembers.DisplayMember = "MultipleChoiceValues";
                    simpleButtonAdd.Enabled = false;
                    simpleButtonRemove.Enabled = false;
                    simpleButtonClear.Enabled = false;
                    simpleButtonMoveUp.Enabled = false;
                    simpleButtonMoveDown.Enabled = false;

                } else if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.Textbox) {
                    EditorRow oRow = new EditorRow("TextPrefix");
                    oRow.Properties.Caption = "TextPrefix";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("DefaultInputValue");
                    oRow.Properties.Caption = "DefaultInputValue";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("Required");
                    oRow.Properties.Caption = "Required";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxTextboxRequired = new RepositoryItemComboBox();
                    repositoryItemComboBoxTextboxRequired.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxTextboxRequired.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxTextboxRequired;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("TextboxMaxWidth");
                    oRow.Properties.Caption = "TextboxMaxWidth";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("TextboxMaxHeight");
                    oRow.Properties.Caption = "TextboxMaxHeight";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    listBoxControlMembers.DataSource = answerOptionList;
                    listBoxControlMembers.DisplayMember = "TextPrefix";

                } else if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.Schedule) {
                    EditorRow oRow = new EditorRow("ViewDetailSummaryButtonLabel");
                    oRow.Properties.Caption = "ViewDetailSummaryButtonLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("CreateMeetingButtonLabel");
                    oRow.Properties.Caption = "CreateMeetingButtonLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("ScheduleType");
                    oRow.Properties.Caption = "ScheduleType";
                    oRow.Properties.ReadOnly = true;

                    EditorRow oChildRow = new EditorRow("ScheduleType.TextPrefix");
                    oChildRow.Properties.Caption = "TextPrefix";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    oChildRow = new EditorRow("ScheduleType.ScheduleTypeSelectedValue");
                    oChildRow.Properties.Caption = "ScheduleTypeSelectedValue";
                    oChildRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxSelValues = new RepositoryItemComboBox();
                    repositoryItemComboBoxSelValues.Items.AddRange(new object[] {"Seminar", "Webinar", "Meeting" });
                    repositoryItemComboBoxSelValues.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oChildRow.Properties.RowEdit = repositoryItemComboBoxSelValues;
                    oRow.ChildRows.Add(oChildRow);
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("ScheduleSalesPerson");
                    oRow.Properties.Caption = "ScheduleSalesPerson";
                    oRow.Properties.ReadOnly = true;
                    oChildRow = new EditorRow("ScheduleSalesPerson.TextPrefix");
                    oChildRow.Properties.Caption = "TextPrefix";
                    oChildRow.Properties.ReadOnly = false;
                    oRow.ChildRows.Add(oChildRow);
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("ListOfBookingsAvailableLabel");
                    oRow.Properties.Caption = "ListOfBookingsAvailableLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("ListOfBookingsAvailableRequired");
                    oRow.Properties.Caption = "ListOfBookingsAvailableRequired";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxListOfBookingsAvailableRequired = new RepositoryItemComboBox();
                    repositoryItemComboBoxListOfBookingsAvailableRequired.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxListOfBookingsAvailableRequired.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxListOfBookingsAvailableRequired;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("AddCallerButtonLabel");
                    oRow.Properties.Caption = "AddCallerButtonLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("AddAdditionalAttendieButtonLabel");
                    oRow.Properties.Caption = "AddAdditionalAttendieButtonLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("DeleteAttendieButtonLabel");
                    oRow.Properties.Caption = "DeleteAttendieButtonLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("AttendiesLabel");
                    oRow.Properties.Caption = "AttendiesLabel";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("AttendiesRequired");
                    oRow.Properties.Caption = "AttendiesRequired";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxAttendiesRequired = new RepositoryItemComboBox();
                    repositoryItemComboBoxAttendiesRequired.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxAttendiesRequired.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxAttendiesRequired;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("OtherChoices");
                    oRow.Properties.Caption = "OtherChoices";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemButtonEdit repositoryItemButtonEditOtherChoices = new RepositoryItemButtonEdit();
                    repositoryItemButtonEditOtherChoices.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    repositoryItemButtonEditOtherChoices.Click += new EventHandler(repositoryItemButtonEditOtherChoices_ButtonClick);
                    repositoryItemButtonEditOtherChoices.CustomDisplayText += new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(repositoryItemButtonEditOtherChoices_CustomDisplayText);
                    oRow.Properties.RowEdit = repositoryItemButtonEditOtherChoices;
                    propertyGridControl1.Rows.Add(oRow);
                    propertyGridControl1.DefaultEditors.Add(typeof(List<OtherChoice>), repositoryItemButtonEditOtherChoices);

                    listBoxControlMembers.DataSource = answerOptionList;
                    listBoxControlMembers.DisplayMember = "Attendies";
                    simpleButtonAdd.Enabled = false;
                    simpleButtonRemove.Enabled = false;
                    simpleButtonClear.Enabled = false;
                    simpleButtonMoveUp.Enabled = false;
                    simpleButtonMoveDown.Enabled = false;

                }else if (campaignQuestionnaire.Type.ToLower() == QuestionTypeConstants.SmartText){
                    EditorRow oRow = new EditorRow("TextPrefix");
                    oRow.Properties.Caption = "TextPrefix";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("DefaultInputValue");
                    oRow.Properties.Caption = "DefaultInputValue";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("Required");
                    oRow.Properties.Caption = "Required";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxTextboxRequired = new RepositoryItemComboBox();
                    repositoryItemComboBoxTextboxRequired.Items.AddRange(new object[] { "True", "False" });
                    repositoryItemComboBoxTextboxRequired.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxTextboxRequired;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("HeaderCommentText");
                    oRow.Properties.Caption = "HeaderCommentText";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("HeaderCreationDateText");
                    oRow.Properties.Caption = "HeaderCreationDateText";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("HeaderUserText");
                    oRow.Properties.Caption = "HeaderUserText";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);
                    oRow = new EditorRow("HeaderCustomerContactText");
                    oRow.Properties.Caption = "HeaderCustomerContactText";
                    oRow.Properties.ReadOnly = false;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("OrderBy");
                    oRow.Properties.Caption = "OrderBy";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxTextboxOrderBy = new RepositoryItemComboBox();
                    repositoryItemComboBoxTextboxOrderBy.Items.AddRange(new object[] { "Comment", "Creation Date", "User", "Customer Contact" });
                    repositoryItemComboBoxTextboxOrderBy.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxTextboxOrderBy;
                    propertyGridControl1.Rows.Add(oRow);

                    oRow = new EditorRow("OrderDirection");
                    oRow.Properties.Caption = "OrderDirection";
                    oRow.Properties.ReadOnly = false;
                    RepositoryItemComboBox repositoryItemComboBoxTextboxOrderDirection = new RepositoryItemComboBox();
                    repositoryItemComboBoxTextboxOrderDirection.Items.AddRange(new object[] { "Ascending", "Descending" });
                    repositoryItemComboBoxTextboxOrderDirection.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                    oRow.Properties.RowEdit = repositoryItemComboBoxTextboxOrderDirection;
                    propertyGridControl1.Rows.Add(oRow);

                    listBoxControlMembers.DataSource = answerOptionList;
                    listBoxControlMembers.DisplayMember = "TextPrefix";

                    simpleButtonAdd.Enabled = false;
                    simpleButtonRemove.Enabled = false;
                    simpleButtonClear.Enabled = false;
                    simpleButtonMoveUp.Enabled = false;
                    simpleButtonMoveDown.Enabled = false;
                }
            }
        }
Beispiel #45
0
 public static void SetHorzAlignment(EditorRow Row, HorzAlignment HorzAlign)
 {
     //Dinh dang caption trai
     //Du lieu Trai phai giua tuy vao content
     Row.Appearance.TextOptions.HAlignment = HorzAlign;
 }