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 NuGenMainPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent):base(handler, parent)
        {            
            InitializeComponent();

            viewMenu = new NuGenViewPopupMenu(handler, this);
            settingsMenu = new NuGenSettingsPopupMenu(handler, this);
            windowMenu = new NuGenWindowPopupMenu(handler, this);
            fileMenu = new NuGenFilePopupMenu(handler, this);

            AddChild(viewMenu);
            AddChild(settingsMenu);
            AddChild(windowMenu);
            AddChild(fileMenu);
        }
Ejemplo n.º 6
0
        public NuGenMainPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent) : base(handler, parent)
        {
            InitializeComponent();

            viewMenu     = new NuGenViewPopupMenu(handler, this);
            settingsMenu = new NuGenSettingsPopupMenu(handler, this);
            windowMenu   = new NuGenWindowPopupMenu(handler, this);
            fileMenu     = new NuGenFilePopupMenu(handler, this);

            AddChild(viewMenu);
            AddChild(settingsMenu);
            AddChild(windowMenu);
            AddChild(fileMenu);
        }
Ejemplo n.º 7
0
        public NuGenForm(NuGenEventHandler h)
        {
            menu = new NuGenMainPopupMenu(h, null);           

            RegisterEventHandler(h);
            InitializeComponent();
            InitializeDefaults();
            DisableEditMenu();

            statusBar.Panels.Add(normalStatus);
            statusBar.Panels.Add(permanentStatus);
            statusBar.Panels.Add(resStatus);
            statusBar.Panels.Add(coordsStatus);

            this.importButton.Click += handler.Import_Click;
            this.exportButton.Click += handler.Export_Click;
            this.openButton.Click += handler.Open_Click;
            this.saveButton.Click += handler.Save_Click;

            this.cutButton.Click += handler.Cut_Click;
            this.copyButton.Click += handler.Copy_Click;
            this.pasteAsButton.Click += handler.PasteAsNew_Click;
            this.pasteButton.Click += handler.Paste_Click;

            this.selectButton.Click += handler.Select_Click;

            this.axisButton.Click += handler.AxisPoint_Click;
            this.scaleButton.Click += handler.ScaleBar_Click;

            this.segmentButton.Click += handler.SegmentFill_Click;
            this.curvePointButton.Click += handler.CurvePoint_Click;
            this.pointMatchButton.Click += handler.PointMatch_Click;

            this.measureButton.Click += handler.MeasurePoint_Click;

            this.selectButton.Click += new EventHandler(toggleButton_Click);

            this.axisButton.Click += new EventHandler(toggleButton_Click);
            this.scaleButton.Click += new EventHandler(toggleButton_Click);

            this.segmentButton.Click += new EventHandler(toggleButton_Click);
            this.curvePointButton.Click += new EventHandler(toggleButton_Click);
            this.pointMatchButton.Click += new EventHandler(toggleButton_Click);

            this.measureButton.Click += new EventHandler(toggleButton_Click);

            Text = "NuGenTransform";
        }
Ejemplo n.º 8
0
        public NuGenForm(NuGenEventHandler h)
        {
            menu = new NuGenMainPopupMenu(h, null);

            RegisterEventHandler(h);
            InitializeComponent();
            InitializeDefaults();
            DisableEditMenu();

            statusBar.Panels.Add(normalStatus);
            statusBar.Panels.Add(permanentStatus);
            statusBar.Panels.Add(resStatus);
            statusBar.Panels.Add(coordsStatus);

            this.importButton.Click += handler.Import_Click;
            this.exportButton.Click += handler.Export_Click;
            this.openButton.Click   += handler.Open_Click;
            this.saveButton.Click   += handler.Save_Click;

            this.cutButton.Click     += handler.Cut_Click;
            this.copyButton.Click    += handler.Copy_Click;
            this.pasteAsButton.Click += handler.PasteAsNew_Click;
            this.pasteButton.Click   += handler.Paste_Click;

            this.selectButton.Click += handler.Select_Click;

            this.axisButton.Click  += handler.AxisPoint_Click;
            this.scaleButton.Click += handler.ScaleBar_Click;

            this.segmentButton.Click    += handler.SegmentFill_Click;
            this.curvePointButton.Click += handler.CurvePoint_Click;
            this.pointMatchButton.Click += handler.PointMatch_Click;

            this.measureButton.Click += handler.MeasurePoint_Click;

            this.selectButton.Click += new EventHandler(toggleButton_Click);

            this.axisButton.Click  += new EventHandler(toggleButton_Click);
            this.scaleButton.Click += new EventHandler(toggleButton_Click);

            this.segmentButton.Click    += new EventHandler(toggleButton_Click);
            this.curvePointButton.Click += new EventHandler(toggleButton_Click);
            this.pointMatchButton.Click += new EventHandler(toggleButton_Click);

            this.measureButton.Click += new EventHandler(toggleButton_Click);

            Text = "NuGenTransform";
        }
Ejemplo n.º 9
0
 public NuGenViewPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent) : base(handler, parent)
 {
     InitializeComponent();
 }
Ejemplo n.º 10
0
 public void RegisterEventHandler(NuGenEventHandler h)
 {
     handler = h;
 }
Ejemplo n.º 11
0
 public NuGenPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent)
 {
     this.handler = handler;
     this.parent = parent;
     children = new List<NuGenPopupMenu>();
 }
Ejemplo n.º 12
0
 public NuGenPopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent)
 {
     this.handler = handler;
     this.parent  = parent;
     children     = new List <NuGenPopupMenu>();
 }
Ejemplo n.º 13
0
     private Genetibase.UI.RibbonButton ribbonButton6; //Open
 
     public NuGenFilePopupMenu(NuGenEventHandler handler, NuGenPopupMenu parent):base(handler, parent)
     {
         InitializeComponent();   
     }
Ejemplo n.º 14
0
 public void RegisterEventHandler(NuGenEventHandler h)
 {
     handler = h;
 }