protected void NotifyParentContentChange() { if (AllowParentChangeNotifications) { ContentChanged?.Invoke(this, new EventArgs()); } }
public virtual void OnContentChanged() { if (ContentChanged != null) { ContentChanged?.Invoke(this, EventArgs.Empty); } }
private void UpdateContent() { KeyboardHelper.HideKeyboard(this); // Remove previous content base.RemoveAllViews(); if (ViewModel?.Content != null) { // Create and set new content var view = ViewModelToViewConverter.Convert(this, ViewModel.Content); base.AddView(view); } else if (ViewModel != null) { var splashView = ViewModelToViewConverter.GetSplash(this, ViewModel); if (splashView != null) { base.AddView(splashView); } } ContentChanged?.Invoke(this, new EventArgs()); }
private int WriteBulk(IEnumerable <T> records, Func <LiteCollection <T>, IEnumerable <T>, int> func, bool doValidate, bool setCurrentFields) { if (records == null || !records.Any()) { return(0); } foreach (var model in records) { if (setCurrentFields) { SetCurrentFields(model); } if (doValidate) { Validate(model, _db); } } var ret = 0; using (var db = _db.OpenWrite()) { var coll = GetCollection(db); EnsureIndeces(coll); //ret = func(coll, records); ret = Retry2x(records, func, coll); EnsureIndecesAfterWrite(coll); } ContentChanged?.Invoke(this, default(T)); return(ret); }
private void onFilterChanged() { SuspendLayout(); // Avoid repositioning child controls on each box visibility change updateVisibilityOfBoxes(); ResumeLayout(true); // Place controls at their places ContentChanged?.Invoke(); }
public void OnLooseSource(IDataSource source) { DataReceivers[source].Delete(); ListChanged -= DataReceivers[source].OnListChange; DataReceivers.Remove(source); ContentChanged?.Invoke(); }
private void OnContentChanged(EventArgs e) { if (ContentChanged != null) { ContentChanged.Invoke(this, e); } }
private void textBox_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { ContentChanged?.Invoke(textBox); } }
private void fireContentChangedEvent() { if (ContentChanged != null) { ContentChanged.DynamicInvoke(this, null); } }
private void onUnmuteTimerTick(object sender, EventArgs e) { if (cleanUpMutedMergeRequests()) { ContentChanged?.Invoke(this); } }
/// <summary> /// Treated as a cleanup method of sorts, this cleans up certain members of this inventory. /// </summary> public virtual void OnDisable() { ItemAdded.RemoveAllListeners(); ItemRemoved.RemoveAllListeners(); ContentChanged.RemoveAllListeners(); Debug.Log(this.name + " OnDisable()!"); }
private void m_fileSystemWatcher_Changed(object sender, FileSystemEventArgs e) { if (e.ChangeType == WatcherChangeTypes.Changed) { ContentChanged?.Invoke(this, e); } }
public void NotifyContentChanged() { if (!initialized) { return; } try { OnContentChanged(); } catch (Exception ex) { LoggingService.LogInternalError(ex); } if (extensionChain != null) { foreach (var ext in extensionChain.GetAllExtensions().OfType <DocumentControllerExtension> ().ToList()) { ext.RunContentChanged(); } } UpdateContentExtensions(); ContentChanged?.Invoke(this, EventArgs.Empty); RefreshExtensions().Ignore(); contentCallbackRegistry?.InvokeContentChangeCallbacks(); if (finalViewItem != null) { // Propagate content change notification to parent controller if (!finalViewItem.IsRoot && finalViewItem.Parent != null) { finalViewItem.Parent.SourceController?.NotifyContentChanged(); } } }
private void onDiscussionBoxContentChanged(DiscussionBox sender) { SuspendLayout(); // Avoid repositioning child controls on changing sender visibility updateVisibilityOfBox(sender); ResumeLayout(true); // Put child controls at their places ContentChanged?.Invoke(); }
// Обработчик при изменении содержимого файла в TexBox из Текстового редактороа private void TextBoxContent1_TextChanged(object sender, EventArgs e) { if (ContentChanged != null) { ContentChanged.Invoke(this, EventArgs.Empty); } }
private void AttemptFoodTransfer(Pot pot) { //Debug.Log($"Attempt food transfer from {pot.name}"); // check empty plate and pot food ready if (hasFood || !pot.IsFoodReady()) { return; } // check pot is tilted over plate (dot product with 'up' vectors) bool potTilted = Vector3.Dot(pot.transform.up, Vector3.up) < 0f; if (!potTilted) { return; } // create content in plate this.content = pot.GetPotContent(); foodObject.SetActive(true); foodObject.transform.localScale = Vector3.zero; foodObject.transform.DOScale(Vector3.one, 0.3f); // reset pot pot.Reset(); // trigger plate content changed event for UI ContentChanged?.Invoke(content); }
/// <summary> /// Removes all data from the Clipboard. /// </summary> public static void Clear() { #if __ANDROID__ _clipboardManager.PrimaryClip = null; #elif __IOS__ UIPasteboard.General.SetData(null, "kUTTypePlainText"); #elif __MAC__ NSPasteboard.GeneralPasteboard.ClearContents(); #elif WINDOWS_PHONE_APP if (_on10) { _type10.GetRuntimeMethod("Clear", new Type[0]).Invoke(null, new object[0]); } else { global::System.Windows.Clipboard.SetText(""); } #elif WINDOWS_PHONE global::System.Windows.Clipboard.SetText(""); #elif WIN32 EmptyClipboard(); #else throw new PlatformNotSupportedException(); #endif ContentChanged?.Invoke(null, null); }
private void setGroupCollapsing(ProjectKey projectKey, bool collapse) { bool isCollapsed = _collapsedProjects.Contains(projectKey); if (isCollapsed == collapse) { return; } if (collapse) { _collapsedProjects.Add(projectKey); } else { _collapsedProjects.Remove(projectKey); } NativeMethods.LockWindowUpdate(Handle); int vScrollPosition = Win32Tools.GetVerticalScrollPosition(Handle); ContentChanged?.Invoke(this); Win32Tools.SetVerticalScrollPosition(Handle, vScrollPosition); NativeMethods.LockWindowUpdate(IntPtr.Zero); }
private void apply(IEnumerable <Discussion> discussions) { if (discussions == null) { return; } bool isResolved(Discussion d) => d.Notes.Any(note => note.Resolvable && !note.Resolved); DateTime getTimestamp(Discussion d) => d.Notes.Select(note => note.Updated_At).Max(); int getNoteCount(Discussion d) => d.Notes.Count(); IEnumerable <Discussion> cachedDiscussions = getAllBoxes().Select(box => box.Discussion); IEnumerable <Discussion> updatedDiscussions = discussions .Where(discussion => { Discussion cachedDiscussion = cachedDiscussions.SingleOrDefault(d => d.Id == discussion.Id); return(cachedDiscussion == null || (isResolved(cachedDiscussion) != isResolved(discussion) || getTimestamp(cachedDiscussion) != getTimestamp(discussion) || getNoteCount(cachedDiscussion) != getNoteCount(discussion))); }) .ToArray(); // force immediate execution IEnumerable <Discussion> deletedDiscussions = cachedDiscussions .Where(cachedDiscussion => discussions.SingleOrDefault(d => d.Id == cachedDiscussion.Id) == null) .ToArray(); // force immediate execution if (deletedDiscussions.Any() || updatedDiscussions.Any()) { renderDiscussionsWithSuspendedLayout(deletedDiscussions, updatedDiscussions); ContentChanged?.Invoke(); } }
public void ShowForContent(object content) { if (!Addon.Current.Settings.Get("EnableOverlay", true)) { return; } bool isChanged = content != OSDContent; OSDContent = content; RaisePropertyChanged(nameof(OSDContent)); // Extend timeout _closeTimer.Stop(); _closeTimer.Interval = TimeSpan.FromSeconds(Addon.Current.Settings.Get("DisplayTime", 2)); _closeTimer.Start(); if (State == FlyoutViewState.Open) { if (isChanged) { ContentChanged?.Invoke(this, null); } } else { BeginOpen(); } }
public void ReplaceAll(IEnumerable <T> newRecords, bool doValidate = true, bool clearIDs = false) { foreach (var model in newRecords) { SetCurrentFields(model); if (clearIDs) { model.Id = 0; } if (doValidate) { Validate(model, _db); } } string colxnName = ""; using (var db = _db.OpenRead()) colxnName = GetCollection(db).Name; using (var db = _db.OpenWrite()) db.DropCollection(colxnName); using (var db = _db.OpenWrite()) { var coll = GetCollection(db); EnsureIndeces(coll); coll.InsertBulk(newRecords); } ContentChanged?.Invoke(this, default(T)); }
private void OnPropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == "Content") { IsChanged = true; ContentChanged.Raise(sender); } }
void SetCallbacks() { // Naturally, when an item is added or removed, the content is changed, so... UnityAction <CSSItem> contentChangeAlert = (CSSItem item) => ContentChanged.Invoke(); ItemAdded.AddListener(contentChangeAlert); ItemRemoved.AddListener(contentChangeAlert); }
protected virtual void Handle(ContentChanged evnt) { var thread = _entityManager.GetById<ThreadEntity>(evnt.Id); _entityManager.UpdateAndSave<ContentChanged>(thread, evnt, x => x.Subject, x => x.Body, x => x.Marks); }
private static IntPtr WinProc(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam, ref bool handled) { if (msg == InteropValues.WM_CLIPBOARDUPDATE) { ContentChanged?.Invoke(); } return(IntPtr.Zero); }
private void Control_ContentChanged(object sender, EventArgs e) { if (ChangedCells.Count > 0) { ContentChanged?.Invoke(ChangedCells); ChangedCells.Clear(); } }
public void Reset() { foodObject.SetActive(false); hasFood = false; content = null; // trigger plate content changed event for UI ContentChanged?.Invoke(content); }
protected virtual void Handle(ContentChanged evnt) { var thread = _entityManager.GetById <ThreadEntity>(evnt.Id); _entityManager.UpdateAndSave <ContentChanged>(thread, evnt, x => x.Subject, x => x.Body, x => x.Marks); }
protected void NotifyParentContentChange() { if (IsLoading) { return; } ContentChanged?.Invoke(this, new EventArgs()); }
private void Handle(ContentChanged evnt) { using (var conn = _connectionFactory.OpenConnection()) { conn.Update( new { Subject = evnt.Subject, Body = evnt.Body, Marks = evnt.Marks }, new { Id = evnt.Id }, "EventSourcing_Sample_Thread"); } }
private void fireContentChangedEvent() { if (ContentRender != null && ContentRender is BrailleIO.Renderer.ICacheingRenderer) { ((BrailleIO.Renderer.ICacheingRenderer)ContentRender).ContentOrViewHasChanged(this, GetContent()); } if (ContentChanged != null) { ContentChanged.Invoke(this, null); } }
private void OnClipboardContentChanged(object sender, object e) { if (isWindowActive) { isClipboardContentChangedPending = false; ContentChanged?.Invoke(this, EventArgs.Empty); } else { isClipboardContentChangedPending = true; } }
/// <summary> /// 保存数据内容 /// </summary> /// <param name="sender">事件发送者</param> /// <param name="e">事件</param> private void UpdateMod_button_Click(object sender, EventArgs e) { bool bRetCode = false; if (treeView.SelectedNode == null) { return; } switch (treeView.SelectedNode.Level) { case 0: { bRetCode = true; break; } case 1: // 保存模块信息 { if(treeView.SelectedNode.Nodes.Count == 0) // 无效的模块信息 { bRetCode = false; break; } if (this.comboBoxEx1.Tag != null && this.comboBoxEx1.Text.Trim() != string.Empty) { bRetCode = SaveModContain(false); } else { bRetCode = true; } break; } case 2: // 保存分页信息 { bRetCode = SaveTabContain(false); break; } default: // 保存属性信息 { bRetCode = SaveFieldContain(false); break; } } m_ContentChanged = ContentChanged.none; if (bRetCode == false) { m_Node = treeView.SelectedNode; PostMessage(this.Handle, WM_RESET_SELECTED_NODE, IntPtr.Zero, ""); } else { MessageBox.Show("数据更新成功!"); } }
/// <summary> /// 选中结点改变之前的处理 /// </summary> /// <param name="sender">事件发送者</param> /// <param name="e">事件</param> private void treeView_BeforeSelect(object sender, TreeViewCancelEventArgs e) { bool bRetCode = false; if(treeView.SelectedNode == null) { return; } switch(treeView.SelectedNode.Level) { case 0: { bRetCode = true; break; } case 1: // 保存模块信息 { if(m_ContentChanged == ContentChanged.model) // 模块信息发生变化 { if (this.comboBoxEx1.Tag != null && this.comboBoxEx1.Text.Trim() != string.Empty) bRetCode = SaveModContain(false); else bRetCode = true; } else { bRetCode = true; } break; } case 2: // 保存分页信息 { if(m_ContentChanged == ContentChanged.tab) // 分页信息发生变化 { bRetCode = SaveTabContain(false); } else { bRetCode = true; } break; } default: // 保存属性信息 { if(m_ContentChanged == ContentChanged.field) // 属性信息发生变化 { bRetCode = SaveFieldContain(false); } else { bRetCode = true; } break; } } m_ContentChanged = ContentChanged.none; if (bRetCode == false) { m_Node = treeView.SelectedNode; PostMessage(this.Handle, WM_RESET_SELECTED_NODE, IntPtr.Zero, ""); } }
/// <summary> /// 检查所有的控件是否值发生变化 /// </summary> private void CheckChange(object sender, EventArgs e) { if(lockCheckChange) // 锁定检查内容是否修改 { return; } TreeNode currentNode = treeView.SelectedNode; // 当前选中的树结点 if(currentNode != null) { switch(currentNode.Level) { case 0: // 新家模块结点 { break; } case 1: // 模块结点 { m_ContentChanged = ContentChanged.model; break; } case 2: // tab页结点 { m_ContentChanged = ContentChanged.tab; break; } case 3: // 属性结点 { m_ContentChanged = ContentChanged.field; break; } default: // 默认处理 { m_ContentChanged = ContentChanged.field; break; } } } }
/// <summary> /// 保存当前内容 /// </summary> /// <param name="selectNode">选中的结点</param> private void FillTabContain(TreeNode selectNode) { if(selectNode == null) { return; } switch (selectNode.Level) { case 0: // 模块编辑 this.tabControlPanel1.Enabled = false; this.tabControlPanel2.Enabled = false; this.tabControlPanel3.Enabled = false; break; case 1: // 选择模块 this.tabControl1.SelectedTabIndex = 0; this.tabControlPanel1.Enabled = true; this.tabControlPanel2.Enabled = false; this.tabControlPanel3.Enabled = false; break; case 2: // 选择分页 this.tabControl1.SelectedTabIndex = 1; this.tabControlPanel1.Enabled = false; this.tabControlPanel2.Enabled = false; this.tabControlPanel3.Enabled = true; break; case 3: // 选择属性 this.tabControl1.SelectedTabIndex = 2; this.tabControlPanel1.Enabled = false; this.tabControlPanel2.Enabled = true; this.tabControlPanel3.Enabled = false; break; default: // 选择属性 this.tabControl1.SelectedTabIndex = 2; this.tabControlPanel1.Enabled = false; this.tabControlPanel2.Enabled = true; this.tabControlPanel3.Enabled = false; break; } lockCheckChange = true; // 锁定检查是否修改内容 switch(selectNode.Level) { case 1: { try { TreeNode childNode = selectNode.FirstNode; if(!selectionChanged) { FillMainTableComboBox(); } // 刷新'编辑模块'标签页内容 DataRow row = null; if (childNode != null) { row = m_ModelTabDefTable.Rows.Find(childNode.Text); } else { row = row = m_ModelTabDefTable.Rows.Find(selectNode.Tag.ToString().Trim()); } if (row != null && tabControlPanel1.Enabled) { this.labelDebug.Text = "Mod ID"; this.textDebug.Text = selectNode.Tag.ToString().Trim(); if(!selectionChanged) { lockSelection = true; this.comboBoxEx1.Text = childNode.Tag.ToString().Trim(); lockSelection = false; this.comboBoxEx1.Tag = childNode.Tag.ToString().Trim(); } selectionChanged = false; FillDisplayFieldComboBox(childNode.Tag.ToString().Trim()); this.DisplayField_comboBox.Tag = row["display_field"].ToString().Trim(); this.DisplayField_comboBox.Text = row["display_field"].ToString().Trim(); this.FieldNames.Items.Clear(); this.SelectedNames.Items.Clear(); string tablename = childNode.Tag.ToString().Trim(); string catfields = row["catfields"].ToString().Trim(); string[] fieldnames = catfields.Split(new char[] { '\r', '\n', ',', ' ' }, StringSplitOptions.RemoveEmptyEntries); foreach (string name in fieldnames) { this.SelectedNames.Items.Add(name); } string sqltxt; if (tablename.Contains(".")) { string[] strArr = tablename.Split(new char[] { '.' }); string svrName = strArr[0]; string dbName = strArr[1]; string _tblname = strArr[3]; sqltxt = string.Format("SELECT name FROM {0}.{2}.dbo.syscolumns WHERE id = (SELECT id from {0}.{2}.dbo.sysobjects WHERE name = '{1}') order by name asc", svrName, _tblname, dbName); } else { sqltxt = string.Format("SELECT name FROM syscolumns WHERE id = object_id(\'{0}\') order by name asc", tablename); } //DataTable ColumnsTable = Helper.GetDataTable(sqltxt, m_conn); DataTable ColumnsTable = Helper.GetDataTableWithSqlProxy("syscolumns", sqltxt, m_conn); foreach (DataRow colomnRow in ColumnsTable.Rows) { string colomnName = colomnRow[0].ToString().Trim(); bool bSelected = false; foreach (string selectedfield in fieldnames) { if (colomnName.ToLower() == selectedfield.ToLower()) { bSelected = true; break; } } if (!bSelected) this.FieldNames.Items.Add(colomnName); } this.SelectedNames.Tag = row["catfields"].ToString().Trim(); } else { this.TabName_text.Tag = null; this.TabName_text.Text = null; if (modelTable[selectNode] != null) { lockSelection = true; this.comboBoxEx1.Text = modelTable[selectNode].ToString().Trim(); lockSelection = false; } FillDisplayFieldComboBox(this.comboBoxEx1.Text); DisplayField_comboBox.Text = ""; this.FieldNames.Items.Clear(); foreach(object o in DisplayField_comboBox.Items) { this.FieldNames.Items.Add(o); } this.SelectedNames.Items.Clear(); } } catch (Exception exp) { MessageBox.Show(exp.Message); } break; } case 2: //编辑标签页 { DataRow row = m_ModelTabDefTable.Rows.Find(selectNode.Text); this.TabName_text.Tag = selectNode.Text; this.TabName_text.Text = selectNode.Text; this.labelDebug.Text = "Mod Tab ID:"; if (row != null) { this.textDebug.Text = row["modtabid"].ToString().Trim(); } this.MainTable_comboBox.Text = selectNode.Tag.ToString(); this.MainTable_comboBox.Tag = selectNode.Tag.ToString(); //检查自定义标签页 this.checkboxCustomTab.Checked = false; if (row["custom_tab"] != DBNull.Value) { this.checkboxCustomTab.Checked = (row["custom_tab"].ToString().Trim() == "1"); } break; } default: // level >= 3 { // 刷新'编辑字段'标签页内容 DataRow row = m_DicMetaInfoTable.Rows.Find(new object[] { (int)selectNode.Tag }); if (row != null && tabControlPanel2.Enabled) { this.labelDebug.Text = "Field ID:"; this.textDebug.Text = row["fieldid"].ToString(); this.MainTable_text.Tag = selectNode.Tag; // 一条记录在表元里对应的fieldid this.MainTable_text.Text = row["tablename"].ToString().Trim(); this.FieldName_text.Text = row["fieldname"].ToString().Trim(); this.FieldCNName_Text.Text = row["fieldcnname"].ToString().Trim(); this.catname_comboBox.Text = row["catname"].ToString().Trim(); this.descriptiontxt.Text = row["description"].ToString().Trim(); string strFieldType = row["fieldtype"].ToString().Trim(); this.ReadOnly_checkBoxX.Checked = row["readonly"].ToString().ToLower() == "true"; this.CHKHide.Checked = row["visible"].ToString().ToLower() == "false"; if (strFieldType == "1") { Filters_groupBox.Enabled = true; Filters_groupBox.Visible = true; sortType_Combox.Enabled = true; sortType_Combox.Visible = true; this.FieldName_text.Enabled = true; string strFilters = row["subtablefilter"].ToString().Trim(); string[] strValues = strFilters.Split(new char[] { ';', '\r', '\n', ' ' }, StringSplitOptions.RemoveEmptyEntries); FilterListBox.Items.Clear(); for (int i = 0; i < strValues.Length; ++i) { FilterListBox.Items.Add(strValues[i]); } string strTableName = ""; if (treeView.SelectedNode.Level == 3) { int nModTabID = (int)row["modtabid"]; DataRow[] modRows = m_ModelTabDefTable.Select("modtabid = " + nModTabID); if (modRows.Length == 0) return; strTableName = modRows[0]["tablename"].ToString().Trim(); } else { TreeNode parentNode = treeView.SelectedNode.Parent; int nFieldID = (int)parentNode.Tag; DataRow[] parentRows = m_DicMetaInfoTable.Select("fieldid = " + nFieldID); if (parentRows.Length == 0) return; strTableName = parentRows[0]["tablename"].ToString().Trim(); } string strSQL; if (strTableName.Contains(".")) { string[] strArr = strTableName.Split(new char[] { '.' }); string svrName = strArr[0]; string dbName = strArr[1]; string _tblname = strArr[3]; strSQL = string.Format("SELECT name FROM {0}.{2}.dbo.syscolumns WHERE id = (SELECT id from {0}.{2}.dbo.sysobjects WHERE name = '{1}')", svrName, _tblname, dbName); } else { strSQL = string.Format("SELECT name FROM syscolumns WHERE id = object_id(\'{0}\')", strTableName); } string[] names = new string[] { "syscolumns", "sysobjects" }; //DataTable mainTableFields = Helper.GetDataTable(strSQL, m_conn); DataTable mainTableFields = Helper.GetDataTableWithSqlProxy(names, strSQL, m_conn); if (mainTableFields == null) return; MainTableFieldsComboBox.Items.Clear(); foreach (DataRow mainfield in mainTableFields.Rows) { MainTableFieldsComboBox.Items.Add(mainfield["name"].ToString().Trim()); } //strSQL = string.Format("SELECT name FROM syscolumns WHERE id = object_id(\'{0}\')", this.MainTable_text.Text); if (this.MainTable_text.Text.Contains(".")) { string[] strArr = this.MainTable_text.Text.Split(new char[] { '.' }); string svrName = strArr[0]; string dbName = strArr[1]; string _tblname = strArr[3]; strSQL = string.Format("SELECT name FROM {0}.{2}.dbo.syscolumns WHERE id = (SELECT id from {0}.{2}.dbo.sysobjects WHERE name = '{1}')", svrName, _tblname, dbName); } else { strSQL = string.Format("SELECT name FROM syscolumns WHERE id = object_id(\'{0}\')", this.MainTable_text.Text); } //DataTable subTableFields = Helper.GetDataTable(strSQL, m_conn); DataTable subTableFields = Helper.GetDataTableWithSqlProxy(names, strSQL, m_conn); if (subTableFields == null) return; SubTableFieldsComboBox.Items.Clear(); foreach (DataRow subField in subTableFields.Rows) { SubTableFieldsComboBox.Items.Add(subField["name"].ToString().Trim()); } } else { Filters_groupBox.Enabled = false; Filters_groupBox.Visible = false; sortType_Combox.Enabled = false; sortType_Combox.Visible = false; FieldName_text.Enabled = true; } lSortType.Visible = sortType_Combox.Visible; FillCatName(); int nEditorTypeID = 0; string strEditorType = row["editortype"].ToString().Trim(); for (nEditorTypeID = 0; nEditorTypeID < EditorTypeEn.Length; nEditorTypeID++) { if (string.Compare(strEditorType, EditorTypeEn[nEditorTypeID]) == 0) break; } if (nEditorTypeID >= EditorTypeEn.Length) nEditorTypeID = 0; this.EditorType_comboBox.SelectedIndex = nEditorTypeID; int nSortType = row["sorttype"] == DBNull.Value ? 0 : Convert.ToInt32(row["sorttype"].ToString()); this.sortType_Combox.SelectedIndex = nSortType; switch (strEditorType) { case "filename": txtBoxRelativePath.Text = row["relativepath"].ToString().Trim(); txtBoxCutRelativePath.Text = row["cutrelativepath"].ToString().Trim(); chkCutSlash.Checked = (row["cutpreslash"] == null || row["cutpreslash"] == DBNull.Value) ? true : Convert.ToBoolean(row["cutpreslash"]); LookUpCombo_groupBox.Enabled = false; LookUpCombo_groupBox.Visible = false; TextCombo_groupBox.Enabled = false; TextCombo_groupBox.Visible = false; FileName_groupBox.Enabled = true; FileName_groupBox.Visible = true; break; case "lookupcombo": listtable_comboBox.Text = row["listtable"].ToString().Trim(); RefreshKeyfiedAndListfield(); keyfield_comboBox.Text = row["keyfield"].ToString().Trim(); listfield_comboBox.Text = row["listfield"].ToString().Trim(); listconditiontxt.Text = row["listcondition"].ToString().Trim(); listexfields.Text = row["listexfields"].ToString().Trim(); LookUpCombo_groupBox.Enabled = true; LookUpCombo_groupBox.Visible = true; TextCombo_groupBox.Enabled = false; TextCombo_groupBox.Visible = false; FileName_groupBox.Enabled = false; FileName_groupBox.Visible = false; break; case "textcombo": txtBoxListValues.Text = row["listvalues"].ToString().Trim(); LookUpCombo_groupBox.Enabled = false; LookUpCombo_groupBox.Visible = false; TextCombo_groupBox.Enabled = true; TextCombo_groupBox.Visible = true; FileName_groupBox.Enabled = false; FileName_groupBox.Visible = false; break; default: LookUpCombo_groupBox.Enabled = false; LookUpCombo_groupBox.Visible = false; TextCombo_groupBox.Enabled = false; TextCombo_groupBox.Visible = false; FileName_groupBox.Enabled = false; FileName_groupBox.Visible = false; break; } } break; } } m_ContentChanged = ContentChanged.none; lockCheckChange = false; }