Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 3
0
 /// <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;
 }
Exemplo n.º 4
0
        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());
            }
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
        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();
        }
Exemplo n.º 7
0
 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();
 }
Exemplo n.º 8
0
    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);
    }
Exemplo n.º 9
0
        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;
        }
Exemplo n.º 10
0
        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);
        }
Exemplo n.º 11
0
        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());
            }
        }
Exemplo n.º 12
0
        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);
        }
			// TODO: Add any initialization after the InitForm call
		}
Exemplo n.º 14
0
        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);
        }
Exemplo n.º 15
0
        /// <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);
        }
Exemplo n.º 16
0
		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
		}
Exemplo n.º 17
0
        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);
            }           
        }
Exemplo n.º 18
0
        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);
        }
Exemplo n.º 19
0
		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);
		}
Exemplo n.º 20
0
        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);

        }
Exemplo n.º 21
0
        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);
            }
        }
Exemplo n.º 22
0
		void InitializeComponent ()
		{
			BeforeSelect   += new TreeViewCancelEventHandler(SetClosedIcon);
			AfterSelect    += new TreeViewEventHandler(SetOpenedIcon);
		}
Exemplo n.º 23
0
		public JTreeASTPanel(TreeViewEventHandler afterSelectHandler, AST rootAST) : this()
		{
			tree.AfterSelect += afterSelectHandler;
			tree.BeforeExpand += new TreeViewCancelEventHandler(ASTTreeNode.tree_BeforeExpand);
			tree.Nodes.Add(new ASTTreeNode(rootAST));
		}
        /// <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);
        }
Exemplo n.º 25
0
        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);
        }