Beispiel #1
0
        public DropDownComboBox()
        {
            InitializeComponent();
            base.DropDownHeight = base.DropDownWidth = 1;
            base.IntegralHeight = false;

            KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.MyKeyPress);
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this._pictureBoxCaptcha = new System.Windows.Forms.PictureBox();
     this._textBoxCaptcha    = new System.Windows.Forms.TextBox();
     this._buttonOK          = new System.Windows.Forms.Button();
     ((System.ComponentModel.ISupportInitialize)(this._pictureBoxCaptcha)).BeginInit();
     this.SuspendLayout();
     //
     // _pictureBoxCaptcha
     //
     this._pictureBoxCaptcha.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
     this._pictureBoxCaptcha.Location = new System.Drawing.Point(12, 12);
     this._pictureBoxCaptcha.Name     = "_pictureBoxCaptcha";
     this._pictureBoxCaptcha.Size     = new System.Drawing.Size(150, 50);
     this._pictureBoxCaptcha.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
     this._pictureBoxCaptcha.TabIndex = 0;
     this._pictureBoxCaptcha.TabStop  = false;
     this._pictureBoxCaptcha.Click   += new System.EventHandler(this._pictureBoxCaptcha_Click);
     //
     // _textBoxCaptcha
     //
     this._textBoxCaptcha.Location = new System.Drawing.Point(12, 70);
     this._textBoxCaptcha.Name     = "_textBoxCaptcha";
     this._textBoxCaptcha.Size     = new System.Drawing.Size(73, 21);
     this._textBoxCaptcha.TabIndex = 1;
     _textBoxCaptcha.KeyPress     += new System.Windows.Forms.KeyPressEventHandler(this._textBoxCaptcha_KeyDown);
     //
     // _buttonOK
     //
     this._buttonOK.Location = new System.Drawing.Point(91, 70);
     this._buttonOK.Name     = "_buttonOK";
     this._buttonOK.Size     = new System.Drawing.Size(71, 23);
     this._buttonOK.TabIndex = 2;
     this._buttonOK.Text     = "确定";
     this._buttonOK.UseVisualStyleBackColor = true;
     this._buttonOK.Click  += new System.EventHandler(this._buttonOK_Click);
     _buttonOK.DialogResult = DialogResult.OK;
     //
     // FormManual
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(173, 98);
     this.Controls.Add(this._buttonOK);
     this.Controls.Add(this._textBoxCaptcha);
     this.Controls.Add(this._pictureBoxCaptcha);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
     this.MaximizeBox     = false;
     this.Name            = "FormManual";
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text            = "输入验证码";
     KeyPress            += new System.Windows.Forms.KeyPressEventHandler(this.FormManual_KeyDown);
     ((System.ComponentModel.ISupportInitialize)(this._pictureBoxCaptcha)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Beispiel #3
0
 void InitializeCtrlHandler()
 {
     PaintHandler            = new System.Windows.Forms.PaintEventHandler(_Paint);
     MouseDoubleClickHandler = new System.Windows.Forms.MouseEventHandler(_MouseDoubleClick);
     MouseDownHandler        = new System.Windows.Forms.MouseEventHandler(_MouseDown);
     HandleDestroyedHandler  = new EventHandler(_Destroy);
     MouseWheelHandler       = new System.Windows.Forms.MouseEventHandler(_MouseWheel);
     SizeChangedHandler      = new System.EventHandler(_SizeChanged);
     MouseUpHandler          = new System.Windows.Forms.MouseEventHandler(_MouseUp);
     PaintHandler            = new System.Windows.Forms.PaintEventHandler(_Paint);
     MouseMoveHandler        = new System.Windows.Forms.MouseEventHandler(_MouseMove);
     KeyPressHandler         = new System.Windows.Forms.KeyPressEventHandler(_KeyPress);
     KeyUpHandler            = new System.Windows.Forms.KeyEventHandler(_KeyUp);
     KeyDownHandler          = new System.Windows.Forms.KeyEventHandler(_KeyDown);
     NCMoveHandler           = new NCMouseMoveHandler(NCMouse);
     CtrlNCMouseMoveHandler  = new System.Windows.Forms.MouseEventHandler(CtrlNCMouseMove);
 }
Beispiel #4
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     //
     // ZzzzRangeBar
     //
     Name         = "ZzzzRangeBar";
     Size         = new System.Drawing.Size(344, 64);
     KeyPress    += new System.Windows.Forms.KeyPressEventHandler(OnKeyPress);
     Resize      += new System.EventHandler(OnResize);
     Load        += new System.EventHandler(OnLoad);
     SizeChanged += new System.EventHandler(OnSizeChanged);
     MouseUp     += new System.Windows.Forms.MouseEventHandler(OnMouseUp);
     Paint       += new System.Windows.Forms.PaintEventHandler(OnPaint);
     Leave       += new System.EventHandler(OnLeave);
     MouseMove   += new System.Windows.Forms.MouseEventHandler(OnMouseMove);
     MouseDown   += new System.Windows.Forms.MouseEventHandler(OnMouseDown);
 }
Beispiel #5
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     SuspendLayout();
     //
     // ShellTextBox
     //
     AcceptsReturn = true;
     AcceptsTab    = true;
     BackColor     = System.Drawing.Color.Black;
     BorderStyle   = System.Windows.Forms.BorderStyle.None;
     Dock          = System.Windows.Forms.DockStyle.Fill;
     ForeColor     = System.Drawing.Color.LawnGreen;
     MaxLength     = 0;
     Multiline     = true;
     ScrollBars    = ScrollBars.Both;
     Size          = new System.Drawing.Size(400, 176);
     KeyDown      += new System.Windows.Forms.KeyEventHandler(ShellControl_KeyDown);
     KeyPress     += new System.Windows.Forms.KeyPressEventHandler(shellTextBox_KeyPress);
     ResumeLayout(false);
 }
Beispiel #6
0
        /// <summary>
        ///    Required method for Designer support - do not modify
        ///    the contents of this method with the code editor
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.timer1     = new System.Windows.Forms.Timer(components);

            timer1.Interval = 3;
            timer1.Enabled  = true;
            //@design timer1.SetLocation(new System.Drawing.Point(7, 7));
            timer1.Tick += new System.EventHandler(timer1_Timer);

            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.Text = "Collide";
            //@design this.TrayLargeIcon = true;
            //@design this.TrayHeight = 93;
            this.BackColor  = System.Drawing.Color.Black;
            this.ClientSize = new System.Drawing.Size(720, 429);
            KeyPress       += new System.Windows.Forms.KeyPressEventHandler(Form_KeyPress);
            DoubleClick    += new System.EventHandler(Form1_DoubleClick);
            Resize         += new System.EventHandler(Form_Resize);
            MouseUp        += new System.Windows.Forms.MouseEventHandler(Form_MouseUp);
        }
Beispiel #7
0
 private void SendStartTiming()
 {
     KeyPress           -= new System.Windows.Forms.KeyPressEventHandler(this.Form1_KeyPress);
     buttonTimeIn.Click -= new System.EventHandler(this.buttonTimeIn_Click);
     backgroundWorker2.RunWorkerAsync();
     if (radioButtonTeam1.Checked || radioButtonTeam2.Checked)
     {
         optionsToolStripMenuItem.Enabled    = false;
         stopTimingToolStripMenuItem.Enabled = true;
         if (m_stateMachine == null)
         {
             SetHammer();
         }
         SetCursorPos(0, 0);
         TimerUtil.TraceAndDebugMessage("Sending StartTiming Event to state machine", 1);
         m_stateMachine.Send((int)CurlingTimmerStateMachine.EventID.StartTiming, null);
     }
     else
     {
         CurlingMessageBox.Show("Please select the team throwing the last rock", "Operator error", Properties.Resources.SelectLastRock);
     }
 }
Beispiel #8
0
        public void Init(System.String LoadFN, bool StreamMode)
        {
			streamMode = StreamMode;
			
			// application
			
//			Closing += new System.ComponentModel.CancelEventHandler(this.MainWindow_Closing_DISPOSE_ON_CLOSE);
			// JFrame.setDefaultLookAndFeelDecorated(false);
			
			//UPGRADE_ISSUE: Constructor 'javax.swing.Image.Image' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingImageIconImageIcon_javanetURL'"
			//GetType();
			//UPGRADE_TODO: Method 'java.lang.Class.getResource' was converted to 'System.Uri' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javalangClassgetResource_javalangString'"
            
            mainIcon = new Bitmap(Utility.GetFullPath("images\\MainIcon.png"));
			//Icon = System.Drawing.Icon.FromHandle(((System.Drawing.Bitmap) mainIcon).GetHicon());
			//UPGRADE_ISSUE: Constructor 'javax.swing.Image.Image' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingImageIconImageIcon_javanetURL'"
			GetType();
			//UPGRADE_TODO: Method 'java.lang.Class.getResource' was converted to 'System.Uri' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javalangClassgetResource_javalangString'"
            mainLogo = new Bitmap(Utility.GetFullPath("/images/MainLogo.png"));


            templ = new Templates();
			
			// toolbar

			ImageList temp_ImageList;
			temp_ImageList = new System.Windows.Forms.ImageList();
			// temp_ToolBar = new System.Windows.Forms.ToolBar();
            toolButtons = new Button[TOOL_COUNT];
			//UPGRADE_TODO: Class 'javax.swing.Image' was converted to 'System.Drawing.Image' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingImageIcon'"
			toolIcons = new System.Drawing.Image[TOOL_COUNT];
			//UPGRADE_TODO: Class 'javax.swing.ButtonGroup' was converted to 'System.Collections.IList' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
			toolGroup = new ArrayList();
			for (int n = 0; n < TOOL_COUNT; n++)
			{
				//UPGRADE_TODO: Method 'java.lang.Class.getResource' was converted to 'System.Uri' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javalangClassgetResource_javalangString'"
				toolIcons[n] = new Bitmap(Utility.GetFullPath("/images/" + IMAGE_TOOL[n] + ".png"));
				if (ACTIVE_TOOL[n])
				{
                    toolButtons[n] = new Button();
                    toolButtons[n].Image = toolIcons[n]; 
					toolGroup.Add((System.Object) toolButtons[n]);
					System.Windows.Forms.ToolBarButton temp_ToolBarButton;
					//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'"
					// tools.Items.Add(toolButtons[n]);
                    SupportClass.CommandManager.CheckCommand(toolButtons[n]);
                    SupportClass.ToolTipSupport.setToolTipText(toolButtons[n], TOOL_TIPS[n]);
				}
				/*else {toolButtons[n]=new JButton(toolIcons[n]);
				tools.Add(toolButtons[n]);
				toolButtons[n].addActionListener(this);}*/
			}
			//UPGRADE_TODO: Method 'javax.swing.AbstractButton.getModel' was converted to 'ToolStripButtonBase' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
			SupportClass.ButtonGroupSupport.SetSelected(toolGroup, toolButtons[TOOL_CURSOR], true);
			
			toolButtons[TOOL_SETATOM].MouseDown += new System.Windows.Forms.MouseEventHandler(mouseDown);
			toolButtons[TOOL_SETATOM].MouseDown += new System.Windows.Forms.MouseEventHandler(this.mousePressed);
			toolButtons[TOOL_SETATOM].KeyDown += new System.Windows.Forms.KeyEventHandler(keyDown);
			toolButtons[TOOL_SETATOM].KeyDown += new System.Windows.Forms.KeyEventHandler(this.keyPressed);
			toolButtons[TOOL_SETATOM].KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.keyTyped);
			toolButtons[TOOL_TEMPLATE].MouseDown += new System.Windows.Forms.MouseEventHandler(mouseDown);
			toolButtons[TOOL_TEMPLATE].MouseDown += new System.Windows.Forms.MouseEventHandler(this.mousePressed);
			
			SelectElement("C");
			
			// menus
			
			System.Windows.Forms.MainMenu menubar = new System.Windows.Forms.MainMenu();
			
			System.Windows.Forms.MenuItem menufile = new System.Windows.Forms.MenuItem("&File");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			// menufile.setMnemonic((int) System.Windows.Forms.Keys.F);
			menufile.MenuItems.Add(MenuItem("New", (int) System.Windows.Forms.Keys.N, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('N' | (int) System.Windows.Forms.Keys.Control))));
			menufile.MenuItems.Add(MenuItem("New Window", (int) System.Windows.Forms.Keys.W, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('N' | (int) System.Windows.Forms.Keys.Control + (int) System.Windows.Forms.Keys.Shift))));
			menufile.MenuItems.Add(MenuItem("Open", (int) System.Windows.Forms.Keys.O, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('O' | (int) System.Windows.Forms.Keys.Control))));
			if (!streamMode)
				menufile.MenuItems.Add(MenuItem("Save", (int) System.Windows.Forms.Keys.S, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('S' | (int) System.Windows.Forms.Keys.Control))));
			menufile.MenuItems.Add(MenuItem("Save As", (int) System.Windows.Forms.Keys.A));
			System.Windows.Forms.MenuItem menuexport = new System.Windows.Forms.MenuItem("&Export");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			// menuexport.setMnemonic((int) System.Windows.Forms.Keys.X);
			menuexport.MenuItems.Add(MenuItem("as MDL MOL", (int) System.Windows.Forms.Keys.M, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('M' | (int) System.Windows.Forms.Keys.Control + (int) System.Windows.Forms.Keys.Shift))));
			menuexport.MenuItems.Add(MenuItem("as CML XML", (int) System.Windows.Forms.Keys.X, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('X' | (int) System.Windows.Forms.Keys.Control + (int) System.Windows.Forms.Keys.Shift))));
			menufile.MenuItems.Add(menuexport);
			menufile.MenuItems.Add(new System.Windows.Forms.MenuItem("-"));
			if (!streamMode)
				menufile.MenuItems.Add(MenuItem("Quit", (int) System.Windows.Forms.Keys.Q, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('Q' | (int) System.Windows.Forms.Keys.Control))));
			else
				menufile.MenuItems.Add(MenuItem("Save & Quit", (int) System.Windows.Forms.Keys.Q, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('Q' | (int) System.Windows.Forms.Keys.Control))));
			
			System.Windows.Forms.MenuItem menuedit = new System.Windows.Forms.MenuItem("&Edit");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			// menuedit.setMnemonic((int) System.Windows.Forms.Keys.E);
			menuedit.MenuItems.Add(MenuItem("Edit...", (int) System.Windows.Forms.Keys.E, toolIcons[TOOL_DIALOG], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) (' ' | (int) System.Windows.Forms.Keys.Control))));
			menuedit.MenuItems.Add(MenuItem("Undo", (int) System.Windows.Forms.Keys.U, toolIcons[TOOL_UNDO], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('Z' | (int) System.Windows.Forms.Keys.Control))));
			menuedit.MenuItems.Add(MenuItem("Redo", (int) System.Windows.Forms.Keys.R, toolIcons[TOOL_REDO], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('Z' | (int) System.Windows.Forms.Keys.Control + (int) System.Windows.Forms.Keys.Shift))));
			menuedit.MenuItems.Add(MenuItem("Cut", (int) System.Windows.Forms.Keys.X, toolIcons[TOOL_CUT], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('X' | (int) System.Windows.Forms.Keys.Control))));
			menuedit.MenuItems.Add(MenuItem("Copy", (int) System.Windows.Forms.Keys.C, toolIcons[TOOL_COPY], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('C' | (int) System.Windows.Forms.Keys.Control))));
			menuedit.MenuItems.Add(MenuItem("Paste", (int) System.Windows.Forms.Keys.V, toolIcons[TOOL_PASTE], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('V' | (int) System.Windows.Forms.Keys.Control))));
			menuedit.MenuItems.Add(new System.Windows.Forms.MenuItem("-"));
			menuedit.MenuItems.Add(MenuItem("Select All", (int) System.Windows.Forms.Keys.S, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('A' | (int) System.Windows.Forms.Keys.Control))));
			menuedit.MenuItems.Add(MenuItem("Next Atom", (int) System.Windows.Forms.Keys.N, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('E' | (int) System.Windows.Forms.Keys.Control))));
			menuedit.MenuItems.Add(MenuItem("Previous Atom", (int) System.Windows.Forms.Keys.P, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('E' | (int) System.Windows.Forms.Keys.Control + (int) System.Windows.Forms.Keys.Shift))));
			menuedit.MenuItems.Add(MenuItem("Next Group", (int) System.Windows.Forms.Keys.G, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('G' | (int) System.Windows.Forms.Keys.Control))));
			menuedit.MenuItems.Add(MenuItem("Previous Group", (int) System.Windows.Forms.Keys.R, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('G' | (int) System.Windows.Forms.Keys.Control + (int) System.Windows.Forms.Keys.Shift))));
			menuedit.MenuItems.Add(new System.Windows.Forms.MenuItem("-"));
			menuedit.MenuItems.Add(MenuItem("Flip Horizontal", (int) System.Windows.Forms.Keys.H, null, null));
			menuedit.MenuItems.Add(MenuItem("Flip Vertical", (int) System.Windows.Forms.Keys.V, null, null));
			menuedit.MenuItems.Add(MenuItem("Rotate +45°", (int) System.Windows.Forms.Keys.D4, null, null));
			menuedit.MenuItems.Add(MenuItem("Rotate -45°", (int) System.Windows.Forms.Keys.D5, null, null));
			menuedit.MenuItems.Add(MenuItem("Rotate +90°", (int) System.Windows.Forms.Keys.D9, null, null));
			menuedit.MenuItems.Add(MenuItem("Rotate -90°", (int) System.Windows.Forms.Keys.D0, null, null));
			menuedit.MenuItems.Add(new System.Windows.Forms.MenuItem("-"));
			menuedit.MenuItems.Add(MenuItem("Add Temporary Template", (int) System.Windows.Forms.Keys.T, null, null));
			menuedit.MenuItems.Add(MenuItem("Normalise Bond Lengths", (int) System.Windows.Forms.Keys.N, null, null));
			
			System.Windows.Forms.MenuItem menuview = new System.Windows.Forms.MenuItem("&View");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			// menuview.setMnemonic((int) System.Windows.Forms.Keys.V);
			menuview.MenuItems.Add(MenuItem("Zoom Full", (int) System.Windows.Forms.Keys.F, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('0' | (int) System.Windows.Forms.Keys.Control))));
			menuview.MenuItems.Add(MenuItem("Zoom In", (int) System.Windows.Forms.Keys.I, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('=' | (int) System.Windows.Forms.Keys.Control))));
			menuview.MenuItems.Add(MenuItem("Zoom Out", (int) System.Windows.Forms.Keys.O, null, new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('-' | (int) System.Windows.Forms.Keys.Control))));
			menuview.MenuItems.Add(new System.Windows.Forms.MenuItem("-"));
			//UPGRADE_TODO: Class 'javax.swing.ButtonGroup' was converted to 'System.Collections.IList' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
			System.Collections.IList showBG = new ArrayList();
			menuview.MenuItems.Add(RadioMenuItem("Show Elements", (int) System.Windows.Forms.Keys.E, true, showBG));
			menuview.MenuItems.Add(RadioMenuItem("Show All Elements", (int) System.Windows.Forms.Keys.A, false, showBG));
			menuview.MenuItems.Add(RadioMenuItem("Show Indices", (int) System.Windows.Forms.Keys.I, false, showBG));
			menuview.MenuItems.Add(RadioMenuItem("Show Ring ID", (int) System.Windows.Forms.Keys.R, false, showBG));
			menuview.MenuItems.Add(RadioMenuItem("Show CIP Priority", (int) System.Windows.Forms.Keys.C, false, showBG));
			
			System.Windows.Forms.MenuItem menutool = new System.Windows.Forms.MenuItem("&Tool");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			// menutool.setMnemonic((int) System.Windows.Forms.Keys.T);
			menutool.MenuItems.Add(MenuItem("Cursor", (int) System.Windows.Forms.Keys.C, toolIcons[TOOL_CURSOR], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ((int) System.Windows.Forms.Keys.Escape | 0))));
			menutool.MenuItems.Add(MenuItem("Rotator", (int) System.Windows.Forms.Keys.R, toolIcons[TOOL_ROTATOR], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('R' | (int) System.Windows.Forms.Keys.Control))));
			menutool.MenuItems.Add(MenuItem("Erasor", (int) System.Windows.Forms.Keys.E, toolIcons[TOOL_ERASOR], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('D' | (int) System.Windows.Forms.Keys.Control))));
			menutool.MenuItems.Add(MenuItem("Edit Atom", (int) System.Windows.Forms.Keys.A, toolIcons[TOOL_EDIT], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) (',' | (int) System.Windows.Forms.Keys.Control))));
			//UPGRADE_ISSUE: Constructor 'javax.swing.Image.Image' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingImageIconImageIcon_javanetURL'"
			GetType();
			//UPGRADE_TODO: Method 'java.lang.Class.getResource' was converted to 'System.Uri' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javalangClassgetResource_javalangString'"
			menutool.MenuItems.Add(MenuItem("Set Atom", (int) System.Windows.Forms.Keys.S, new Bitmap(Utility.GetFullPath("/images/ASelMenu.png")), new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('.' | (int) System.Windows.Forms.Keys.Control))));
			menutool.MenuItems.Add(MenuItem("Single Bond", (int) System.Windows.Forms.Keys.D1, toolIcons[TOOL_SINGLE], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('1' | (int) System.Windows.Forms.Keys.Control))));
			menutool.MenuItems.Add(MenuItem("Double Bond", (int) System.Windows.Forms.Keys.D2, toolIcons[TOOL_DOUBLE], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('2' | (int) System.Windows.Forms.Keys.Control))));
			menutool.MenuItems.Add(MenuItem("Triple Bond", (int) System.Windows.Forms.Keys.D3, toolIcons[TOOL_TRIPLE], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('3' | (int) System.Windows.Forms.Keys.Control))));
			menutool.MenuItems.Add(MenuItem("Zero Bond", (int) System.Windows.Forms.Keys.D0, toolIcons[TOOL_ZERO], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('0' | (int) System.Windows.Forms.Keys.Control))));
			menutool.MenuItems.Add(MenuItem("Inclined Bond", (int) System.Windows.Forms.Keys.I, toolIcons[TOOL_INCLINED]));
			menutool.MenuItems.Add(MenuItem("Declined Bond", (int) System.Windows.Forms.Keys.D, toolIcons[TOOL_DECLINED]));
			menutool.MenuItems.Add(MenuItem("Unknown Bond", (int) System.Windows.Forms.Keys.U, toolIcons[TOOL_UNKNOWN]));
			menutool.MenuItems.Add(MenuItem("Charge", (int) System.Windows.Forms.Keys.H, toolIcons[TOOL_CHARGE], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('H' | (int) System.Windows.Forms.Keys.Control))));
			menutool.MenuItems.Add(MenuItem("Template Tool", (int) System.Windows.Forms.Keys.T, toolIcons[TOOL_TEMPLATE], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('T' | (int) System.Windows.Forms.Keys.Control))));
			menutool.MenuItems.Add(MenuItem("Select Template", (int) System.Windows.Forms.Keys.T, toolIcons[TOOL_TEMPLATE], new System.Windows.Forms.KeyEventArgs((System.Windows.Forms.Keys) ('T' | (int) System.Windows.Forms.Keys.Control + (int) System.Windows.Forms.Keys.Shift))));
			System.Windows.Forms.MenuItem menuhydr = new System.Windows.Forms.MenuItem("H&ydrogen");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			// menuhydr.setMnemonic((int) System.Windows.Forms.Keys.Y);
			chkShowHydr = new System.Windows.Forms.MenuItem("Show H&ydrogen");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			// chkShowHydr.setMnemonic((int) System.Windows.Forms.Keys.Y);
			chkShowHydr.Checked = true;
			chkShowHydr.Click += new System.EventHandler(this.actionPerformed);
			SupportClass.CommandManager.CheckCommand(chkShowHydr);
			menuhydr.MenuItems.Add(chkShowHydr);
			menuhydr.MenuItems.Add(MenuItem("Set Explicit", (int) System.Windows.Forms.Keys.E));
			menuhydr.MenuItems.Add(MenuItem("Clear Explicit", (int) System.Windows.Forms.Keys.X));
			menuhydr.MenuItems.Add(MenuItem("Zero Explicit", (int) System.Windows.Forms.Keys.Z));
			menuhydr.MenuItems.Add(MenuItem("Create Actual", (int) System.Windows.Forms.Keys.C));
			menuhydr.MenuItems.Add(MenuItem("Delete Actual", (int) System.Windows.Forms.Keys.D));
			
			System.Windows.Forms.MenuItem menuster = new System.Windows.Forms.MenuItem("&Stereochemistry");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			//menuster.setMnemonic((int) System.Windows.Forms.Keys.S);
			chkShowSter = new System.Windows.Forms.MenuItem("Show Stereo&labels");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			// chkShowSter.setMnemonic((int) System.Windows.Forms.Keys.L);
			chkShowSter.Checked = false;
			chkShowSter.Click += new System.EventHandler(this.actionPerformed);
			SupportClass.CommandManager.CheckCommand(chkShowSter);
			menuster.MenuItems.Add(chkShowSter);
			menuster.MenuItems.Add(MenuItem("Invert Stereochemistry", (int) System.Windows.Forms.Keys.I));
			menuster.MenuItems.Add(MenuItem("Set R/Z", (int) System.Windows.Forms.Keys.R));
			menuster.MenuItems.Add(MenuItem("Set S/E", (int) System.Windows.Forms.Keys.S));
			menuster.MenuItems.Add(MenuItem("Cycle Wedges", (int) System.Windows.Forms.Keys.C));
			menuster.MenuItems.Add(MenuItem("Remove Wedges", (int) System.Windows.Forms.Keys.W));
			
			System.Windows.Forms.MenuItem menuhelp = new System.Windows.Forms.MenuItem("&Help");
			//UPGRADE_ISSUE: Method 'javax.swing.AbstractButton.setMnemonic' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingAbstractButtonsetMnemonic_int'"
			// menuhelp.setMnemonic((int) System.Windows.Forms.Keys.H);
			menuhelp.MenuItems.Add(MenuItem("About", (int) System.Windows.Forms.Keys.A));
			
			menubar.MenuItems.Add(menufile);
			menubar.MenuItems.Add(menuedit);
			menubar.MenuItems.Add(menuview);
			menubar.MenuItems.Add(menutool);
			menubar.MenuItems.Add(menuhydr);
			menubar.MenuItems.Add(menuster);
			//UPGRADE_ISSUE: Method 'javax.swing.Box.createHorizontalGlue' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingBox'"
			//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'"
            // TODO: Figure out what horizontal glue is and find equiv
            //System.Windows.Forms.Control temp_Control;
            //temp_Control = Box.createHorizontalGlue();
            //menubar.Controls.Add(temp_Control);
			menubar.MenuItems.Add(menuhelp);
			
			// molecule
			
			editor = new EditorPane(this.Width, this.Height, false);
            editor.SetMolSelectListener((MolSelectListener)this); 
            
			//UPGRADE_TODO: Class 'javax.swing.JScrollPane' was converted to 'System.Windows.Forms.ScrollableControl' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
			//UPGRADE_TODO: Constructor 'javax.swing.JScrollPane.JScrollPane' was converted to 'System.Windows.Forms.ScrollableControl.ScrollableControl' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJScrollPaneJScrollPane_javaawtComponent'"
			System.Windows.Forms.ScrollableControl temp_scrollablecontrol;
			temp_scrollablecontrol = new System.Windows.Forms.ScrollableControl();
			temp_scrollablecontrol.AutoScroll = true;
			temp_scrollablecontrol.Controls.Add(editor);
			System.Windows.Forms.ScrollableControl scroll = temp_scrollablecontrol;
			
			// overall layout
			
			//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
			//UPGRADE_ISSUE: Method 'java.awt.Container.setLayout' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaawtContainersetLayout_javaawtLayoutManager'"
			//UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaawtBorderLayout'"
			/*
			((System.Windows.Forms.ContainerControl) this).setLayout(new BorderLayout());*/
			//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
			//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_javalangObject'"
			((System.Windows.Forms.ContainerControl) this).Controls.Add(scroll);
			scroll.Dock = System.Windows.Forms.DockStyle.Fill;
			scroll.BringToFront();
			//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
			//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_javalangObject'"
			// ((System.Windows.Forms.ContainerControl) this).Controls.Add(menubar);
			// menubar.Dock = System.Windows.Forms.DockStyle.Top;
			// menubar.SendToBack();
			//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
			//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_javalangObject'"
			//UPGRADE_ISSUE: Method 'java.awt.Window.pack' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaawtWindowpack'"
// 			pack();
			
			editor.Focus();
			
			editor.SetToolCursor();
			
			if (LoadFN != null)
			{
				try
				{
					//UPGRADE_TODO: Constructor 'java.io.FileInputStream.FileInputStream' was converted to 'System.IO.FileStream.FileStream' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioFileInputStreamFileInputStream_javalangString'"
					System.IO.FileStream istr = new System.IO.FileStream(LoadFN, System.IO.FileMode.Open, System.IO.FileAccess.Read);
					Molecule frag = MoleculeStream.ReadUnknown(istr);
					editor.AddArbitraryFragment(frag);
					istr.Close();
				}
				catch (System.IO.IOException e)
				{
					//UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
					SupportClass.OptionPaneSupport.ShowMessageDialog(null, e.ToString(), "Open Failed", (int) System.Windows.Forms.MessageBoxIcon.Error);
					return ;
				}
				
				SetFilename(LoadFN);
				editor.NotifySaved();
			}
			if (streamMode)
				ReadStream();
			
			KeyDown += new System.Windows.Forms.KeyEventHandler(this.keyPressed);
			KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.keyTyped);
			editor.KeyDown += new System.Windows.Forms.KeyEventHandler(this.keyPressed);
			editor.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.keyTyped);
		}
Beispiel #9
0
 public TxtPeso() 
 {
     KeyPress += new System.Windows.Forms.KeyPressEventHandler(txtPeso_KeyPress);
 }
Beispiel #10
0
 private void backgroundWorker2_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     TimerUtil.TraceAndDebugMessage("Completed", 1);
     buttonTimeIn.Click += new System.EventHandler(this.buttonTimeIn_Click);
     KeyPress           += new System.Windows.Forms.KeyPressEventHandler(this.Form1_KeyPress);
 }