Пример #1
0
/*
 *              private BaseNode RecFind(FindState f, BaseNode bn)
 *              {
 *                      if (f.Match(bn))
 *                              return bn;
 *
 *                      if (f.NeedToExpandNode(bn))
 *                      {
 *                              bn.GenerateChildren();
 *
 *                              for(int i=0; i<bn.Nodes.Count; ++i)
 *                              {
 *                                      BaseNode found = RecFind(f, (BaseNode)bn.Nodes[i]);
 *                                      if (found != null)
 *                                              return found;
 *                              }
 *                      }
 *
 *
 *                      return null;
 *
 *              }
 */

        private void OnNewView(object sender, System.EventArgs e)
        {
            BaseNode an = (BaseNode)tvAsm.SelectedNode;

            AsmView newView = new AsmView(an);

            newView.MdiParent = MdiParent;
            newView.Visible   = true;
        }
Пример #2
0
//		private void mnuAsmOpen_Click(object sender, System.EventArgs e)
//		{
//			GACPicker p = new GACPicker();
//			if (p.ShowDialog() == DialogResult.OK)
//			{
//				AsmView asm = GetView(false);
//				asm.AddRoot(BaseNode.MakeNode(p.Assembly));
//			}
//		}

//		private void mnuFileOpen_Click(object sender, System.EventArgs e)
//		{
//			openFileDialog1.CheckFileExists= true;
//			openFileDialog1.CheckPathExists = true;
//			openFileDialog1.Filter ="Exe files (*.exe)|*.exe|Dll files (*.dll)|*.dll|All files (*.*)|*.*";
//			openFileDialog1.Multiselect = false;
//			openFileDialog1.ReadOnlyChecked = true;
//			if (openFileDialog1.ShowDialog() == DialogResult.OK)
//			{
//				AsmView asm = GetView(false);
//				asm.AddRoot(BaseNode.MakeNode(openFileDialog1.FileName));
//			}
//		}

        private void mnuAsmOpenNV_Click(object sender, System.EventArgs e)
        {
            GACPicker p = new GACPicker();

            if (p.ShowDialog() == DialogResult.OK)
            {
                AsmView asm = GetView(true);
                asm.AddRoot(BaseNode.MakeNode(p.Assembly));
            }
        }
Пример #3
0
 private void item_2_Click(object sender, System.EventArgs e)
 {
     openFileDialog1.CheckFileExists = true;
     openFileDialog1.CheckPathExists = true;
     openFileDialog1.Filter          = "Exe files (*.exe)|*.exe|Dll files (*.dll)|*.dll|All files (*.*)|*.*";
     openFileDialog1.Multiselect     = false;
     openFileDialog1.ReadOnlyChecked = true;
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         AsmView asm = GetView(false);
         asm.AddRoot(BaseNode.MakeNode(openFileDialog1.FileName));
     }
 }
Пример #4
0
        private void item_3_Click(object sender, System.EventArgs e)

        {
            GACPicker p = new GACPicker();

            if (p.ShowDialog() == DialogResult.OK)
            {
                AsmView asm = new AsmView();     //GetView(false);
                asm.MdiParent = this;
                asm.AddRoot(BaseNode.MakeNode(p.Assembly));
                asm.Show();
            }
        }
Пример #5
0
        private AsmView GetView(bool bNew)
        {
            AsmView v;

            //if (bNew)
            //{
            v = new AsmView();
            //}
            //else
            //{
            //    v = AsmView;//this.ActiveMdiChild;
            //    if (v==null) v = new AsmView();
            //}
            //v.MdiParent = this;
            v.Visible = true;
            return(v);
        }
Пример #6
0
        private AsmView GetView(bool bNew)
        {
            AsmView v;

            if (bNew)
            {
                v = new AsmView();
            }
            else
            {
                v = (AsmView)this.ActiveMdiChild;
                if (v == null)
                {
                    v = new AsmView();
                }
            }
            v.MdiParent = this;
            v.Visible   = true;
            return(v);
        }
Пример #7
0
        private void OnDrop(object sender, System.Windows.Forms.DragEventArgs e)
        {
            object o = e.Data.GetData(DataFormats.FileDrop);

            if (o == null)
            {
                MessageBox.Show("Drag a file from Explorer to open it");
                return;
            }

            AsmView v = GetView(true);
            Array   a = (Array)o;

            for (int i = 0; i < a.Length; ++i)
            {
                BaseNode b = BaseNode.MakeNode(a.GetValue(i));
                if (b != null)
                {
                    v.AddRoot(b);
                }
            }
        }
Пример #8
0
		private AsmView GetView(bool bNew)
		{
			AsmView v;
			if (bNew)
			{
				v = new AsmView();
			}
			else
			{
				v = (AsmView)this.ActiveMdiChild;
				if (v==null) v = new AsmView();
			}
			v.MdiParent = this;
			v.Visible = true;
			return v;
		}
Пример #9
0
/*
		private BaseNode RecFind(FindState f, BaseNode bn)
		{
			if (f.Match(bn))
				return bn;

			if (f.NeedToExpandNode(bn))
			{
				bn.GenerateChildren();

				for(int i=0; i<bn.Nodes.Count; ++i)
				{
					BaseNode found = RecFind(f, (BaseNode)bn.Nodes[i]);
					if (found != null)
						return found;
				}
			}


			return null;

		}
*/

		private void OnNewView(object sender, System.EventArgs e)
		{
			BaseNode an = (BaseNode)tvAsm.SelectedNode;

			AsmView newView = new AsmView(an);
			newView.MdiParent = MdiParent;
			newView.Visible = true;
		}
Пример #10
0
		private AsmView GetView(bool bNew)
		{
			AsmView v;
            //if (bNew)
            //{
				v = new AsmView();
            //}
            //else
            //{
            //    v = AsmView;//this.ActiveMdiChild;
            //    if (v==null) v = new AsmView();
            //}
            //v.MdiParent = this;
			v.Visible = true;
			return v;
		}
Пример #11
0
		private void item_3_Click(object sender, System.EventArgs e)

			{
				GACPicker p = new GACPicker();
				if (p.ShowDialog() == DialogResult.OK)
				{
                    AsmView asm = new AsmView(); //GetView(false);
                    asm.MdiParent = this;
					asm.AddRoot(BaseNode.MakeNode(p.Assembly));
                    asm.Show();
				}
			}
Пример #12
0
		private void item_2_Click(object sender, System.EventArgs e)
		{
			openFileDialog1.CheckFileExists= true;
			openFileDialog1.CheckPathExists = true;
			openFileDialog1.Filter ="Exe files (*.exe)|*.exe|Dll files (*.dll)|*.dll|All files (*.*)|*.*";
			openFileDialog1.Multiselect = false;
			openFileDialog1.ReadOnlyChecked = true;
			if (openFileDialog1.ShowDialog() == DialogResult.OK)
			{
                AsmView asm = new AsmView(); //GetView(false);
                asm.MdiParent = this;
				asm.AddRoot(BaseNode.MakeNode(openFileDialog1.FileName));
                asm.Show();
			}
		}