Ejemplo n.º 1
0
        public TemplateSelector(NuGenEventHandler handler, NuGenPopupMenu parent) : base(handler, parent)
        {
            this.templ   = handler.GetTemplates();
            selectListen = handler.GetTemplListener();

            // setUndecorated(true);
            System.Windows.Forms.ContainerControl temp_Container;
            temp_Container        = new System.Windows.Forms.ContainerControl();
            temp_Container.Parent = this;
            // temp_Container.setWindowDecorationStyle(JRootPane.NONE);
            //UPGRADE_TODO: Method 'java.awt.Component.setSize' was converted to 'System.Windows.Forms.Control.Size' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentsetSize_int_int'"
            Size = new System.Drawing.Size(WIDTH + 10, HEIGHT + 5);

            content      = new TemplateBorder();
            content.Dock = System.Windows.Forms.DockStyle.Fill;
            Controls.Add(content);

            System.Drawing.Color bckgr = BackColor;
            //UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getRed' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
            //UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getGreen' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
            //UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getBlue' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
            System.Drawing.Color shade1 = Color.WhiteSmoke;// System.Drawing.Color.FromArgb(System.Math.Max((int)bckgr.R - 8, 0), System.Math.Max((int)bckgr.G - 8, 0), (int)bckgr.B);
            //UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getRed' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
            //UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getGreen' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
            //UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getBlue' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
            System.Drawing.Color shade2 = System.Drawing.Color.FromArgb(System.Math.Max((int)bckgr.R - 16, 0), System.Math.Max((int)bckgr.G - 16, 0), (int)bckgr.B);

            for (int n = 0; n < NUM_WIDGETS; n++)
            {
                if (n < templ.NumTemplates())
                {
                    pics[n] = new EditorPane(MOL_WIDTH, MOL_HEIGHT, true);
                    pics[n].SetEditable(false);
                    pics[n].BackColor = shade1;
                    pics[n].Replace(templ.GetTemplate(n));
                    pics[n].ScaleToFit();
                    //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent'"
                    content.Controls.Add(pics[n]);
                    //UPGRADE_TODO: Method 'java.awt.Component.setLocation' was converted to 'System.Windows.Forms.Control.Location' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentsetLocation_int_int'"
                    pics[n].Location = new System.Drawing.Point(FRAME_SIZE + MOL_WIDTH * (n % MOL_COL) + 5, FRAME_SIZE + MOL_HEIGHT * (n / MOL_COL) + 5);
                    pics[n].SetToolCursor();
                    pics[n].SetMolSelectListener((MolSelectListener)this);
                }
            }
            //UPGRADE_WARNING: Data types in Visual C# might be different.  Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
            numPages = (int)System.Math.Ceiling(templ.NumTemplates() / (double)NUM_WIDGETS);

            content.BackColor = Color.DimGray;

            this.Size        = new Size(content.Size.Width, content.Size.Height - 10);
            this.MaximumSize = this.Size;
            this.MinimumSize = this.Size;

            // addWindowFocusListener(this);
        }
Ejemplo n.º 2
0
        public NuGenMainPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent) : base(handler, parent)
        {
            InitializeComponent();

            viewMenu      = new NuGenViewPopupMenu(handler, this);
            exportMenu    = new NuGenExportPopupMenu(handler, this);
            templatesMenu = new TemplateSelector(handler, this);

            AddChild(viewMenu);
            AddChild(exportMenu);
            AddChild(templatesMenu);
        }
Ejemplo n.º 3
0
        public TemplateSelector(NuGenEventHandler handler, NuGenPopupMenu parent):base(handler, parent)
		{
            this.templ = handler.GetTemplates();
			selectListen = handler.GetTemplListener();
			
			// setUndecorated(true);
			System.Windows.Forms.ContainerControl temp_Container;
			temp_Container = new System.Windows.Forms.ContainerControl();
			temp_Container.Parent = this;
			// temp_Container.setWindowDecorationStyle(JRootPane.NONE);
			//UPGRADE_TODO: Method 'java.awt.Component.setSize' was converted to 'System.Windows.Forms.Control.Size' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentsetSize_int_int'"
			Size = new System.Drawing.Size(WIDTH + 10, HEIGHT + 5);
			
			content = new TemplateBorder();
			content.Dock = System.Windows.Forms.DockStyle.Fill;
			Controls.Add(content);
			
			System.Drawing.Color bckgr = BackColor;
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getRed' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getGreen' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getBlue' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
            System.Drawing.Color shade1 = Color.WhiteSmoke;// System.Drawing.Color.FromArgb(System.Math.Max((int)bckgr.R - 8, 0), System.Math.Max((int)bckgr.G - 8, 0), (int)bckgr.B);
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getRed' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getGreen' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			//UPGRADE_TODO: The equivalent in .NET for method 'java.awt.Color.getBlue' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
			System.Drawing.Color shade2 = System.Drawing.Color.FromArgb(System.Math.Max((int) bckgr.R - 16, 0), System.Math.Max((int) bckgr.G - 16, 0), (int) bckgr.B);
			
			for (int n = 0; n < NUM_WIDGETS; n++)
				if (n < templ.NumTemplates())
				{
					pics[n] = new EditorPane(MOL_WIDTH, MOL_HEIGHT, true);
					pics[n].SetEditable(false);
					pics[n].BackColor = shade1;
					pics[n].Replace(templ.GetTemplate(n));
					pics[n].ScaleToFit();
					//UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent'"
					content.Controls.Add(pics[n]);
					//UPGRADE_TODO: Method 'java.awt.Component.setLocation' was converted to 'System.Windows.Forms.Control.Location' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentsetLocation_int_int'"
					pics[n].Location = new System.Drawing.Point(FRAME_SIZE + MOL_WIDTH * (n % MOL_COL) + 5, FRAME_SIZE + MOL_HEIGHT * (n / MOL_COL) + 5);
					pics[n].SetToolCursor();
					pics[n].SetMolSelectListener((MolSelectListener)this);
				}
			//UPGRADE_WARNING: Data types in Visual C# might be different.  Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
			numPages = (int) System.Math.Ceiling(templ.NumTemplates() / (double) NUM_WIDGETS);

            content.BackColor = Color.DimGray;

            this.Size = new Size(content.Size.Width, content.Size.Height - 10);
            this.MaximumSize = this.Size;
            this.MinimumSize = this.Size;
			
			// addWindowFocusListener(this);
		}
Ejemplo n.º 4
0
        public NuGenMainPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent):base(handler, parent)
        {            
            InitializeComponent();

            viewMenu = new NuGenViewPopupMenu(handler, this);
            exportMenu = new NuGenExportPopupMenu(handler, this);
            templatesMenu = new TemplateSelector(handler, this);

            AddChild(viewMenu);
            AddChild(exportMenu);
            AddChild(templatesMenu);
        }
Ejemplo n.º 5
0
 public NuGenViewPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent) : base(handler, parent)
 {
     InitializeComponent();
 }
Ejemplo n.º 6
0
 public void AddChild(NuGenPopupMenu child)
 {
     children.Add(child);
 }
Ejemplo n.º 7
0
 public NuGenPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent)
 {
     this.handler = handler;
     this.parent = parent;
     children = new List<NuGenPopupMenu>();
 }
 public NuGenExportPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent)
     : base(handler, parent)
 {
     InitializeComponent();
 }
Ejemplo n.º 9
0
 public void AddChild(NuGenPopupMenu child)
 {
     children.Add(child);
 }
Ejemplo n.º 10
0
 public NuGenPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent)
 {
     this.handler = handler;
     this.parent  = parent;
     children     = new List <NuGenPopupMenu>();
 }