Пример #1
0
        public Display(Game game)
        {
            this.game = game;

            //Init display
            InitializeComponent();

            //Init framebuffer
            DoubleBuffered = true;

            //Change cur

            //Cursor.Hide();

            //Init events
            KeyDown += new System.Windows.Forms.KeyEventHandler(game.keyManager.KeyDown);
            KeyUp   += new System.Windows.Forms.KeyEventHandler(game.keyManager.KeyUp);

            MouseDown  += new System.Windows.Forms.MouseEventHandler(game.mouseManager.mouseDown);
            MouseMove  += new System.Windows.Forms.MouseEventHandler(game.mouseManager.mouseMove);
            MouseUp    += new System.Windows.Forms.MouseEventHandler(game.mouseManager.mouseUp);
            MouseWheel += new MouseEventHandler(game.mouseManager.mouseWheel);

            this.MouseEnter += new System.EventHandler(game.mouseManager.mouseEnter);
            this.MouseLeave += new System.EventHandler(game.mouseManager.mouseLeave);
            this.MouseHover += new System.EventHandler(game.mouseManager.mouseHover);

            Paint      += new System.Windows.Forms.PaintEventHandler(game.render);
            FormClosed += new System.Windows.Forms.FormClosedEventHandler(game.displayClosed);
        }
Пример #2
0
 /// <summary> Registers the event handlers. </summary>
 private void RegisterEventHandlers()
 {
     // Below we setup even handlers for this class:
     Load             += new System.EventHandler(this.OnLoad);                     // Setup Load Event Handler
     Paint            += new System.Windows.Forms.PaintEventHandler(this.OnPaint); // Setup Paint Event Handler
     SizeChanged      += new System.EventHandler(this.OnSizeChange);               // Setup Size Changed Enet Handler.
     Application.Idle += new EventHandler(Application_Idle);                       // make sure we render when UI is otherwise idle!
 }
 /// <summary>
 /// Rysuje marker na próbce
 /// </summary>
 private void showXValue()
 {
     if (ifShowMarked)
     {
         DeleteSelection();
         Paint += new System.Windows.Forms.PaintEventHandler(showXValuePaint);
     }
 }
Пример #4
0
        public Class1()
        {
            Paint += new System.Windows.Forms.PaintEventHandler(Class1_Paint);
            Timer t = new Timer();

            t.Interval = 50;
            t.Tick    += new EventHandler(t_Tick);
            t.Start();
            f = Xperdex.GetFontTracker("test tracker").f;
        }
Пример #5
0
 public BoardControl(Control parent)
 {
     Paint       += new System.Windows.Forms.PaintEventHandler(BoardControl_Paint);
     SizeChanged += new EventHandler(BoardControl_SizeChanged);
     MouseMove   += new MouseEventHandler(BoardControl_MouseMove);
     MouseDown   += new MouseEventHandler(BoardControl_MouseDown);
     MouseUp     += new MouseEventHandler(BoardControl_MouseUp);
     //Mouse
     //Update += new DoUpdate( BoardControl_Update );
 }
Пример #6
0
 public OpaqueBorder(Form owner)
 {
     Owner           = owner;
     TransparencyKey = Color.Red;
     BackColor       = Color.Red;
     ShowInTaskbar   = false;
     FormBorderStyle = FormBorderStyle.None;
     ControlBox      = false;
     StartPosition   = FormStartPosition.Manual;
     Paint          += new System.Windows.Forms.PaintEventHandler(OpaqueBorder_Paint);
 }
 /// <summary>
 /// Pokazuje maksimum (dodatnie lub ujemne)
 /// </summary>
 private void showMaximum()
 {
     if (ifShowMarked)
     {
         DeleteSelection();
         Paint += new System.Windows.Forms.PaintEventHandler(ShowMaximumPaint);
     }
     else
     {
     }
 }
Пример #8
0
        public InspectViewNew()
        {
            InitializeComponent();
            MouseWheel += new System.Windows.Forms.MouseEventHandler(pnlFov_MouseWheel);
            Paint      += new System.Windows.Forms.PaintEventHandler(pnlFov_Paint);
            MouseMove  += new System.Windows.Forms.MouseEventHandler(pnlFov_MouseMove);
            MouseUp    += new System.Windows.Forms.MouseEventHandler(pnlFov_MouseUp);

            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);  // 禁止擦除背景.
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true); // 双缓冲
        }
 /// <summary>
 /// Rysuje nowy prostokąt selekcji
 /// </summary>
 private void DrawSelection(MouseEventArgs e)
 {
     if (e.X < Width - RealWidthOfChart - 1)
     {
         selection.begin = Width - RealWidthOfChart - 1;
     }
     else
     {
         selection.begin = e.X;
     }
     selection.scope = new Rectangle(selection.begin, 0, 1, RealHeightOfChart);
     Paint          += new System.Windows.Forms.PaintEventHandler(DrawSelectedEvent);
 }
Пример #10
0
 /// <summary> Registers the event handlers. </summary>
 private void RegisterEventHandlers()
 {
     // Below we setup even handlers for this class:
     Load        += new System.EventHandler(this.OnLoad);                     // Setup Load Event Handler
     Paint       += new System.Windows.Forms.PaintEventHandler(this.OnPaint); // Setup Paint Event Handler
     SizeChanged += new System.EventHandler(this.OnSizeChange);               // Setup Size Changed Enet Handler.
     MouseMove   += new MouseEventHandler(OnMouseMove);                       // Setup Mouse Move Event handler
     MouseDown   += new MouseEventHandler(OnMouseDown);                       // Setup Mouse Down Event handler.
     MouseUp     += new MouseEventHandler(OnMouseUp);                         // Setup Mouse Down Event handler.
     //MouseHover += new EventHandler(GLCanvas_OnMouseHover);
     KeyDown += new KeyEventHandler(OnKeyDown);
     //MouseUp += new MouseEventHandler(OnMouseUp);
     //Application.Idle += new EventHandler(Application_Idle);
 }
Пример #11
0
        public Canvas(int iRows, int iCols,
                      int iBorder, int iPixelSize,
                      int iCharHeight, int iCharWidth,
                      Color FontColor, Color BackColor)
            : base()
        {
            // setup dimensions
            m_iRows          = iRows;
            m_iCols          = iCols;
            m_iPixelSize     = iPixelSize;
            m_iScanLineWidth = m_iCols * iCharWidth * m_iPixelSize;

            m_iCharHeight = iCharHeight;
            m_iCharWidth  = iCharWidth;

            Width  = iCols * iPixelSize * iCharWidth;
            Height = iRows * iPixelSize * iCharHeight;
            Top    = iBorder;
            Left   = iBorder;

            // setup colors
            m_BackColor          = BackColor;
            m_FontColor          = FontColor;
            m_Palette            = new Bitmap(1, 1, PixelFormat.Format1bppIndexed).Palette;
            m_Palette.Entries[0] = m_BackColor;
            m_Palette.Entries[1] = m_FontColor;

            // setup drawing buffers
            m_DrawBuffer = new byte[iRows][][]; // init rows
            for (int r = 0; r < iRows; r++)
            {
                m_DrawBuffer[r] = new byte[iCharHeight][]; // init (bit) lines per row
                for (int l = 0; l < iCharHeight; l++)
                {
                    m_DrawBuffer[r][l] = new byte[iCols]; // init cols per line (8 bits per col)
                }
            }
            m_PixelLineCache      = new Bitmap[iRows * iCharHeight];
            m_PixelLineNeedRedraw = new bool[iRows * iCharHeight];
            m_PixelLineIsEmpty    = new bool[iRows * iCharHeight];
            for (int pl = 0; pl < iRows * iCharHeight; pl++)
            {
                m_PixelLineNeedRedraw[pl] = m_PixelLineIsEmpty[pl] = true;
            }

            SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);

            Paint += new System.Windows.Forms.PaintEventHandler(CanvasPaint_1bpp);
        }
Пример #12
0
        public SpareField()
        {
            InitializeComponent();

            gdi = new GDICompatible(Handle.ToInt32());
            gdi.InitContext();

            Paint       += new System.Windows.Forms.PaintEventHandler(DoPaint);
            SizeChanged += new System.EventHandler(DoSizeChanged);
            MouseMove   += new MouseEventHandler(DoMouseMove);
            MouseUp     += new MouseEventHandler(DoMouseUp);
            MouseDown   += new MouseEventHandler(DoMouseDown);
            Click       += new EventHandler(DoClick);
            DoubleClick += new EventHandler(DoDoubleClick);
        }
Пример #13
0
        private void InitializeComponent()
        {
            ControlBox = false;
            TopLevel   = false;

            this.ImeMode = System.Windows.Forms.ImeMode.NoControl;

            SizeChanged += new System.EventHandler(OnSizeChanged);
            Paint       += new System.Windows.Forms.PaintEventHandler(OnPaint);

            MouseDown += new System.Windows.Forms.MouseEventHandler(OnMouseDown);
            MouseUp   += new System.Windows.Forms.MouseEventHandler(OnMouseUp);
            MouseMove += new System.Windows.Forms.MouseEventHandler(OnMouseMove);

            Popup               = new ContextMenu();
            ContextWireframe    = new MenuItem();
            ContextShading      = new MenuItem();
            ContextColor        = new MenuItem();
            ContextMaterial     = new MenuItem();
            ContextTransparency = new MenuItem();
            ContextDelete       = new MenuItem();
            ContextBackground   = new MenuItem();

            ContextWireframe.Text    = "Wireframe";
            ContextShading.Text      = "Shading";
            ContextColor.Text        = "Color";
            ContextMaterial.Text     = "Material";
            ContextTransparency.Text = "Transparency";
            ContextDelete.Text       = "Delete";
            ContextBackground.Text   = "Background";

            ContextWireframe.Click    += new System.EventHandler(ContextWireframe_Click);
            ContextShading.Click      += new System.EventHandler(ContextShading_Click);
            ContextColor.Click        += new System.EventHandler(ContextColor_Click);
            ContextMaterial.Click     += new System.EventHandler(ContextMaterial_Click);
            ContextTransparency.Click += new System.EventHandler(ContextTransparency_Click);
            ContextDelete.Click       += new System.EventHandler(ContextDelete_Click);
            ContextBackground.Click   += new System.EventHandler(ContextBackground_Click);

            Popup.MenuItems.AddRange(new MenuItem[] { ContextWireframe,
                                                      ContextShading,
                                                      ContextColor,
                                                      ContextMaterial,
                                                      ContextTransparency,
                                                      ContextDelete,
                                                      ContextBackground });
            Popup.Popup += new System.EventHandler(OnPopup);
        }
Пример #14
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);
 }
Пример #15
0
 protected override void OnPaint(PaintEventArgs e)
 {
     if (m_OwnerDraw)
     {
         System.Reflection.FieldInfo field = typeof(System.Windows.Forms.Control).GetField("EventPaint", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
         if (field != null)
         {
             System.Windows.Forms.PaintEventHandler handler = (System.Windows.Forms.PaintEventHandler) this.Events[field.GetValue(this)];
             if (handler != null)
             {
                 handler(this, e);
             }
         }
     }
     else
     {
         base.OnPaint(e);
     }
 }
Пример #16
0
 private void InitializeComponent()
 {
     //
     // VistaButton
     //
     Name           = "VistaButton";
     Size           = new System.Drawing.Size(100, 32);
     Paint         += new System.Windows.Forms.PaintEventHandler(VistaButton_Paint);
     KeyUp         += new System.Windows.Forms.KeyEventHandler(VistaButton_KeyUp);
     KeyDown       += new System.Windows.Forms.KeyEventHandler(VistaButton_KeyDown);
     MouseEnter    += new System.EventHandler(VistaButton_MouseEnter);
     MouseLeave    += new System.EventHandler(VistaButton_MouseLeave);
     MouseUp       += new MouseEventHandler(VistaButton_MouseUp);
     MouseDown     += new System.Windows.Forms.MouseEventHandler(VistaButton_MouseDown);
     GotFocus      += new EventHandler(VistaButton_MouseEnter);
     LostFocus     += new EventHandler(VistaButton_MouseLeave);
     mFadeIn.Tick  += new EventHandler(mFadeIn_Tick);
     mFadeOut.Tick += new EventHandler(mFadeOut_Tick);
     Resize        += new EventHandler(VistaButton_Resize);
 }
 private void InitializePicutreBox()
 {
     BackColor       = System.Drawing.Color.White;
     BorderStyle     = System.Windows.Forms.BorderStyle.FixedSingle;
     Cursor          = System.Windows.Forms.Cursors.Default;
     DoubleBuffering = true;
     Name            = "cadPictBox";
     Ortho           = false;
     Position        = new System.Drawing.Point(0, 0);
     ScrollBars      = CADImport.FaceModule.ScrollBarsShow.None;
     TabStop         = false;
     VirtualSize     = new System.Drawing.Size(0, 0);
     Paint          += new System.Windows.Forms.PaintEventHandler(this.cadPictBox_Paint);
     KeyDown        += new System.Windows.Forms.KeyEventHandler(this.cadPictBox_KeyDown);
     MouseDown      += new System.Windows.Forms.MouseEventHandler(this.cadPictBox_MouseDown);
     MouseMove      += new System.Windows.Forms.MouseEventHandler(this.cadPictBox_MouseMove);
     MouseUp        += new System.Windows.Forms.MouseEventHandler(this.cadPictBox_MouseUp);
     Resize         += new System.EventHandler(this.cadPictBox_Resize);
     SetGDIStyle();
     CADLayerForm = new LayerForm();
 }
        /// <summary>
        /// Rozciąga prostokąt selekcji
        /// </summary>
        private void StretchSelection(MouseEventArgs e)
        {
            Paint -= new System.Windows.Forms.PaintEventHandler(DrawSelectedEvent);
            if (e.X > selection.begin)
            {
                if (e.X > Width)
                {
                    selection.end = Width - 1;
                }
                else
                {
                    selection.end = e.X;
                }

                selection.scope = new Rectangle(selection.begin, 0, selection.end - selection.begin, RealHeightOfChart);

                Paint       += new System.Windows.Forms.PaintEventHandler(DrawSelectedEvent);
                ifShowMarked = true;
            }
            else
            {
                ifShowMarked = false;
            }
        }
        /// <summary>
        /// Konstruktor
        /// </summary>
        public SignalGraph(int x, int y, int Height, int Width, string xLabel, string yLabel, string description, string type)
        {
            this.leftPadding            = 40;
            this.widthOfVerticalAxis    = 3;
            this.downPadding            = 50;
            this.widthOfHorizontialAxis = 3;
            this.shift           = 0;
            this.horizontialZoom = 100;

            this.typeOfSignal = type;

            Location    = new System.Drawing.Point(x, y);
            this.Width  = Width;
            this.Height = Height;

            BackColor = System.Drawing.Color.White;
            Paint    += new System.Windows.Forms.PaintEventHandler(PrepareChartEvent);

            selection.pen   = new Pen(Color.Red);
            this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MouseDownEvent);
            this.MouseUp   += new System.Windows.Forms.MouseEventHandler(this.MouseUpEvent);
            SetLabels(xLabel, yLabel, description);
            initializeButtons();
        }
        /// <summary>
        /// Form Method load on startup
        /// </summary>
        /// <param name="Paint">Keeping the Paint object always on</param>
        public Form1()
        {
            // stores color white in the color object by default
            color = Color.White;

            // And the counter to 1 as the bucket has no water in it
            counter = 1;

            // and the initially faucet is stopped and it is not filled
            // so declaring stopped variable as true and filled variable as false
            stopped = true; filled = false;

            // Initialzes all components of form designs
            InitializeComponent();

            // Keeps declaring Paint object and passes "paintingForm" as method argument
            Paint += new System.Windows.Forms.PaintEventHandler(paintingForm);

            // trackbar is set to 0 to say there is no water falling from the faucet initially
            trackBar1.Value = 0;

            // displaying the faucet image
            this.pictureBox1.Image = Image.FromFile("../Faucet.jpg");
        }
Пример #21
0
 private void InitializeComponent()
 {
     components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TrackForm));
     picTrack              = new System.Windows.Forms.PictureBox();
     timerClock1           = new System.Windows.Forms.Timer(components);
     btnStage              = new System.Windows.Forms.Button();
     btnReset              = new System.Windows.Forms.Button();
     groupControls         = new System.Windows.Forms.GroupBox();
     btnPrint              = new System.Windows.Forms.Button();
     groupTimeslip         = new System.Windows.Forms.GroupBox();
     richTextSlip          = new System.Windows.Forms.RichTextBox();
     btnOpen               = new System.Windows.Forms.Button();
     btnSave               = new System.Windows.Forms.Button();
     printDialog1          = new System.Windows.Forms.PrintDialog();
     printDocument1        = new System.Drawing.Printing.PrintDocument();
     printPreviewDialog1   = new System.Windows.Forms.PrintPreviewDialog();
     pageSetupDialog1      = new System.Windows.Forms.PageSetupDialog();
     groupTimeslipControls = new System.Windows.Forms.GroupBox();
     groupExport           = new System.Windows.Forms.GroupBox();
     btnExportJPEG         = new System.Windows.Forms.Button();
     ((System.ComponentModel.ISupportInitialize)(picTrack)).BeginInit();
     groupControls.SuspendLayout();
     groupTimeslip.SuspendLayout();
     groupTimeslipControls.SuspendLayout();
     groupExport.SuspendLayout();
     SuspendLayout();
     //
     // picTrack
     //
     picTrack.Image    = ((System.Drawing.Image)(resources.GetObject("picTrack.Image")));
     picTrack.Location = new System.Drawing.Point(0, 0);
     picTrack.Name     = "picTrack";
     picTrack.Size     = new System.Drawing.Size(490, 100);
     picTrack.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     picTrack.TabIndex = 0;
     picTrack.TabStop  = false;
     picTrack.Visible  = false;
     //
     // timerClock1
     //
     timerClock1.Interval = 51;
     timerClock1.Tick    += new System.EventHandler(timerClock_Tick);
     //
     // btnStage
     //
     btnStage.Location = new System.Drawing.Point(10, 20);
     btnStage.Name     = "btnStage";
     btnStage.Size     = new System.Drawing.Size(130, 25);
     btnStage.TabIndex = 1;
     btnStage.Text     = "&Stage";
     btnStage.Click   += new System.EventHandler(btnStage_Click);
     //
     // btnReset
     //
     btnReset.Enabled  = false;
     btnReset.Location = new System.Drawing.Point(10, 55);
     btnReset.Name     = "btnReset";
     btnReset.Size     = new System.Drawing.Size(130, 25);
     btnReset.TabIndex = 2;
     btnReset.Text     = "&Reset";
     btnReset.Click   += new System.EventHandler(btnReset_Click);
     //
     // groupControls
     //
     groupControls.Controls.Add(btnReset);
     groupControls.Controls.Add(btnStage);
     groupControls.Location = new System.Drawing.Point(10, 110);
     groupControls.Name     = "groupControls";
     groupControls.Size     = new System.Drawing.Size(150, 90);
     groupControls.TabIndex = 3;
     groupControls.TabStop  = false;
     groupControls.Text     = "Control";
     //
     // btnPrint
     //
     btnPrint.Location = new System.Drawing.Point(10, 90);
     btnPrint.Name     = "btnPrint";
     btnPrint.Size     = new System.Drawing.Size(130, 25);
     btnPrint.TabIndex = 4;
     btnPrint.Text     = "&Print";
     btnPrint.Click   += new System.EventHandler(btnPrint_Click);
     //
     // groupTimeslip
     //
     groupTimeslip.Controls.Add(richTextSlip);
     groupTimeslip.Location = new System.Drawing.Point(170, 110);
     groupTimeslip.Name     = "groupTimeslip";
     groupTimeslip.Size     = new System.Drawing.Size(315, 290);
     groupTimeslip.TabIndex = 4;
     groupTimeslip.TabStop  = false;
     //
     // richTextSlip
     //
     richTextSlip.BackColor   = System.Drawing.SystemColors.Control;
     richTextSlip.BorderStyle = System.Windows.Forms.BorderStyle.None;
     richTextSlip.Location    = new System.Drawing.Point(8, 16);
     richTextSlip.Name        = "richTextSlip";
     richTextSlip.ReadOnly    = true;
     richTextSlip.Size        = new System.Drawing.Size(296, 264);
     richTextSlip.TabIndex    = 0;
     richTextSlip.Text        = "";
     //
     // btnOpen
     //
     btnOpen.Location = new System.Drawing.Point(10, 55);
     btnOpen.Name     = "btnOpen";
     btnOpen.Size     = new System.Drawing.Size(130, 25);
     btnOpen.TabIndex = 2;
     btnOpen.Text     = "&Open";
     btnOpen.Click   += new System.EventHandler(btnOpen_Click);
     //
     // btnSave
     //
     btnSave.Location = new System.Drawing.Point(10, 20);
     btnSave.Name     = "btnSave";
     btnSave.Size     = new System.Drawing.Size(130, 25);
     btnSave.TabIndex = 1;
     btnSave.Text     = "&Save";
     btnSave.Click   += new System.EventHandler(btnSave_Click);
     //
     // printDialog1
     //
     printDialog1.Document = printDocument1;
     //
     // printDocument1
     //
     printDocument1.BeginPrint += new System.Drawing.Printing.PrintEventHandler(printDocument1_BeginPrint);
     printDocument1.PrintPage  += new System.Drawing.Printing.PrintPageEventHandler(printDocument1_PrintPage);
     //
     // printPreviewDialog1
     //
     printPreviewDialog1.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     printPreviewDialog1.ClientSize        = new System.Drawing.Size(400, 300);
     printPreviewDialog1.Document          = printDocument1;
     printPreviewDialog1.Enabled           = true;
     printPreviewDialog1.Icon    = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
     printPreviewDialog1.Name    = "printPreviewDialog1";
     printPreviewDialog1.Visible = false;
     //
     // pageSetupDialog1
     //
     pageSetupDialog1.Document = printDocument1;
     //
     // groupTimeslipControls
     //
     groupTimeslipControls.Controls.Add(btnSave);
     groupTimeslipControls.Controls.Add(btnOpen);
     groupTimeslipControls.Controls.Add(btnPrint);
     groupTimeslipControls.Location = new System.Drawing.Point(10, 210);
     groupTimeslipControls.Name     = "groupTimeslipControls";
     groupTimeslipControls.Size     = new System.Drawing.Size(150, 125);
     groupTimeslipControls.TabIndex = 5;
     groupTimeslipControls.TabStop  = false;
     groupTimeslipControls.Text     = "Timeslip";
     //
     // groupExport
     //
     groupExport.Controls.Add(btnExportJPEG);
     groupExport.Location = new System.Drawing.Point(10, 345);
     groupExport.Name     = "groupExport";
     groupExport.Size     = new System.Drawing.Size(150, 55);
     groupExport.TabIndex = 6;
     groupExport.TabStop  = false;
     groupExport.Text     = "Export";
     //
     // btnExportJPEG
     //
     btnExportJPEG.Location = new System.Drawing.Point(10, 20);
     btnExportJPEG.Name     = "btnExportJPEG";
     btnExportJPEG.Size     = new System.Drawing.Size(130, 25);
     btnExportJPEG.TabIndex = 6;
     btnExportJPEG.Text     = "&JPEG";
     btnExportJPEG.Click   += new System.EventHandler(btnExportJPEG_Click);
     //
     // TrackForm
     //
     AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     ClientSize        = new System.Drawing.Size(494, 408);
     ControlBox        = false;
     Controls.Add(groupExport);
     Controls.Add(groupTimeslipControls);
     Controls.Add(groupTimeslip);
     Controls.Add(groupControls);
     Controls.Add(picTrack);
     FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     MaximizeBox     = false;
     MinimizeBox     = false;
     Name            = "TrackForm";
     Text            = "Race Track Analysis";
     Activated      += new System.EventHandler(TrackForm_Activated);
     Paint          += new System.Windows.Forms.PaintEventHandler(TrackForm_Paint);
     Resize         += new System.EventHandler(TrackForm_Resize);
     ((System.ComponentModel.ISupportInitialize)(picTrack)).EndInit();
     groupControls.ResumeLayout(false);
     groupTimeslip.ResumeLayout(false);
     groupTimeslipControls.ResumeLayout(false);
     groupExport.ResumeLayout(false);
     ResumeLayout(false);
 }
 /// <summary>
 /// Usuwa prostokąt selekcji
 /// </summary>
 private void DeleteSelection()
 {
     Paint -= new System.Windows.Forms.PaintEventHandler(DrawSelectedEvent);
 }
 /// <summary>
 /// Usuwa zaznaczenie maximum
 /// </summary>
 private void deleteMaximum()
 {
     Paint -= new System.Windows.Forms.PaintEventHandler(ShowMaximumPaint);
 }
Пример #24
0
 private void InitializeComponent()
 {
     components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TrackForm));
     picTrack = new System.Windows.Forms.PictureBox();
     timerClock1 = new System.Windows.Forms.Timer(components);
     btnStage = new System.Windows.Forms.Button();
     btnReset = new System.Windows.Forms.Button();
     groupControls = new System.Windows.Forms.GroupBox();
     btnPrint = new System.Windows.Forms.Button();
     groupTimeslip = new System.Windows.Forms.GroupBox();
     richTextSlip = new System.Windows.Forms.RichTextBox();
     btnOpen = new System.Windows.Forms.Button();
     btnSave = new System.Windows.Forms.Button();
     printDialog1 = new System.Windows.Forms.PrintDialog();
     printDocument1 = new System.Drawing.Printing.PrintDocument();
     printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
     pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog();
     groupTimeslipControls = new System.Windows.Forms.GroupBox();
     groupExport = new System.Windows.Forms.GroupBox();
     btnExportJPEG = new System.Windows.Forms.Button();
     ((System.ComponentModel.ISupportInitialize)(picTrack)).BeginInit();
     groupControls.SuspendLayout();
     groupTimeslip.SuspendLayout();
     groupTimeslipControls.SuspendLayout();
     groupExport.SuspendLayout();
     SuspendLayout();
     //
     // picTrack
     //
     picTrack.Image = ((System.Drawing.Image)(resources.GetObject("picTrack.Image")));
     picTrack.Location = new System.Drawing.Point(0, 0);
     picTrack.Name = "picTrack";
     picTrack.Size = new System.Drawing.Size(490, 100);
     picTrack.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     picTrack.TabIndex = 0;
     picTrack.TabStop = false;
     picTrack.Visible = false;
     //
     // timerClock1
     //
     timerClock1.Interval = 51;
     timerClock1.Tick += new System.EventHandler(timerClock_Tick);
     //
     // btnStage
     //
     btnStage.Location = new System.Drawing.Point(10, 20);
     btnStage.Name = "btnStage";
     btnStage.Size = new System.Drawing.Size(130, 25);
     btnStage.TabIndex = 1;
     btnStage.Text = "&Stage";
     btnStage.Click += new System.EventHandler(btnStage_Click);
     //
     // btnReset
     //
     btnReset.Enabled = false;
     btnReset.Location = new System.Drawing.Point(10, 55);
     btnReset.Name = "btnReset";
     btnReset.Size = new System.Drawing.Size(130, 25);
     btnReset.TabIndex = 2;
     btnReset.Text = "&Reset";
     btnReset.Click += new System.EventHandler(btnReset_Click);
     //
     // groupControls
     //
     groupControls.Controls.Add(btnReset);
     groupControls.Controls.Add(btnStage);
     groupControls.Location = new System.Drawing.Point(10, 110);
     groupControls.Name = "groupControls";
     groupControls.Size = new System.Drawing.Size(150, 90);
     groupControls.TabIndex = 3;
     groupControls.TabStop = false;
     groupControls.Text = "Control";
     //
     // btnPrint
     //
     btnPrint.Location = new System.Drawing.Point(10, 90);
     btnPrint.Name = "btnPrint";
     btnPrint.Size = new System.Drawing.Size(130, 25);
     btnPrint.TabIndex = 4;
     btnPrint.Text = "&Print";
     btnPrint.Click += new System.EventHandler(btnPrint_Click);
     //
     // groupTimeslip
     //
     groupTimeslip.Controls.Add(richTextSlip);
     groupTimeslip.Location = new System.Drawing.Point(170, 110);
     groupTimeslip.Name = "groupTimeslip";
     groupTimeslip.Size = new System.Drawing.Size(315, 290);
     groupTimeslip.TabIndex = 4;
     groupTimeslip.TabStop = false;
     //
     // richTextSlip
     //
     richTextSlip.BackColor = System.Drawing.SystemColors.Control;
     richTextSlip.BorderStyle = System.Windows.Forms.BorderStyle.None;
     richTextSlip.Location = new System.Drawing.Point(8, 16);
     richTextSlip.Name = "richTextSlip";
     richTextSlip.ReadOnly = true;
     richTextSlip.Size = new System.Drawing.Size(296, 264);
     richTextSlip.TabIndex = 0;
     richTextSlip.Text = "";
     //
     // btnOpen
     //
     btnOpen.Location = new System.Drawing.Point(10, 55);
     btnOpen.Name = "btnOpen";
     btnOpen.Size = new System.Drawing.Size(130, 25);
     btnOpen.TabIndex = 2;
     btnOpen.Text = "&Open";
     btnOpen.Click += new System.EventHandler(btnOpen_Click);
     //
     // btnSave
     //
     btnSave.Location = new System.Drawing.Point(10, 20);
     btnSave.Name = "btnSave";
     btnSave.Size = new System.Drawing.Size(130, 25);
     btnSave.TabIndex = 1;
     btnSave.Text = "&Save";
     btnSave.Click += new System.EventHandler(btnSave_Click);
     //
     // printDialog1
     //
     printDialog1.Document = printDocument1;
     //
     // printDocument1
     //
     printDocument1.BeginPrint += new System.Drawing.Printing.PrintEventHandler(printDocument1_BeginPrint);
     printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(printDocument1_PrintPage);
     //
     // printPreviewDialog1
     //
     printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
     printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
     printPreviewDialog1.Document = printDocument1;
     printPreviewDialog1.Enabled = true;
     printPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
     printPreviewDialog1.Name = "printPreviewDialog1";
     printPreviewDialog1.Visible = false;
     //
     // pageSetupDialog1
     //
     pageSetupDialog1.Document = printDocument1;
     //
     // groupTimeslipControls
     //
     groupTimeslipControls.Controls.Add(btnSave);
     groupTimeslipControls.Controls.Add(btnOpen);
     groupTimeslipControls.Controls.Add(btnPrint);
     groupTimeslipControls.Location = new System.Drawing.Point(10, 210);
     groupTimeslipControls.Name = "groupTimeslipControls";
     groupTimeslipControls.Size = new System.Drawing.Size(150, 125);
     groupTimeslipControls.TabIndex = 5;
     groupTimeslipControls.TabStop = false;
     groupTimeslipControls.Text = "Timeslip";
     //
     // groupExport
     //
     groupExport.Controls.Add(btnExportJPEG);
     groupExport.Location = new System.Drawing.Point(10, 345);
     groupExport.Name = "groupExport";
     groupExport.Size = new System.Drawing.Size(150, 55);
     groupExport.TabIndex = 6;
     groupExport.TabStop = false;
     groupExport.Text = "Export";
     //
     // btnExportJPEG
     //
     btnExportJPEG.Location = new System.Drawing.Point(10, 20);
     btnExportJPEG.Name = "btnExportJPEG";
     btnExportJPEG.Size = new System.Drawing.Size(130, 25);
     btnExportJPEG.TabIndex = 6;
     btnExportJPEG.Text = "&JPEG";
     btnExportJPEG.Click += new System.EventHandler(btnExportJPEG_Click);
     //
     // TrackForm
     //
     AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     ClientSize = new System.Drawing.Size(494, 408);
     ControlBox = false;
     Controls.Add(groupExport);
     Controls.Add(groupTimeslipControls);
     Controls.Add(groupTimeslip);
     Controls.Add(groupControls);
     Controls.Add(picTrack);
     FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     MaximizeBox = false;
     MinimizeBox = false;
     Name = "TrackForm";
     Text = "Race Track Analysis";
     Activated += new System.EventHandler(TrackForm_Activated);
     Paint += new System.Windows.Forms.PaintEventHandler(TrackForm_Paint);
     Resize += new System.EventHandler(TrackForm_Resize);
     ((System.ComponentModel.ISupportInitialize)(picTrack)).EndInit();
     groupControls.ResumeLayout(false);
     groupTimeslip.ResumeLayout(false);
     groupTimeslipControls.ResumeLayout(false);
     groupExport.ResumeLayout(false);
     ResumeLayout(false);
 }
 /// <summary>
 /// Usuwa marker
 /// </summary>
 private void deleteXValue()
 {
     Paint -= new System.Windows.Forms.PaintEventHandler(showXValuePaint);
 }
Пример #26
0
        private void InitializeComponent()
        {
            ControlBox = false;
            TopLevel = false;

            this.ImeMode = System.Windows.Forms.ImeMode.NoControl;

            SizeChanged += new System.EventHandler( OnSizeChanged );
            Paint += new System.Windows.Forms.PaintEventHandler( OnPaint );

            MouseDown += new System.Windows.Forms.MouseEventHandler( OnMouseDown );
            MouseUp += new System.Windows.Forms.MouseEventHandler( OnMouseUp );
            MouseMove += new System.Windows.Forms.MouseEventHandler( OnMouseMove );

            Popup = new ContextMenu();
            ContextWireframe = new MenuItem();
            ContextShading = new MenuItem();
            ContextColor = new MenuItem();
            ContextMaterial = new MenuItem();
            ContextTransparency = new MenuItem();
            ContextDelete = new MenuItem();
            ContextBackground = new MenuItem();

            ContextWireframe.Text = "Wireframe";
            ContextShading.Text = "Shading";
            ContextColor.Text = "Color";
            ContextMaterial.Text = "Material";
            ContextTransparency.Text = "Transparency";
            ContextDelete.Text = "Delete";
            ContextBackground.Text = "Background";

            ContextWireframe.Click += new System.EventHandler( ContextWireframe_Click );
            ContextShading.Click += new System.EventHandler( ContextShading_Click );
            ContextColor.Click += new System.EventHandler( ContextColor_Click );
            ContextMaterial.Click += new System.EventHandler( ContextMaterial_Click );
            ContextTransparency.Click += new System.EventHandler( ContextTransparency_Click );
            ContextDelete.Click += new System.EventHandler( ContextDelete_Click );
            ContextBackground.Click += new System.EventHandler( ContextBackground_Click );

            Popup.MenuItems.AddRange( new MenuItem[] { ContextWireframe,
	                                                   ContextShading,
	                                                   ContextColor,
	                                                   ContextMaterial,
	                                                   ContextTransparency,
	                                                   ContextDelete,
                                                       ContextBackground } );
            Popup.Popup += new System.EventHandler( OnPopup );
        }
 /// <summary>
 /// Funkcja rysujaca wykres
 /// </summary>
 public void DrawGraph()
 {
     Paint += new System.Windows.Forms.PaintEventHandler(DrawPlotEvent);
 }
Пример #28
0
 /// <summary> Registers the event handlers. </summary>
 private void RegisterEventHandlers()
 {
     // Below we setup even handlers for this class:
     Load += new System.EventHandler(this.OnLoad);                           // Setup Load Event Handler
     Paint += new System.Windows.Forms.PaintEventHandler(this.OnPaint);      // Setup Paint Event Handler
     SizeChanged += new System.EventHandler(this.OnSizeChange);              // Setup Size Changed Enet Handler.
     Application.Idle += new EventHandler(Application_Idle);                 // make sure we render when UI is otherwise idle!
 }
Пример #29
0
 public Form1()
 {
     InitializeComponent();
     Size   = new Size(1000, 1000);
     Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);
 }