private void CreateNodesFor(ITestAssembly ta, int assemblyNodePosition) { TestFixtureInfoCollection tests = ta.TestFixtureInfos; SmartTreeNode root = CreateOrFindAssemblyNode(ta, assemblyNodePosition); foreach (TestFixtureInfo tf in tests) { SmartTreeNode classNode = CreateOrFindClassNode(ta, root.Nodes, tf.FullName.Split(new char[] { '.', '+' }), 0); classNode.Tag = new UiElementInfo(ta, tf, null); classNode.ImageIndex = 2; foreach (TestMethodInfo tm in tf.TestMethods) { SmartTreeNode methodNode = CreateOrFindMethodNode(classNode.Nodes, tm); methodNode.Tag = new UiElementInfo(ta, tf, tm); } } TreeViewEventHandler temp = AfterSelect; AfterSelect = null; try { RestoreCheckState(root); SetCheckedStatus(_treeTestHierarchy.Nodes); } finally { AfterSelect = temp; } if (_config.AutoExpandTestHierarchy) { root.ExpandAll(); } }
/// <summary> /// Constructor /// </summary> protected BaseTreeView() : base() { BeforeSelect += new TreeViewCancelEventHandler(BeforeSelectHandler); AfterSelect += new TreeViewEventHandler(AfterSelectHandler); DoubleClick += new EventHandler(DoubleClickHandler); ItemDrag += new ItemDragEventHandler(ItemDragHandler); DragEnter += new DragEventHandler(DragEnterHandler); DragDrop += new DragEventHandler(DragDropHandler); AllowDrop = true; BeforeExpand += new TreeViewCancelEventHandler(BeforeExpandHandler); BeforeCollapse += new TreeViewCancelEventHandler(BeforeCollapseHandler); AfterLabelEdit += new NodeLabelEditEventHandler(LabelEditHandler); LabelEdit = true; HideSelection = false; ImageList = new ImageList(); ImageList.Images.Add(GUI.Properties.Resources.file); ImageList.Images.Add(GUI.Properties.Resources.folder_closed); ImageList.Images.Add(GUI.Properties.Resources.folder_opened); ImageList.Images.Add(GUI.Properties.Resources.req_icon); ImageList.Images.Add(GUI.Properties.Resources.model_icon); ImageList.Images.Add(GUI.Properties.Resources.test_icon); ImageIndex = 0; FileImageIndex = 0; ClosedFolderImageIndex = 1; ExpandedFolderImageIndex = 2; RequirementImageIndex = 3; ModelImageIndex = 4; TestImageIndex = 5; }
/// <summary> /// Creates new instance of the TreeSource for the specifed relation /// </summary> /// <param name="relation">Fuzzy relation to represent as a hierarchical list</param> /// <param name="inputs">Set of specified values for particular dimensions.</param> /// <param name="variableDimension">Dimension which should be put on the x-axis. Null if we don't want to display graphs, or if we only want to display graphs for single-diemnsional sets.</param> public TreeSource(FuzzyRelation relation, Dictionary<IDimension, System.Decimal> inputs, IDimension variableDimension) { _relation = relation; _inputs = inputs; _variableDimension = variableDimension; treeView_AfterSelect_EventHandler = new TreeViewEventHandler(treeView_AfterSelect); }
/// <summary> /// Creates new instance of the TreeSource for the specifed relation /// </summary> /// <param name="relation">Fuzzy relation to represent as a hierarchical list</param> /// <param name="inputs">Set of specified values for particular dimensions.</param> /// <param name="variableDimension">Dimension which should be put on the x-axis. Null if we don't want to display graphs, or if we only want to display graphs for single-diemnsional sets.</param> public TreeSource(FuzzyRelation relation, Dictionary <IDimension, System.Decimal> inputs, IDimension variableDimension) { _relation = relation; _inputs = inputs; _variableDimension = variableDimension; treeView_AfterSelect_EventHandler = new TreeViewEventHandler(treeView_AfterSelect); }
/// <summary> /// The on after select changed. /// </summary> /// <param name="e"> /// The e. /// </param> /// <param name="eventHandler"> /// The event handler. /// </param> protected virtual void OnAfterSelectChanged(TreeViewEventArgs e, TreeViewEventHandler eventHandler) { if (eventHandler != null) { eventHandler(this, e); } }
/// <summary> /// Creates new instance of the TreeSource for the specifed relation /// </summary> /// <param name="deffuzification">Relation wrapped in a deffuzification. In this case, the hierarchy will also contain information about applied deffuzification.</param> public TreeSource(FuzzyFramework.Defuzzification.Defuzzification deffuzification) { _relation = deffuzification.Relation; _deffuzification = deffuzification; _inputs = deffuzification.Inputs; _variableDimension = deffuzification.OutputDimension; treeView_AfterSelect_EventHandler = new TreeViewEventHandler(treeView_AfterSelect); }
/// <summary> /// Creates new instance of the TreeSource for the specifed relation /// </summary> /// <param name="deffuzification">Relation wrapped in a deffuzification. In this case, the hierarchy will also contain information about applied deffuzification.</param> public TreeSource(FuzzyFramework.Defuzzification.Defuzzification deffuzification) { _relation = deffuzification.Relation; _deffuzification = deffuzification; _inputs = deffuzification.Inputs; _variableDimension = deffuzification.OutputDimension; treeView_AfterSelect_EventHandler = new TreeViewEventHandler(treeView_AfterSelect); }
/// <summary> /// 对树进行操作 /// </summary> public void Operate(PanelDockContainer pdc, TreeViewEventHandler afterselect, TreeViewCancelEventHandler beforeselect, NodeLabelEditEventHandler beforelabeledit, NodeLabelEditEventHandler afterlabeledit) { //tree.ContextMenuStrip = this.contextMenuStrip1; PDC = pdc; this.afterSelect = afterselect; this.beforeSelect = beforeselect; this.beforeLabelEdit = beforelabeledit; this.afterLabelEdit = afterlabeledit; }
/// <summary> /// 对树进行操作 /// </summary> public void Operate(PanelDockContainer pdc, TreeViewEventHandler afterselect, TreeViewCancelEventHandler beforeselect, NodeLabelEditEventHandler beforelabeledit, NodeLabelEditEventHandler afterlabeledit) { //tree.ContextMenuStrip = this.contextMenuStrip1; PDC = pdc; this.afterSelect = afterselect; this.beforeSelect = beforeselect; this.beforeLabelEdit = beforelabeledit; this.afterLabelEdit = afterlabeledit; }
protected virtual void OnBeforeDeselect(TreeViewEventArgs e) { TreeViewEventHandler handler = BeforeDeselect; if (handler != null) { handler(this, e); } }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// treevieweventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this TreeViewEventHandler treevieweventhandler, Object sender, TreeViewEventArgs e, AsyncCallback callback) { if (treevieweventhandler == null) { throw new ArgumentNullException("treevieweventhandler"); } return(treevieweventhandler.BeginInvoke(sender, e, callback, null)); }
public UCUsers() { this.InitializeComponent(); this.lvwUser.SmallImageList = this.tvwOrg.ImageList = this.toolStrip1.ImageList = ClientData.MyImageList.imageList; this.btnOrg.ImageIndex = ClientData.MyImageList.GetIconIndex("ICO_RSP_ORG"); this.btnUser.ImageIndex = ClientData.MyImageList.GetIconIndex("ICO_RSP_USER"); this.selectOrg = new TreeViewEventHandler(this.tvwOrg_AfterSelect); this.DisplayUsers(); }
public DocumentTreeView() { try { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DocumentTreeView)); // get image for tree ImageList = new ImageList(); System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(GetType()); ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("CLSDFOLD"))); // 0 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("OPENFOLD"))); // 1 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("COMPONENT"))); // 2 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("DOC"))); // 3 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("DXF"))); // 4 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("PDF"))); // 5 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("STARTPAGE"))); // 6 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("DOWNLOAD"))); // 7 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("AI"))); // 8 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("IMAGE"))); // 9 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("MSWORD"))); // 10 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("MSEXCEL"))); // 11 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("MSPPT"))); // 12 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("WRITER"))); // 13 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("CALC"))); // 14 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("ARD"))); // 15 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("ROOT"))); // 16 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("PICADOR3D"))); // 17 // events AfterExpand += new TreeViewEventHandler(DocumentTreeView_AfterExpand); AfterSelect += new TreeViewEventHandler(DocumentTreeView_AfterSelect); MouseDown += new MouseEventHandler(DocumentTreeView_MouseDown); this.AllowDrop = true; ItemDrag += new ItemDragEventHandler(DocumentTreeView_ItemDrag); DragEnter += new DragEventHandler(DocumentTreeView_DragEnter); DragOver += new DragEventHandler(DocumentTreeView_DragOver); DragDrop += new DragEventHandler(DocumentTreeView_DragDrop); NodeDropped += new NodeDroppedHandler(DocumentTreeView_NodeDropped); // show tool tips ShowNodeToolTips = true; // allow drag and drop AllowDrop = true; } catch (Pic.DAL.SQLite.ExceptionDAL ex) { Debug.Fail(ex.ToString()); _log.Debug(ex.ToString()); } catch (Exception ex) { Debug.Fail(ex.ToString()); _log.Debug(ex.ToString()); } }
// Add new section nodes to the tree private void TreeNodeAdded(ObjectAddedEventArgs <urakawa.core.TreeNode> e) { if (e.m_AddedObject is SectionNode) { // ignore the selection of the new tree node AfterSelect -= new TreeViewEventHandler(TOCTree_AfterSelect); CreateTreeNodeForSectionNode((SectionNode)e.m_AddedObject); AfterSelect += new TreeViewEventHandler(TOCTree_AfterSelect); } }
public void RemoveEventHandler(string eventType, TreeViewEventHandler handler) { if (eventType.Equals("AfterCheck")) { TreeView_Explorer.AfterCheck -= handler; } else { throw new NotImplementedException(); } }
public ObjectsTreeView(string nam) { Name = nam; DrawMode = TreeViewDrawMode.OwnerDrawAll; DrawNode += new DrawTreeNodeEventHandler(MyDrawNode); AfterExpand += new TreeViewEventHandler(OnAfterExpand); AfterCollapse += new TreeViewEventHandler(OnAfterCollapse); BorderStyle = BorderStyle.None; ShowLines = false; ShowRootLines = false; Indent = 0; }
public EntitiesTreeView() { CheckBoxes = true; FullRowSelect = true; Location = new System.Drawing.Point(7, 19); Name = "tvMovies"; ShowLines = false; ShowPlusMinus = false; Size = new System.Drawing.Size(138, 229); TabIndex = 15; AfterCheck += new TreeViewEventHandler(tvMovies_AfterCheck); }
// The method that initiates the loading of a tree.. public void LoadTree(DataSet dataSet, TableBinding[] tableBindings) { // See the TableBinding class for description... _tableBindings = tableBindings; // Always start with an empty TreeView _treeView.Nodes.Clear(); // There are three events we are going to handle.. // 1. When the currency manager changes position (this may be initiated from other controls) handlerPositionChanged = new EventHandler(cm_PositionChanged); // 2. When our treeview's nodes are selected manually, we'll want to update the currency managers handlerAfterSelect = new TreeViewEventHandler(tv_AfterSelect); // 3. When data is changed we'll need to update the treeview display handlerListChanged = new ListChangedEventHandler(cm_ListChanged); // This wires and unwires the PositionChanged event for the currency managers SetEvents(dataSet, false); // We will start loading from all the "Parent" tables in the DataSet foreach (DataTable dt in dataSet.Tables) { // If this is a "Parent Only" table (no ancestors) if (dt.ParentRelations.Count == 0) { // Add the parent nodes and it's children AddParentNodes(dt, _treeView.Nodes); } } // Wire back up the PositionChanged events SetEvents(dataSet, true); // Wire up the AfterSelect for our newly loaded TreeView _treeView.AfterSelect += handlerAfterSelect; // Start the UI with the first node selected. if (_treeView.Nodes.Count > 0) { _treeView.SelectedNode = _treeView.Nodes[0]; TreeNode node = _treeView.SelectedNode; // Since the child lists (IBindingList) are always changing, handle the ListChanged for each while (node.Nodes.Count > 0) { ((IBindingList)((BoundTreeNode)node.Nodes[0]).CurrencyManager.List).ListChanged -= handlerListChanged; ((IBindingList)((BoundTreeNode)node.Nodes[0]).CurrencyManager.List).ListChanged += handlerListChanged; node = node.Nodes[0]; } } }
public WorkplaceExplorer(Workbench workbench) : base(workbench) { InitializeComponent(); nodeWorkplace = new TreeNode("Workplace"); nodeWorkplace.ImageKey = ".workplace"; nodeWorkplace.SelectedImageKey = ".workplace"; nodeWorkplace.ContextMenuStrip = workplaceContextMenu; Workbench.WorkplaceOpened += new EventHandler(Workbench_WorkplaceChanged); Workbench.WorkplaceClosed += new EventHandler(Workbench_WorkplaceChanged); SelectionChanged += new TreeViewEventHandler(WorkplaceExplorer_SelectionChanged); }
public WorkplaceExplorer(Workbench workbench) : base(workbench) { InitializeComponent(); nodeWorkplace = new TreeNode("Workplace"); nodeWorkplace.ImageKey = ".workplace"; nodeWorkplace.SelectedImageKey = ".workplace"; nodeWorkplace.ContextMenuStrip = workplaceContextMenu; Workbench.WorkplaceOpened += new EventHandler(Workbench_WorkplaceChanged); Workbench.WorkplaceClosed += new EventHandler(Workbench_WorkplaceChanged); SelectionChanged += new TreeViewEventHandler(WorkplaceExplorer_SelectionChanged); }
public Class1(PanelDockContainer pdc, TreeViewEventHandler afterselect, TreeViewCancelEventHandler beforeselect, NodeLabelEditEventHandler beforelabeledit, NodeLabelEditEventHandler afterlabeledit, SqlConnection conn) { m_OldForm = null; m_PDC = pdc; this.afterSelect = afterselect; this.beforeSelect = beforeselect; this.beforeLabelEdit = beforelabeledit; this.afterLabelEdit = afterlabeledit; m_Conn = conn; // helper = new Helper(); Helper.Conn = m_Conn; Helper.adp_hash = new Hashtable(); }
public Class1(PanelDockContainer pdc, TreeViewEventHandler afterselect, TreeViewCancelEventHandler beforeselect, NodeLabelEditEventHandler beforelabeledit, NodeLabelEditEventHandler afterlabeledit, SqlConnection conn) { m_OldForm = null; m_PDC = pdc; this.afterSelect = afterselect; this.beforeSelect = beforeselect; this.beforeLabelEdit = beforelabeledit; this.afterLabelEdit = afterlabeledit; m_Conn = conn; // helper = new Helper(); Helper.Conn = m_Conn; Helper.adp_hash = new Hashtable(); }
/// <summary> /// Collapse時にメッセージボックスを表示する /// </summary> /// <param name="treeView">ツリービュー</param> static void TreeViewAfterCollapse(TreeView treeView) { TreeViewEventHandler handler = null; handler = delegate { MessageBox.Show(""); treeView.BeginInvoke((MethodInvoker) delegate { treeView.AfterCollapse -= handler; }); }; treeView.AfterCollapse += handler; }
/* Abstract Functions for the outliner */ public void SetEventHandler(string eventType, TreeViewEventHandler handler) { if (eventType.Equals("AfterSelect")) { treeView1.AfterSelect += handler; } else if (eventType.Equals("AfterCheck")) { treeView1.AfterCheck += handler; } else { throw new NotImplementedException(); } }
/// <summary> /// Constructor for Selector, takes ObjectSelectorEditor /// </summary> public Selector(ObjectSelectorEditor editor) { CreateHandle(); _editor = editor; BorderStyle = BorderStyle.None; FullRowSelect = !editor.SubObjectSelector; Scrollable = true; CheckBoxes = false; ShowPlusMinus = editor.SubObjectSelector; ShowLines = editor.SubObjectSelector; ShowRootLines = editor.SubObjectSelector; AfterSelect += new TreeViewEventHandler(OnAfterSelect); }
public Class1(string tblname, string catfield, PanelDockContainer pdc, TreeViewEventHandler afterselect, TreeViewCancelEventHandler beforeselect, NodeLabelEditEventHandler beforelabeledit, NodeLabelEditEventHandler afterlabeledit, SqlConnection conn) { OldForm = null; TblName = tblname; CatField = catfield; PDC = pdc; this.afterSelect = afterselect; this.beforeSelect = beforeselect; this.beforeLabelEdit = beforelabeledit; this.afterLabelEdit = afterlabeledit; Conn = conn; helper = new Helper(); Helper.Conn = Conn; Helper.adp_hash = new Hashtable(); }
public Class1(string tblname, string catfield, PanelDockContainer pdc, TreeViewEventHandler afterselect, TreeViewCancelEventHandler beforeselect, NodeLabelEditEventHandler beforelabeledit, NodeLabelEditEventHandler afterlabeledit, SqlConnection conn) { OldForm = null; TblName = tblname; CatField = catfield; PDC = pdc; this.afterSelect = afterselect; this.beforeSelect = beforeselect; this.beforeLabelEdit = beforelabeledit; this.afterLabelEdit = afterlabeledit; Conn = conn; helper = new Helper(); Helper.Conn = Conn; Helper.adp_hash = new Hashtable(); }
public void Fill() { BeginUpdate(); string[] drives = Directory.GetLogicalDrives(); for (int i = 0; i < drives.Length; i++) { DirTreeNode dn = new DirTreeNode(drives[i]); dn.ImageIndex = HD; Nodes.Add(dn); } EndUpdate(); BeforeExpand += new TreeViewCancelEventHandler(prepare); AfterCollapse += new TreeViewEventHandler(clear); }
public void Fill() { BeginUpdate(); string[] drives = Directory.GetLogicalDrives(); for (int i = 0; i < drives.Length; i++) { DirTreeNode dn = new DirTreeNode(drives[i]); dn.ImageIndex = HD; Nodes.Add(dn); } EndUpdate(); BeforeExpand += new TreeViewCancelEventHandler(prepare); AfterCollapse += new TreeViewEventHandler(clear); }
public BetterTreeView() { // Setup internal event handlers AllowDrop = true; BeforeExpand += new TreeViewCancelEventHandler(BetterTreeView_BeforeExpand); BeforeCollapse += new TreeViewCancelEventHandler(BetterTreeView_BeforeCollapse); DrawNode += new DrawTreeNodeEventHandler(BetterTreeView_DrawNode); DrawMode = TreeViewDrawMode.OwnerDrawAll; CheckBoxes = true; AfterCheck += new TreeViewEventHandler(BetterTreeView_AfterCheck); ItemDrag += new ItemDragEventHandler(BetterTreeView_ItemDrag); DragOver += new DragEventHandler(BetterTreeView_DragOver); DragDrop += new DragEventHandler(BetterTreeView_DragDrop); DragEnter += new DragEventHandler(BetterTreeView_DragEnter); DragLeave += new EventHandler(BetterTreeView_DragLeave); GiveFeedback += new GiveFeedbackEventHandler(BetterTreeView_GiveFeedback); }
public DocumentTreeView() { InitializeComponent(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DocumentTreeView)); // get image for tree ImageList = new ImageList(); System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(GetType()); ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("CLSDFOLD"))); // 0 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("OPENFOLD"))); // 1 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("COMPONENT"))); // 2 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("DOC"))); // 3 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("DXF"))); // 4 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("PDF"))); // 5 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("AI"))); // 6 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("IMAGE"))); // 7 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("MSWORD"))); // 8 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("MSEXCEL"))); // 9 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("MSPPT"))); // 10 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("WRITER"))); // 11 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("CALC"))); // 12 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("ARD"))); // 13 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("PICADOR3D"))); // 14 ImageList.Images.Add((System.Drawing.Image)(resources.GetObject("ROOT"))); // 15 // events AfterExpand += new TreeViewEventHandler(DocumentTreeView_AfterExpand); AfterSelect += new TreeViewEventHandler(DocumentTreeView_AfterSelect); MouseDown += new MouseEventHandler(DocumentTreeView_MouseDown); this.AllowDrop = true; ItemDrag += new ItemDragEventHandler(DocumentTreeView_ItemDrag); DragEnter += new DragEventHandler(DocumentTreeView_DragEnter); DragOver += new DragEventHandler(DocumentTreeView_DragOver); DragDrop += new DragEventHandler(DocumentTreeView_DragDrop); NodeDropped += new NodeDroppedHandler(DocumentTreeView_NodeDropped); // show tool tips ShowNodeToolTips = true; // allow drag and drop AllowDrop = true; }
public CRUDTreeView(string CRUDName, TEMPO.BusinessObjects.Entity.BusinessEntity[] collection, string[] names) { // name databoth array lenghts must be the same length if (names.Length != collection.Length) { throw new Exception(); } // init the scrolling this.Scrollable = true; // init the images this.ImageList = new ImageList(); ImageList.Images.Add(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.treeview.closed.png")); ImageList.Images.Add(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.treeview.open.png")); ImageList.Images.Add(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.treeview.file.png")); // build the root node root = new TreeNode(CRUDName, 0, 1); this.SelectedNode = root; Nodes.Add(root); // event monitoring AfterSelect += new TreeViewEventHandler(sendBusinessEntity); // tree data treedata = collection; nodes = new TreeNode[treedata.Length]; // build the tree for (int i = 0; i < names.Length; i++) { // build the node nodes[i] = new TreeNode(names[i], 2, 2); // associate the tree data nodes[i].Tag = treedata[i]; // add the node to the root root.Nodes.Add(nodes[i]); } // init the data display root.Expand(); }
public DataTreeView() { InitializeComponent(); parentKeyPropertyName = string.Empty; keyPropertyName = string.Empty; namePropertyName = string.Empty; items_Positions = new SortedList(); items_Identifiers = new SortedList(); selectionChanging = false; FullRowSelect = true; HideSelection = false; HotTracking = true; AfterSelect += new TreeViewEventHandler(dataTreeView_AfterSelect); BindingContextChanged += new EventHandler(dataTreeView_BindingContextChanged); AfterLabelEdit += new NodeLabelEditEventHandler(dataTreeView_AfterLabelEdit); BeforeExpand += new TreeViewCancelEventHandler(dataTreeView_BeforeExpand); BeforeCollapse += new TreeViewCancelEventHandler(dataTreeView_BeforeCollapse); }
private void AddMemberNodes(TreeNode parentTreeNode, Type type, bool deferredLoading) { if (!deferredLoading) { this.AddMemberNodes(parentTreeNode.Nodes, type, parentTreeNode.Name, true); } else { TreeViewCancelEventHandler treeViewCancelEventHandler = null; treeViewCancelEventHandler = delegate(object sender, TreeViewCancelEventArgs e) { if (e.Node == parentTreeNode.Parent) { if (!this.isUpdating) { WaitCursorChanger waitCursorChanger = new WaitCursorChanger(this); this.BeginUpdate(); this.isUpdating = true; TreeViewEventHandler handler = null; handler = delegate { this.EndUpdate(); this.isUpdating = false; waitCursorChanger.Dispose(); this.AfterExpand -= handler; }; this.AfterExpand += handler; } this.AddMemberNodes(parentTreeNode.Nodes, type, parentTreeNode.Name, true); this.BeforeExpand -= treeViewCancelEventHandler; if (!this.isUpdating) { this.EndUpdate(); } } }; this.BeforeExpand += treeViewCancelEventHandler; } }
public 用户信息() { InitializeComponent(); //InitData(); this.c1FlexGrid1.BeforeEdit += new C1.Win.C1FlexGrid.RowColEventHandler(c1FlexGrid1_BeforeEdit); this.c1FlexGrid1.AfterEdit += new C1.Win.C1FlexGrid.RowColEventHandler(c1FlexGrid1_AfterEdit); this.comboBox1.SelectedIndexChanged += new EventHandler(comboBox1_SelectedIndexChanged); this.comboBox2.SelectedIndexChanged += new EventHandler(comboBox2_SelectedIndexChanged); this.textBox6.TextChanged += new EventHandler(textBox1_TextChanged); treeViewEventHandler = new TreeViewCancelEventHandler(treeView1_BeforeSelect); treeViewEventAfterHandler = new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); this.treeView1.BeforeSelect += treeViewEventHandler; this.treeView1.AfterSelect += treeViewEventAfterHandler; allProgramName = new Hashtable(); this.StartPosition = FormStartPosition.CenterScreen; this.TotalRole.HighLight = HighLightEnum.Always; this.TotalUser.HighLight = HighLightEnum.Always; this.c1FlexGrid1.HighLight = HighLightEnum.Always; }
public CRUDTreeViewDS(string CRUDName, DataSet collection, string DisplayMember) { _displaymember = DisplayMember; // init the scrolling this.Scrollable = true; // init the images this.ImageList = new ImageList(); ImageList.Images.Add(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.treeview.closed.png")); ImageList.Images.Add(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.treeview.open.png")); ImageList.Images.Add(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.treeview.file.png")); // build the root node root = new TreeNode(CRUDName, 0, 1); this.SelectedNode = root; Nodes.Add(root); // event monitoring AfterSelect += new TreeViewEventHandler(sendDataSetRow); // tree data _treedata = collection; nodes = new TreeNode[_treedata.Tables[0].Rows.Count]; // build the tree for (int i = 0; i < nodes.Length; i++) { // build the node nodes[i] = new TreeNode(_treedata.Tables[0].Rows[i][_displaymember].ToString(), 2, 2); // associate the tree data nodes[i].Tag = _treedata.Tables[0].Rows[i]; // add the node to the root root.Nodes.Add(nodes[i]); } // init the data display root.Expand(); }
public void Fill() { BeginUpdate(); string[] drives = Directory.GetLogicalDrives(); foreach (string tempDrive in drives) { DirTreeNode dn = new DirTreeNode(tempDrive); Nodes.Add(dn); if (tempDrive.IndexOf("C:\\") != -1) { this.SelectedNode = dn; this.Select(true, true); } } EndUpdate(); BeforeExpand += new TreeViewCancelEventHandler(prepare); AfterCollapse += new TreeViewEventHandler(clear); }
public void Fill() { BeginUpdate(); string[] drives = Directory.GetLogicalDrives(); //string[] tempString = Directory.GetLogicalDrives(); //DriveInfo tempInfo = new DriveInfo("", 0, "My Computer"); //availableDrives.Add(tempInfo); foreach (string tempDrive in drives) { /* int tempType = getDriveType(tempDrive); string tempName = GetDriveName(tempDrive); tempInfo = new DriveInfo(tempDrive, tempType, tempName); availableDrives.Add(tempInfo); */ //string tempName = GetDriveName(tempDrive); DirTreeNode dn = new DirTreeNode(tempDrive); //dn.Text = tempName + "(" + tempDrive + ")"; Nodes.Add(dn); } //Directory.g //for (int i = 0; i < drives.Length; i++) //{ //drives[i].GetType //} EndUpdate(); BeforeExpand += new TreeViewCancelEventHandler(prepare); AfterCollapse += new TreeViewEventHandler(clear); }
private void CommonInit() { AfterCollapse += new TreeViewEventHandler(OnAfterCollapse); AfterExpand += new TreeViewEventHandler(OnAfterExpand); MouseUp += new MouseEventHandler(OnMouseUp); KeyUp += new KeyEventHandler(OnKeyUp); #if Orig Sorted = true; #endif // Get images for tree. ImageList = new ImageList(); ImageList.Images.Add(new Bitmap(GetType(), "CLSDFOLD.BMP")); // 0 ImageList.Images.Add(new Bitmap(GetType(), "OPENFOLD.BMP")); // 1 ImageList.Images.Add(new Bitmap(GetType(), "Complex.bmp")); // 2 ImageList.Images.Add(new Bitmap(GetType(), "FSType.bmp")); // 3 ImageList.Images.Add(new Bitmap(GetType(), "UserChoice.bmp")); // 4 ImageList.Images.Add(new Bitmap(GetType(), "CheckBox.bmp")); // 5 ImageList.Images.Add(new Bitmap(GetType(), "CheckedBox.bmp")); // 6 ImageList.Images.Add(new Bitmap(GetType(), "Radio.bmp")); // 7 ImageList.Images.Add(new Bitmap(GetType(), "RadioSelected.bmp")); // 8 }
public void Fill() { BeginUpdate(); string[] drives = Directory.GetLogicalDrives(); //string[] tempString = Directory.GetLogicalDrives(); //DriveInfo tempInfo = new DriveInfo("", 0, "My Computer"); //availableDrives.Add(tempInfo); foreach (string tempDrive in drives) { /* int tempType = getDriveType(tempDrive); * string tempName = GetDriveName(tempDrive); * tempInfo = new DriveInfo(tempDrive, tempType, tempName); * availableDrives.Add(tempInfo); */ //string tempName = GetDriveName(tempDrive); DirTreeNode dn = new DirTreeNode(tempDrive); //dn.Text = tempName + "(" + tempDrive + ")"; Nodes.Add(dn); } //Directory.g //for (int i = 0; i < drives.Length; i++) //{ //drives[i].GetType //} EndUpdate(); BeforeExpand += new TreeViewCancelEventHandler(prepare); AfterCollapse += new TreeViewEventHandler(clear); }
public DocumentTreeView() { try { try { // get image for tree ImageList = new ImageList(); System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(GetType()); ImageList.Images.Add(new Bitmap(assembly.GetManifestResourceStream("Pic.Data.Resources.CLSDFOLD.BMP"))); ImageList.Images.Add(new Bitmap(assembly.GetManifestResourceStream("Pic.Data.Resources.OPENFOLD.BMP"))); ImageList.Images.Add(new Bitmap(assembly.GetManifestResourceStream("Pic.Data.Resources.DOC.BMP"))); // events AfterSelect += new TreeViewEventHandler(DocumentTreeView_AfterSelect); NodeMouseClick += new TreeNodeMouseClickEventHandler(DocumentTreeView_NodeMouseClick); // construct tree RefreshTree(); } catch (Pic.Data.DataException ex) { Debug.Fail(ex.ToString()); Logger.Write(ex.ToString(), Category.General, Priority.High); } catch (Exception ex) { Debug.Fail(ex.ToString()); Logger.Write(ex.ToString(), Category.General, Priority.High); } } catch (Exception ex) { Debug.Fail(ex.ToString()); MessageBox.Show(ex.ToString()); } }
public BookmarksTreeView(String aRoot) { mBuilder = new BaseTreeBuilder(this, null); mBuilder.Root = aRoot; mBuilder.DataStore = DataStoreRegistry.GetDataStore("Bookmarks"); mBuilder.DataStore.AddObserver(mBuilder); // Use bright green as transparent colour mIconTransparentColor = ColorTranslator.FromOle(0x00FF00); ImageList = new ImageList(); // Built in Bookmark icons ImageList.Images.Add(Image.FromFile(@"resources\bookmark-folder-closed.png"), mIconTransparentColor); ImageList.Images.Add(Image.FromFile(@"resources\bookmark-folder-open.png"), mIconTransparentColor); ImageList.Images.Add(Image.FromFile(@"resources\bookmark.png"), mIconTransparentColor); // Don't draw lines to root ShowRootLines = false; ShowPlusMinus = true; AfterLabelEdit += new NodeLabelEditEventHandler(OnAfterLabelEdit); AfterExpand += new TreeViewEventHandler(OnAfterExpand); AfterCollapse += new TreeViewEventHandler(OnAfterCollapse); }
public virtual void EndInit() { if (treeDefFileName != null) { XmlDocument xdoc = new XmlDocument(); xdoc.Load(treeDefFileName); Initialize(xdoc); } else if (treeDefinitionResourceName != null) { System.Diagnostics.Debug.WriteLine("TreeDefinitionResourceName==" + treeDefinitionResourceName); string assyName; string className; string resName; Helper.GetResourceInfo(treeDefinitionResourceName, out assyName, out className, out resName); Assembly resAssy = Assembly.Load(assyName); ResourceManager rm = new ResourceManager(assyName+"."+className, resAssy); string xml = (string)rm.GetObject(resName); //System.Diagnostics.Debug.WriteLine(xml); XmlDocument xdoc = new XmlDocument(); xdoc.LoadXml(xml); Initialize(xdoc); } AllowDrop = true; DragOver += new DragEventHandler(OnXTreeDragOver); DragEnter += new DragEventHandler(OnXTreeDragEnter); ItemDrag += new ItemDragEventHandler(OnXTreeItemDrag); DragDrop += new DragEventHandler(OnXTreeDragDrop); AfterSelect += new TreeViewEventHandler(OnXTreeAfterSelect); }
void InitializeComponent () { BeforeSelect += new TreeViewCancelEventHandler(SetClosedIcon); AfterSelect += new TreeViewEventHandler(SetOpenedIcon); }
public void LoadTree() { m_lua["LuaCallBack"] = new LuaCallBack(baseTree); LoadTreeWithLua = true; DBCustomClass dbClass = ((PageDesc)m_Pages[0]).dbClass; bool bUseOptimizedLoadTree = (this.MdiParent == Program.MainForm); //if (dbClass.ExistLuaFunction("UseOptimizedLoadTree")) //{ // object[] ret = dbClass.CallLuaFunction("UseOptimizedLoadTree"); // bUseOptimizedLoadTree = (bool)ret[0]; //} if (dbClass.ExistLuaFunction("LoadTreePlugin")) { this.BaseTree.Nodes.Clear(); this.BaseTree.Visible = false; this.BaseTree = null; object[] args = new object[7]; args[0] = this.panelDockContainer1; TreeViewEventHandler afterSelect = new TreeViewEventHandler(this.baseTree_AfterSelect); args[1] = afterSelect; TreeViewCancelEventHandler beforeSelect = new TreeViewCancelEventHandler(this.baseTree_BeforeSelect); args[2] = beforeSelect; NodeLabelEditEventHandler beforeLabelEdit = new NodeLabelEditEventHandler(this.baseTree_BeforeLabelEdit); args[3] = beforeLabelEdit; NodeLabelEditEventHandler afterLabelEdit = new NodeLabelEditEventHandler(this.Tree_AfterLabelEdit); args[4] = afterLabelEdit; EventHandler extraMenuItemClick = new EventHandler(this.buttonExtraMenuItem_Click); args[5] = extraMenuItemClick; args[6] = Program.EnableRemoting; Helper.AddTimeLog("load tree plugin begin"); object[] ret = dbClass.CallLuaFunction("LoadTreePlugin", args); Helper.AddTimeLog("load tree plugin end"); LoadTreeWithLua = false; m_bPluginTree = true; // 这些动作已放到plugin的dll里。 //this.panelDockContainer1.Controls.Add((Control)(ret[0])); //PluginTree.Dock = DockStyle.Fill; //PluginTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.baseTree_AfterSelect); //PluginTree.Update(); // 返回的第一个是treeview // 若要得到treeview的引用,请实时从panelDockContainer1.Controls里面找,因为随时会更新tree。 TreeView PluginTree = (TreeView)(ret[0]); this.BaseTree = PluginTree; } else if (dbClass.ExistLuaFunction("LoadTreeAll")) { dbClass.CallLuaFunction("LoadTreeAll"); } else { try { if (dbClass.ExistLuaFunction("LoadTreePost")) { LoadTreeNoLua(false, bUseOptimizedLoadTree); dbClass.CallLuaFunction("LoadTreePost"); } else { if (dbClass.ExistLuaFunction("DisplayTreeNode")) // 用脚本控制树结点的显示(只读一次) { object[] result = dbClass.CallLuaFunction("DisplayTreeNode"); if(result != null) { m_displayString = result[0] as string; LoadTreeNoLua(m_displayString, true, bUseOptimizedLoadTree); m_DisplayNode = true; // 用脚本显示树结点文本(只读一次) } else { MessageBox.Show("脚本中DisplayTreeNode方法的返回值不能为空!"); } } else if(dbClass.ExistLuaFunction("DisplayTreeNodePlus")) // 用脚本控制树结点的显示(每次树结点变化都需要读) { m_lua["DisplayField"] = null; lua["DisplayRow"] = null; //用于 DisplayTreeNodePlus 事件的当前显示行内容 object[] result = dbClass.CallLuaFunction("DisplayTreeNodePlus"); if(result != null) { m_displayField = result[0] as string; m_displayString = ""; m_DisplayVarNode = true; // 用脚本显示树结点文本(每次树结点变化都需要读) LoadTreeNoLua(m_displayString, true, bUseOptimizedLoadTree); m_DisplayNode = true; } else { MessageBox.Show("脚本中DisplayTreeNodePlus方法的返回值不能为空!"); } } else { LoadTreeNoLua(true, bUseOptimizedLoadTree); m_DisplayNode = false; // 不用脚本显示树结点文本 } LoadTreeWithLua = false; } } catch (Exception ex) { string err = string.Format("LoadTreeNoLua时发生错误。\r\n\r\n错误信息为:{0}", ex.Message); MessageBox.Show(err); } } try { ModifyTreeCommand cmd = new ModifyTreeCommand(BaseTree); cmd.Execute(); } catch (Exception ex) { MessageBox.Show(ex.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void CommonInit() { AfterCollapse += new TreeViewEventHandler(OnAfterCollapse); AfterExpand += new TreeViewEventHandler(OnAfterExpand); MouseUp += new MouseEventHandler(OnMouseUp); KeyUp += new KeyEventHandler(OnKeyUp); #if Orig Sorted = true; #endif // Get images for tree. ImageList = new ImageList(); ImageList.Images.Add(new Bitmap(GetType(), "CLSDFOLD.BMP")); // 0 ImageList.Images.Add(new Bitmap(GetType(), "OPENFOLD.BMP")); // 1 ImageList.Images.Add(new Bitmap(GetType(), "Complex.bmp")); // 2 ImageList.Images.Add(new Bitmap(GetType(), "FSType.bmp")); // 3 ImageList.Images.Add(new Bitmap(GetType(), "UserChoice.bmp")); // 4 ImageList.Images.Add(new Bitmap(GetType(), "CheckBox.bmp")); // 5 ImageList.Images.Add(new Bitmap(GetType(), "CheckedBox.bmp")); // 6 ImageList.Images.Add(new Bitmap(GetType(), "Radio.bmp")); // 7 ImageList.Images.Add(new Bitmap(GetType(), "RadioSelected.bmp")); // 8 }
private async void GiderKalemRaporu_Load(object sender, EventArgs e) { grbxHesaplar.Visible = !virmanlar; await LoadAllTreeViews().ConfigureAwait(true); var onQueryChange = new EventHandler(async (obj, agrs) => { var activeComponent = obj; panel1.Enabled = false; await HareketleriYukle().ConfigureAwait(true); panel1.Enabled = true; if (!(obj is RadioButton)) ((Control)obj).Focus(); }); var onQueryChange2 = new TreeViewEventHandler(async (obj, agrs) => { var activeComponent = obj; panel1.Enabled = false; await HareketleriYukle().ConfigureAwait(true); panel1.Enabled = true; ((Control)obj).Focus(); }); dateTimePicker3.ValueChanged += onQueryChange; dateTimePicker4.ValueChanged += onQueryChange; cb2.CheckedChanged += onQueryChange; groupResults.CheckedChanged += onQueryChange; it.CheckedChanged += onQueryChange; yt.CheckedChanged += onQueryChange; vt.CheckedChanged += onQueryChange; GelirGiderGruplari.AfterSelect += onQueryChange2; FirmaGruplari.AfterSelect += onQueryChange2; await HareketleriYukle().ConfigureAwait(true); }
public void Fill() { BeginUpdate(); string[] drives = Directory.GetLogicalDrives(); foreach (string tempDrive in drives) { DirTreeNode dn = new DirTreeNode(tempDrive); Nodes.Add(dn); if (tempDrive.IndexOf("C:\\") != -1) { this.SelectedNode = dn; this.Select(true, true); } } EndUpdate(); BeforeExpand += new TreeViewCancelEventHandler(prepare); AfterCollapse += new TreeViewEventHandler(clear); }
/// <summary> /// Default constructor /// </summary> /// <param name="locManager">Localization manager of the application</param> /// <param name="menuDisp">Menu of the application</param> /// <param name="modManager">Modules manager</param> /// <param name="iconProvider">Provider of the icons for the component</param> /// <param name="toolBar">ToolBar of the application</param> public NewBoxTreeView(Menu.ILocalizationManager locManager, Menu.IMenuDisplayer menuDisp, ModulesManager.ModulesManager modManager, IIconProvider iconProvider, Menu.IMenuDisplayer toolBar) : base() { //setting the icons naIcon = iconProvider.GetIcon("NAIcon"); folderIcon = iconProvider.GetIcon("FolderIcon"); localizationManager = locManager; menuDisplayer = menuDisp; this.toolBar = toolBar; modulesManager = modManager; InitializeComponent(); IBoxModuleFactoryCreator[] creators = modulesManager.BoxModuleFactoryCreators; FillImageList(creators); FillTreeView(creators); AfterSelect += new TreeViewEventHandler(NewBoxTreeView_AfterSelect); GotFocus += new EventHandler(NewBox_GotFocus); MouseMove += new MouseEventHandler(NewBoxTreeView_MouseMove); MouseDown += new MouseEventHandler(NewBoxTreeView_MouseDown); }
private async void FirmaCarileriEkrani_Load(object sender, EventArgs e) { var d = DateTime.Now; dateTimePicker3.Text = (d.AddDays(-d.Day + 1)).ToString("yyyy-MM-dd"); dateTimePicker4.Text = (new DateTime(DateTime.Now.Year, DateTime.Now.Month + 1, 1).AddDays(-1)).ToString("yyyy-MM-dd"); await LoadAllTreeViews().ConfigureAwait(true); var onQueryChange = new EventHandler(async (obj, args) => { var activeComponent = obj; panel1.Enabled = false; toolStripProgressBar1.Style = ProgressBarStyle.Marquee; await HareketleriYukle().ConfigureAwait(true); toolStripProgressBar1.Style = ProgressBarStyle.Continuous; panel1.Enabled = true; ((Control)obj).Focus(); }); var onQueryChange2 = new TreeViewEventHandler(async (obj, args) => { var activeComponent = obj; panel1.Enabled = false; toolStripProgressBar1.Style = ProgressBarStyle.Marquee; await HareketleriYukle().ConfigureAwait(true); toolStripProgressBar1.Style = ProgressBarStyle.Continuous; panel1.Enabled = true; ((Control)obj).Focus(); }); dateTimePicker3.ValueChanged += onQueryChange; dateTimePicker4.ValueChanged += onQueryChange; cb2.CheckedChanged += onQueryChange; groupResults.CheckedChanged += onQueryChange; FirmaGruplari.AfterSelect += onQueryChange2; await HareketleriYukle().ConfigureAwait(true); }
/// <summary> /// Metoda wype�niaj�ca drzewo katalogow /// </summary> public void Fill() { BeginUpdate(); DirTreeNode kat_Pulpit = new DirTreeNode(Config.katalogPulpit, Pulpit, true); kat_Pulpit.Text = "Pulpit"; //kat_Pulpit.Path = Config.katalogPulpit; try { string[] n = Directory.GetDirectories(Config.katalogPulpit); if (n.Length == 0) kat_Pulpit.Nodes.Clear(); } catch (Exception e) { MessageBox.Show(e.ToString() + e.Message); } Nodes.Add(kat_Pulpit); DirTreeNode kat_MDokumenty = new DirTreeNode(Config.katalogMojeDokumenty, User, true); kat_MDokumenty.Text = "Moje Dokumenty"; try { string[] n = Directory.GetDirectories(Config.katalogMojeDokumenty); if (n.Length == 0) kat_MDokumenty.Nodes.Clear(); } catch (Exception e) { MessageBox.Show(e.ToString() + e.Message); } Nodes.Add(kat_MDokumenty); DirTreeNode kat_MObrazy = new DirTreeNode(Config.katalogMojeObrazy, Pictures_2, true); kat_MObrazy.Text = "Moje Obrazy"; try { string[] n = Directory.GetDirectories(Config.katalogMojeObrazy); if (n.Length == 0) kat_MObrazy.Nodes.Clear(); } catch (Exception e) { MessageBox.Show(e.ToString() + e.Message); } Nodes.Add(kat_MObrazy); kat_MKomputer = new DirTreeNode("M�j Komputer", Computer, true); kat_MKomputer.Text = "M�j Komputer"; Nodes.Add(kat_MKomputer); //kat_MKomputer.Nodes.Clear(); string[] drives = Directory.GetLogicalDrives(); foreach (string tempDrive in drives) { DirTreeNode dn = new DirTreeNode(tempDrive); kat_MKomputer.Nodes.Add(dn); } kat_MKomputer.Expand(); EndUpdate(); BeforeExpand += new TreeViewCancelEventHandler(prepare); AfterCollapse += new TreeViewEventHandler(clear); }
public LogFilterTreeView() { this.CheckBoxes = true; this.ImageIndex = -1; this.Name = "filterTreeView"; this.SelectedImageIndex = -1; this.Size = new System.Drawing.Size(424, 360); this.eventHandler = new System.Windows.Forms.TreeViewEventHandler(this.filterTreeView_AfterCheck); this.AfterCheck += eventHandler; filteredOutFunctions = new ArrayList(); InterceptedFunctionDB db = InterceptedFunctionDB.GetInstance("functions.xml"); registryOperations = db.GetFunctionCategoryArray("REGISTRY"); libraryOperations = db.GetFunctionCategoryArray("LIBRARY"); processOperations = db.GetFunctionCategoryArray("PROCESS"); networkOperations = db.GetFunctionCategoryArray("NETWORK"); fileOperations = db.GetFunctionCategoryArray("FILE"); memoryOperations = db.GetFunctionCategoryArray("MEMORY"); regNode = new TreeNode("Registry Operations"); libNode = new TreeNode("Library Operations"); procNode = new TreeNode("Process Operations"); netNode = new TreeNode("Network Operations"); fileNode = new TreeNode("File Operations"); memNode = new TreeNode("Memory Operations"); regNode.Checked = true; libNode.Checked = true; procNode.Checked = true; netNode.Checked = true; fileNode.Checked = true; memNode.Checked = true; this.Nodes.Add(fileNode); this.Nodes.Add(libNode); this.Nodes.Add(memNode); this.Nodes.Add(netNode); this.Nodes.Add(procNode); this.Nodes.Add(regNode); foreach(InterceptedFunction f in registryOperations) { TreeNode node = new TreeNode(f.Name); node.Checked = true; regNode.Nodes.Add(node); } foreach(InterceptedFunction f in libraryOperations) { TreeNode node = new TreeNode(f.Name); node.Checked = true; libNode.Nodes.Add(node); } foreach(InterceptedFunction f in processOperations) { TreeNode node = new TreeNode(f.Name); node.Checked = true; procNode.Nodes.Add(node); } foreach(InterceptedFunction f in networkOperations) { TreeNode node = new TreeNode(f.Name); node.Checked = true; netNode.Nodes.Add(node); } foreach(InterceptedFunction f in fileOperations) { TreeNode node = new TreeNode(f.Name); node.Checked = true; fileNode.Nodes.Add(node); } foreach(InterceptedFunction f in memoryOperations) { TreeNode node = new TreeNode(f.Name); node.Checked = true; memNode.Nodes.Add(node); } }
private async void Form4_Load(object sender, EventArgs e) { var d = DateTime.Now; dateTimePicker1.Text = (d.AddDays(-d.Day + 1)).ToString("yyyy-MM-dd"); dateTimePicker2.Text = d.ToString("yyyy-MM-dd"); dateTimePicker3.Text = (d.AddDays(-d.Day + 1)).ToString("yyyy-MM-dd"); dateTimePicker4.Text = (new DateTime(DateTime.Now.Year, DateTime.Now.Month + 1, 1).AddDays(-1)).ToString("yyyy-MM-dd"); dateTimePicker5.Text = (d.AddDays(-d.Day + 1)).ToString("yyyy-MM-dd"); dateTimePicker6.Text = (new DateTime(DateTime.Now.Year, DateTime.Now.Month + 1, 1).AddDays(-1)).ToString("yyyy-MM-dd"); await LoadAllTreeViews().ConfigureAwait(true); var onQueryChange = new EventHandler(async (obj, agrs) => { var activeComponent = obj; panel1.Enabled = false; await HareketleriYukle().ConfigureAwait(true); panel1.Enabled = true; ((Control)obj).Focus(); }); var onQueryChange2 = new TreeViewEventHandler(async (obj, agrs) => { var activeComponent = obj; panel1.Enabled = false; await HareketleriYukle().ConfigureAwait(true); panel1.Enabled = true; ((Control)obj).Focus(); }); dateTimePicker1.ValueChanged += onQueryChange; dateTimePicker2.ValueChanged += onQueryChange; dateTimePicker3.ValueChanged += onQueryChange; dateTimePicker4.ValueChanged += onQueryChange; dateTimePicker5.ValueChanged += onQueryChange; dateTimePicker6.ValueChanged += onQueryChange; cb1.CheckedChanged += onQueryChange; cb2.CheckedChanged += onQueryChange; cb3.CheckedChanged += onQueryChange; AlacakliFirmaGruplari.AfterSelect += onQueryChange2; BorcluFirmaGruplari.AfterSelect += onQueryChange2; GelirGiderGruplari.AfterSelect += onQueryChange2; await HareketleriYukle().ConfigureAwait(true); }
public JTreeASTPanel(TreeViewEventHandler afterSelectHandler, AST rootAST) : this() { tree.AfterSelect += afterSelectHandler; tree.BeforeExpand += new TreeViewCancelEventHandler(ASTTreeNode.tree_BeforeExpand); tree.Nodes.Add(new ASTTreeNode(rootAST)); }
// TODO: Add any initialization after the InitForm call }