상속: System.EventArgs
예제 #1
0
 protected void OnColorChanged(ColorChangeArgs e)
 {
     currentColor = e.NewColor;
     if (ColorChanged != null)
     {
         ColorChanged(this, e);
     }
 }
예제 #2
0
        void webColorsList_Click(object sender, System.EventArgs e)
        {
            Color           color = Color.FromName(webColorsList.Text);
            ColorChangeArgs ca    = new ColorChangeArgs(color, "WebTab");

            OnColorChanged(ca);
            exitLoop = true;
            Visible  = false;
        }
예제 #3
0
        void systemColorsList_Click(object sender, System.EventArgs e)
        {
            Color color = Color.FromName(systemColorsList.Text);

            currentColor = color;
            ColorChangeArgs ca = new ColorChangeArgs(color, "SystemTab");

            OnColorChanged(ca);
            exitLoop = true;
            Visible  = false;
        }
예제 #4
0
        void customColorsPage_Click(object sender, System.EventArgs e)
        {
            // Get current mouse position
            Point screenMousePos = Control.MousePosition;
            // Convert mouse position to client coordinates
            Point clientMousePos = customColorsPage.PointToClient(screenMousePos);

            if (rightButtonDown == true)
            {
                // Check if we need to show the custom color color picker dialog
                int index = -1;
                if (IsSpareColor(clientMousePos, ref index))
                {
                    using (CustomColorDlg dlg = new CustomColorDlg())
                    {
                        dlg.CurrentColor = customColors[index];
                        if (dlg.ShowDialog(this) == DialogResult.OK)
                        {
                            customColors[index] = dlg.CurrentColor;
                            ColorChangeArgs ca = new ColorChangeArgs(dlg.CurrentColor, "CustomTab");
                            OnColorChanged(ca);
                        }
                    }
                }
                rightButtonDown = false;
                return;
            }

//			Graphics g = customColorsPage.CreateGraphics();
//			Color clickedColor = ColorUtil.ColorFromPoint(g, clientMousePos.X, clientMousePos.Y);
//			g.Dispose();

            Color color = FindCustomColor(clientMousePos);

            if (color != Color.Empty)
            {
                ColorChangeArgs ca = new ColorChangeArgs(color, "CustomTab");
                OnColorChanged(ca);
                // Hide the dropdown
                exitLoop = true;
                Visible  = false;
            }
        }
예제 #5
0
		void systemColorsList_Click(object sender, System.EventArgs e)
		{
			Color color = Color.FromName(systemColorsList.Text);
			currentColor = color;
			ColorChangeArgs ca = new ColorChangeArgs(color, "SystemTab");
			OnColorChanged(ca);
			exitLoop = true;
			Visible = false;
		}
예제 #6
0
		void webColorsList_Click(object sender, System.EventArgs e)
		{
			Color color = Color.FromName(webColorsList.Text);
			ColorChangeArgs ca = new ColorChangeArgs(color, "WebTab");
			OnColorChanged(ca);
			exitLoop = true;
			Visible = false;

		}
예제 #7
0
		void customColorsPage_Click(object sender, System.EventArgs e)
		{

			// Get current mouse position
			Point screenMousePos = Control.MousePosition;
			// Convert mouse position to client coordinates
			Point clientMousePos = customColorsPage.PointToClient(screenMousePos);
			if ( rightButtonDown == true )
			{
				// Check if we need to show the custom color color picker dialog
				int index = -1;
				if ( IsSpareColor(clientMousePos, ref index))
				{
					using (CustomColorDlg dlg = new CustomColorDlg())
					{
						dlg.CurrentColor = customColors[index];
						if ( dlg.ShowDialog(this) == DialogResult.OK )
						{
							customColors[index] = dlg.CurrentColor;
							ColorChangeArgs ca = new ColorChangeArgs(dlg.CurrentColor, "CustomTab");
							OnColorChanged(ca);
						}
					}
				}
				rightButtonDown = false;
				return;
			}

//			Graphics g = customColorsPage.CreateGraphics();
//			Color clickedColor = ColorUtil.ColorFromPoint(g, clientMousePos.X, clientMousePos.Y);
//			g.Dispose();

			Color color = FindCustomColor(clientMousePos);
			if ( color != Color.Empty )
			{
				ColorChangeArgs ca = new ColorChangeArgs(color, "CustomTab");
				OnColorChanged(ca);
				// Hide the dropdown
				exitLoop = true;
				Visible = false;
			}

		}
예제 #8
0
		protected void OnColorChanged(ColorChangeArgs e)
		{
			currentColor = e.NewColor;
			if ( ColorChanged != null )
				ColorChanged(this, e);
		}
예제 #9
0
 void ColorChanged( object sender, ColorChangeArgs ea)
 {
     currentColor = ea.NewColor;
     InitializeColorTextBoxString(ea.NewColor, ea.SenderName);
 }
예제 #10
0
 void ColorChanged(object sender, ColorChangeArgs ea)
 {
     currentColor = ea.NewColor;
     InitializeColorTextBoxString(ea.NewColor, ea.SenderName);
 }