void CSTreeView_SelectedNodeChanging(object sender, RadTreeViewCancelEventArgs e) { if (BeforeSelect == null) { return; } TreeViewCancelEventArgs e2 = new TreeViewCancelEventArgs( new TreeNode(), false, System.Windows.Forms.TreeViewAction.Expand); e2.Node.Name = e.Node.Name; e2.Node.Text = e.Node.Text; e2.Node.Tag = e.Node.Tag; TreeView tv = MakeFakeTreeLevel(e.Node.Level, e2.Node); BeforeSelect(sender, e2); e.Cancel = e2.Cancel; e.Node.Text = e2.Node.Text; tv.Dispose(); }
private void radTreeViewResource_NodeCheckedChanging(object sender, RadTreeViewCancelEventArgs e) { if (rdCurrentPermission.Checked) { e.Cancel = true; } }
private void radTreeView1_NodeExpandedChanging(object sender, RadTreeViewCancelEventArgs e) { RadTreeNodeCollection nodes = e.Node.Nodes; foreach (RadTreeNode node in nodes) { node.ImageIndex = node.Level; } }
private void trvWorkspace_SelectedNodeChanging(object sender, RadTreeViewCancelEventArgs e) { if ((e.Node == null) || (!e.Node.Text.ToUpper().Equals(Program.LanguageDefault.DictionaryWorkspace["workspace"].ToUpper()))) { return; } e.Cancel = true; return; }
private void trvChucNang_SelectedNodeChanging(object sender, RadTreeViewCancelEventArgs e) { e.Cancel = true; var tag = e.Node.Tag; if (tag == null) { return; } string tabTag = ""; BaseControl.ControlBase control = null; switch (tag.ToString()) { case "Add": tabTag = "addNhanSu"; control = new NhanSu.ctrlThemMoi(); break; case "Edit": break; case "Delete": break; case "Contract": break; case "Education": break; case "Family": break; } AddPageToTab(tabTag, control); }
private void radTreeView1_NodeExpandedChanging(object sender, RadTreeViewCancelEventArgs e) { var nodes = e.Node.Nodes; if (e.Node.Level == 0) e.Node.Image = _level[0]; foreach (var node in nodes) { switch (node.Level) { case 0: node.Image = _level[0]; break; case 1: node.Image = _level[1]; break; default: node.Image = _level[2]; break; } } }
private void scenarioConfigurationTreeView_ConfigurationObjectSelectionChanging(object sender, RadTreeViewCancelEventArgs e) { if (dataEditPanel.Controls.Count <= 0) { return; } var control = dataEditPanel.Controls[0] as IScenarioConfigurationControl; var metadataEditor = control as WorkerActivityMetadataControl; if (metadataEditor != null) { // This control tracks its own unsaved changes if (metadataEditor.HasUnsavedChanges) { DialogResult result = MessageBox.Show("You have unsaved changes. Would you like to save?", "Unsaved Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { bool saveResult = SaveChanges(); if (saveResult) { metadataEditor.HasUnsavedChanges = false; } else { e.Cancel = true; } } } } else { control.FinalizeEdit(); // If there are objects that have been added or removed, ask the user to explicitly save them or discard them // BJM - Ideally we would be able to auto save after this message, but this causes issues with updating the tree view if (_enterpriseTestUIController.HasAddedOrRemovedObjects) { DialogResult result = MessageBox.Show("One or more configuration objects have been added or removed. " + "If these changes are not saved before navigating away, they will be discarded.\n\n" + "Click Yes to return to the previous screen so you can save your changes, or click No to discard the changes.", "Unsaved Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (result == DialogResult.Yes) { e.Cancel = true; } } // If there are unsaved edits, prompt user to save before navigating away else if (_enterpriseTestUIController.HasUnsavedChanges) { DialogResult result = MessageBox.Show("You have unsaved changes. Would you like to save?", "Unsaved Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { bool saveResult = SaveChanges(); if (saveResult == false) { e.Cancel = true; } } } } }
private void radTreeViewResource_NodeCheckedChanging(object sender, RadTreeViewCancelEventArgs e) { e.Cancel = true; }
private void radTreeViewResource_SelectedNodeChanging(object sender, RadTreeViewCancelEventArgs e) { }
void radTreeView1_SelectedNodeChanging(object sender, RadTreeViewCancelEventArgs e) { e.Cancel = this.internalUpdate; }
private void trvAccounts_SelectedNodeChanging(object sender, RadTreeViewCancelEventArgs e) { }
void radTreeView1_NodeExpandedChanging(object sender, RadTreeViewCancelEventArgs e) { AddEventRoot("NodeExpandedChanging"); }
void radTreeView1_Selecting(object sender, RadTreeViewCancelEventArgs e) { AddEventRoot("Selecting"); }
private void EventSelectedNodeChanging(object sender, RadTreeViewCancelEventArgs e) { e.Cancel = !Manager.UiControl.FlagAllowChangeSelectedItem; }
private void trvChucNang_SelectedNodeChanging(object sender, RadTreeViewCancelEventArgs e) { e.Cancel = true; var tag = e.Node.Tag; if (tag == null) { return; } string tabTag = ""; BaseControl.ControlBase control = null; switch (tag.ToString()) { case "Add": tabTag = "addNhanSu"; control = new NhanSu.ctrlThemMoi(); break; case "Edit": break; case "Delete": break; case "Contract": break; case "Education": break; case "Family": break; } AddPageToTab(tabTag, control); }