public Schilder(Game game) : base(game) { // Available images, can easily add or remove drawings here. string[] names = new string[] { "turtle", "peacock", "bear" }; // Load a random drawing: DrawingAssets = new DrawingContainer(names[SeriousGameLib.PersistentStorage.LastSchilderDrawingIndex++ % names.Length]); PaintBrush = new PaintBrush(this); SmartCanvas = new SmartCanvas(this); ColorSelector = new ColorSelector(this); TrophyScreen = new TrophyScreen(this); AudioFactory.AddSoundEffect("schildertheme", "Schilder/Audio/Schilder"); AudioFactory.AddSoundEffect("paint", "Schilder/Audio/paint"); AudioFactory.PlayOnce("schildertheme",true); //AddGameObject(new Wallpaper(this)); AddGameObject(SmartCanvas); AddGameObject(ColorSelector); AddGameObject(PaintBrush); AddGameObject(TrophyScreen); game.IsMouseVisible = false; }
public void ChangeColorCloth(int TapNum) { switch (TapNum) { case 1: BodyColor.color = ColorSelector.GetColor(); break; case 2: RightColor.color = ColorSelector.GetColor(); LeftColor.color = ColorSelector.GetColor(); break; case 3: //LeftColor.color = ColorSelector.GetColor(); break; case 4: SkirtColor.color = ColorSelector.GetColor(); break; default: break; } }
private void Awake() { _colorSelector = GetComponent <ColorSelector>(); var spawner = GameObject.Find("EnemySpawner"); _myNumber = spawner.GetComponent <EnemySpawner>().GetEnemyCount(); }
private void SelectedPlaceableChanged(Placeable placeable) { selectedPlaceable = placeable; // Enable/disable panel accordingly cGroup.alpha = placeable == null ? 0 : 1f; cGroup.blocksRaycasts = placeable != null; cGroup.interactable = placeable != null; // If we have something selected, populate panel if (selectedPlaceable != null) { label.text = "Selected: " + selectedPlaceable.name; // Destroy previous color selectors foreach (ColorSelector cs in colorSelectorParent.GetComponentsInChildren <ColorSelector>()) { Destroy(cs.gameObject); } // Create new color selectors foreach (ModifyableColor modColor in placeable.modifyableColors) { ColorSelector selector = Instantiate(selectorPrefab, colorSelectorParent); selector.transform.localScale = Vector3.one; selector.SetTitle(modColor.title); selector.SetValueWithoutNotifty(modColor.current); selector.OnValueChanged += (c) => ColorSelectorValueChanged(modColor, c); } } }
/// <summary> /// Change the color, and update all the color selectors to match the same color. /// </summary> /// <param name="pickedColor">The color to change to</param> /// <param name="selector">The selector we used to change the color</param> private void ChangeMaterialColor(Color pickedColor, ColorSelector selector) { if (selectedMaterialSlots.Count < 1) { return; } //Update selected material slot colors (and set first one as layer label color) for (int i = 0; i < selectedMaterialSlots.Count; i++) { selectedMaterialSlots[i].ChangeColor(pickedColor); if (i == 0) { targetInterfaceLayer.UpdateLayerPrimaryColor(); } } //Match other selector colors if (selector == colorPicker) { hexColorField.ChangeColorInput(pickedColor); } else if (selector == hexColorField) { colorPicker.ChangeColorInput(pickedColor); } }
public void TextColorSelector_SET_GET_VALUE() { /* TEST CODE */ var button = new Components.Button(); Assert.IsNotNull(button, "Should be not null"); Assert.IsInstanceOf <Components.Button>(button, "Should be equal!"); var colorSelector = new ColorSelector { Normal = new Color(0.0f, 0.0f, 1.0f, 1.0f), Selected = new Color(0.0f, 1.0f, 0.0f, 1.0f), }; Assert.IsNotNull(colorSelector, "Should be not null"); Assert.IsInstanceOf <ColorSelector>(colorSelector, "Should be equal!"); button.TextColorSelector = colorSelector; Assert.AreEqual(colorSelector.Normal.R, button.TextColorSelector.Normal.R, "Should be equals to the set value of TextColorSelector Normal R"); Assert.AreEqual(colorSelector.Normal.G, button.TextColorSelector.Normal.G, "Should be equals to the set value of TextColorSelector Normal G"); Assert.AreEqual(colorSelector.Normal.B, button.TextColorSelector.Normal.B, "Should be equals to the set value of TextColorSelector Normal B"); Assert.AreEqual(colorSelector.Normal.A, button.TextColorSelector.Normal.A, "Should be equals to the set value of TextColorSelector Normal A"); Assert.AreEqual(colorSelector.Selected.R, button.TextColorSelector.Selected.R, "Should be equals to the set value of TextColorSelector Selected R"); Assert.AreEqual(colorSelector.Selected.G, button.TextColorSelector.Selected.G, "Should be equals to the set value of TextColorSelector Selected G"); Assert.AreEqual(colorSelector.Selected.B, button.TextColorSelector.Selected.B, "Should be equals to the set value of TextColorSelector Selected B"); Assert.AreEqual(colorSelector.Selected.A, button.TextColorSelector.Selected.A, "Should be equals to the set value of TextColorSelector Selected A"); }
void Update() { brushColor = ColorSelector.GetColor(); //Updates our painted color with the selected color if (Input.GetMouseButton(0)) { DoAction(); } UpdateBrushCursor(); if (!FullPaint) //Benim ekledigim kod blogu. Asset'e ait degil. { //1000'de 10 //100'de x paintPercent = (PlayerPrefs.GetInt("paintPercent") * 25) / 1000; paintPercentText.text = "% " + paintPercent; if (paintPercent == 100) { foreach (Transform child in brushContainer.transform) { //Clear brushes Destroy(child.gameObject); } brushCursor.SetActive(false); saving = true; FullPaint = true; } } }
private void Btn_Click(object sender, EventArgs e) { if (ColorSelector.ShowDialog() == DialogResult.OK) { Btn.ColorFondo = ColorSelector.Color; } }
private void ColorBorder_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { var border = sender as Border; if (border == null) { return; } var color = ((SolidColorBrush)border.Background).Color; var colorPicker = new ColorSelector(color) { Owner = this }; var result = colorPicker.ShowDialog(); if (result.HasValue && result.Value) { border.Background = new SolidColorBrush(colorPicker.SelectedColor); if (border.Tag.Equals("Editor")) { CheckScheme(false); } else if (border.Tag.Equals("Recorder")) { CheckRecorderScheme(false); } else { CheckBoardScheme(false); } } }
static void Main(string[] args) { //int i; //i = 10; //Console.WriteLine(i); //Program P = new Program(); //Console.WriteLine(P.Color()); //Console.ReadKey(); //ReadProgram rP = new ReadProgram(); //Console.WriteLine(rP.NewColor()); Console.ReadKey(); ConsoleKeyInfo conKey = new ConsoleKeyInfo(); char consoleKey = conKey.KeyChar; Console.WriteLine(consoleKey); Console.ReadLine(); ColorSelector cs = new ColorSelector(); String pickedColor = cs.ColorPick(consoleKey); Console.WriteLine(pickedColor); Console.ReadLine(); }
public void ColorSelectorClone() { tlog.Debug(tag, $"StringSelectorClone START"); var testingTarget = new ColorSelector() { All = new Color(0.43f, 0.43f, 0.43f, 0.1f), }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <ColorSelector>(testingTarget, "Should return ColorSelector instance."); try { var result = testingTarget.Clone(); tlog.Debug(tag, "result : " + result); } catch (Exception) { // System.InvalidCastException : Unable to cast object // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Color]' // to type 'Tizen.NUI.Components.ColorSelector' // To fix tlog.Debug(tag, $"ColorSelectorClone END (OK)"); Assert.Pass("Passed!"); } }
public ColorSelectorSample() { ColorSelector sel = new ColorSelector(); sel.Color = Xwt.Drawing.Colors.AliceBlue; PackStart(sel); }
// Use this for initialization void Start() { selector.onMouseButtonUp.AddListener(() => { die.SetLEDsToColor(ColorSelector.GetColor()); }); }
public PixelOutlineEffect() { Color = new ColorSelector(Colors.Black); Threshold = 0; Inside = false; KeepImage = true; }
public void UpdateColorSelectorSize(ColorSelector colorSelector) { grid.cellWidth = (RootWidget.width / 19) + 6; colorSelector.UISprite.width = RootWidget.width / 19; colorSelector.BoxCollider.size = new Vector2(colorSelector.UISprite.width, colorSelector.UISprite.height); BoxCollider2D boxCollider2D = colorSelector.gameObject.GetComponent <BoxCollider2D>(); }
public ColorSelectorSample() { ColorSelector sel = new ColorSelector(); ColorPicker picker = new ColorPicker(); sel.Color = Xwt.Drawing.Colors.AliceBlue; picker.Color = Xwt.Drawing.Colors.AliceBlue; picker.Title = "Select a color"; sel.SupportsAlpha = true; picker.SupportsAlpha = true; PackStart(sel); PackStart(new HSeparator()); var pickerBox = new HBox(); pickerBox.PackStart(new Label("Or use a color picker:")); pickerBox.PackStart(picker); pickerBox.PackStart(new ColorPicker() { Style = ButtonStyle.Flat }); pickerBox.PackStart(new ColorPicker() { Style = ButtonStyle.Borderless }); PackStart(pickerBox); sel.ColorChanged += (sender, e) => picker.Color = sel.Color; picker.ColorChanged += (sender, e) => sel.Color = picker.Color; }
public void SetColor() { if (die != null) { die.SetLEDsToColor(ColorSelector.GetColor()); } }
// Use this for initialization void Awake() { Input.multiTouchEnabled = false; UIConfig = FindObjectOfType(typeof(MenuManager)) as MenuManager; stageManager = FindObjectOfType(typeof(StageManager)) as StageManager; generateColor = FindObjectOfType(typeof(ColorSelector)) as ColorSelector; audioman = FindObjectOfType(typeof(AudioSystem)) as AudioSystem; }
// Update is called once per frame void Update() { Color32 c = (Color32)ColorSelector.GetColor(); R.text = c.r.ToString(); G.text = c.g.ToString(); B.text = c.b.ToString(); }
void Awake() { // tell the game to run at 60 fps, maybe put this some where better later Application.targetFrameRate = 60; scoreBar = GameObject.Find("GUICamera").GetComponentInChildren <ScoreBar> (); moves = GameObject.Find("GUICamera").GetComponentInChildren <MoveProgress>(); colorSelector = GameObject.Find("GUICamera").GetComponentInChildren <ColorSelector>(); }
protected override void OnCreate(Bundle savedInstanceState) { RequestWindowFeature(WindowFeatures.NoTitle); base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_main); buttonSelectColor = (ButtonFloatSmall)FindViewById(Resource.Id.buttonColorSelector); buttonSelectColor.Click += (sender, e) => { ColorSelector colorSelector = new ColorSelector(this, backgroundColor, this); colorSelector.Show(); }; LayoutRipple layoutRipple = (LayoutRipple)FindViewById(Resource.Id.itemButtons); OriginRiple = layoutRipple; layoutRipple.Click += (sender, e) => { Intent intent = new Intent(this, typeof(ButtonsActivity)); intent.PutExtra("BACKGROUND", backgroundColor); StartActivity(intent); }; layoutRipple = (LayoutRipple)FindViewById(Resource.Id.itemSwitches); OriginRiple = layoutRipple; layoutRipple.Click += (sender, e) => { Intent intent = new Intent(this, typeof(SwitchActivity)); intent.PutExtra("BACKGROUND", backgroundColor); StartActivity(intent); }; layoutRipple = (LayoutRipple)FindViewById(Resource.Id.itemProgress); OriginRiple = layoutRipple; layoutRipple.Click += (sender, e) => { Intent intent = new Intent(this, typeof(ProgressActivity)); intent.PutExtra("BACKGROUND", backgroundColor); StartActivity(intent); }; layoutRipple = (LayoutRipple)FindViewById(Resource.Id.itemWidgets); OriginRiple = layoutRipple; layoutRipple.Click += (sender, e) => { Intent intent = new Intent(this, typeof(WidgetActivity)); intent.PutExtra("BACKGROUND", backgroundColor); StartActivity(intent); }; }
bool saving = false; //Bool pour vérifier si nous sauvegardons la texture void Update() { brushColor = ColorSelector.GetColor(); //Met à jour notre couleur peinte avec la couleur sélectionnée if (Input.GetMouseButton(0)) { DoAction(); } UpdateBrushCursor(); }
/// <summary> /// Constructs pie pieces and adds them to the visual tree for this control's canvas /// </summary> private void ConstructPiePieces() { CollectionView myCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(this.DataContext); if (myCollectionView == null) { return; } double halfWidth = this.Width / 2; double innerRadius = halfWidth * HoleSize; // compute the total for the property which is being plotted double total = 0; foreach (Object item in myCollectionView) { total += GetPlottedPropertyValue(item); } // add the pie pieces canvas.Children.Clear(); piePieces.Clear(); double accumulativeAngle = 0; foreach (Object item in myCollectionView) { bool selectedItem = item == myCollectionView.CurrentItem; double wedgeAngle = GetPlottedPropertyValue(item) * 360 / total; PiePiece piece = new PiePiece() { Radius = halfWidth, InnerRadius = innerRadius, CentreX = halfWidth, CentreY = halfWidth, PushOut = (selectedItem ? 10.0 : 0), WedgeAngle = wedgeAngle, PieceValue = GetPlottedPropertyValue(item), RotationAngle = accumulativeAngle, Fill = ColorSelector != null?ColorSelector.SelectBrush(item, myCollectionView.IndexOf(item)) : Brushes.Black, // record the index of the item which this pie slice represents Tag = myCollectionView.IndexOf(item), ToolTip = new ToolTip() }; piece.ToolTipOpening += new ToolTipEventHandler(PiePieceToolTipOpening); piece.MouseUp += new MouseButtonEventHandler(PiePieceMouseUp); piePieces.Add(piece); canvas.Children.Insert(0, piece); accumulativeAngle += wedgeAngle; } }
private Brush GetBackgroundColor(object item) { if (item is IPieceBackgroundColor color) { return(color.GetBackgroundColor()); } return(ColorSelector != null?ColorSelector.SelectBrush(item, -1) : Brushes.Black); }
public void Initialize(PaletteFromBinaryEditorVM vm) { _vm = vm ?? throw new ArgumentNullException(nameof(vm)); ColorEditor.Initialize(_vm); ColorSelector.Initialize(_vm); tbxBinaryDataRef.DataBindings.Add(nameof(tbxBinaryDataRef.Text), _vm, nameof(_vm.DataRef), false, DataSourceUpdateMode.OnPropertyChanged); }
void Update() { brushColor = ColorSelector.GetColor(); //Updates our painted color with the selected color if (Input.GetMouseButton(0)) { DoAction(); } UpdateBrushCursor(); }
void CreatePalette() { SelectColor(paletteColor[0]); for (int i = 0; i < paletteColor.Length; i++) { ColorSelector cS = GameObject.Instantiate(colorButtonPrefab, colorSelectionPanel).GetComponent <ColorSelector>(); cS.SetColor(paletteColor[i]); } }
private static TimeSpan Perform(bool smooth1, bool smooth2, bool color) { DiffDraw.Clear(0, 0); Renderer.Player.Clear(); Pixel[,] init = new Pixel[1, 2]; init.Populate(new Pixel()); DiffDraw.Clear(init); DiffDraw.Draw(false, true); Stopwatch t = Stopwatch.StartNew(); (char[,] level, _) = CharArrayLoader.LoadLevel(@" ##################### # ### # ### # # # ## # # # # # ## # #####################", smooth1); DiffDraw.Clear(ColorSelector.Get(level)); Renderer.Player.Add(new Tuple <Point, Point>(new Point(1, 2), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(2, 2), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(2, 3), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(1, 3), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(1, 4), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(1, 5), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(1, 6), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(2, 6), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(2, 5), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(2, 4), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(3, 4), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(3, 3), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(3, 2), new Point(0, 0))); Renderer.Player.Add(new Tuple <Point, Point>(new Point(4, 2), new Point(0, 0))); Renderer.Enemies.Add(new Point(5, 4)); Renderer.Enemies.Add(new Point(5, 5)); Renderer.Enemies.Add(new Point(5, 6)); Renderer.Enemies.Add(new Point(6, 6)); Renderer.Enemies.Add(new Point(7, 6)); Renderer.Enemies.Add(new Point(7, 5)); Renderer.Enemies.Add(new Point(7, 4)); Renderer.Enemies.Add(new Point(6, 3)); Renderer.Enemies.Add(new Point(5, 2)); Renderer.Render(smooth2); DiffDraw.Draw(color); foreach (string t1 in Levels.levels) { (char[,] lvl, _) = CharArrayLoader.LoadLevel(t1, SettingsMan.SmoothTerrain); DiffDraw.Clear(ColorSelector.Get(lvl)); DiffDraw.Draw(true); } t.Stop(); return(t.Elapsed); }
void chat_ParseColor(string value, Button target) { char code = value[1]; target.Text = Colors.Name(value); Color textCol; target.BackColor = ColorSelector.LookupColor(code, out textCol); target.ForeColor = textCol; }
private void AddBookmark(string text, TextRenderData first, TextRenderData last) { ColorSelector.Show(); ClearTextSelection(); ManipulationService.SetManipulationListener(PageCanvas, _dummyManipulationListenner); _bookmarkText = text; _bookmarkFirstTextContext = first; _bookmarkLastTextContext = last; }
public BkgDarkAgentLayer() { BackColor = new ColorSelector(Colors.White); BackColor.By = SelectBy.Class; BackColor.ClassLight = Color.FromArgb(180, 35, 140, 35); BackColor.ClassMedium = Color.FromArgb(180, 150, 127, 37); BackColor.ClassHeavy = Color.FromArgb(180, 99, 99, 99); BackColor.ClassDestroyer = Color.FromArgb(180, 41, 83, 160); BackColor.ClassArtillery = Color.FromArgb(180, 181, 47, 47); BackColor.ClassNone = Color.FromArgb(180, 255, 255, 255); }
void Awake() { // tell the game to run at 60 fps, maybe put this some where better later Application.targetFrameRate = 60; scoreBar = GameObject.Find ("GUICamera").GetComponentInChildren<ScoreBar> (); moves = GameObject.Find("GUICamera").GetComponentInChildren<MoveProgress>(); colorSelector = GameObject.Find("GUICamera").GetComponentInChildren<ColorSelector>(); }
public ColorizeEffect() { Color = new ColorSelector(Colors.White); }
public TextLayer() { FontFamily = "Arial"; FontSize = 8.5; X = 3; Y = 3; Width = 999; Height = 999; Anchor = Anchor.TopLeft; Baseline = false; FontColor = new ColorSelector(Colors.White); }
/// <summary> /// 设计器支持所需的方法 - 不要 /// 使用代码编辑器修改此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); this.textBox = new System.Windows.Forms.TextBox(); this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.menuItemRedo = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemReselect = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.menuItemAccept = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemSave = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.menuItemExit = new System.Windows.Forms.ToolStripMenuItem(); this.colorSelector = new CSS.IM.Library.Controls.ColorSelector(); this.drawToolsControl = new CSS.IM.Library.Controls.DrawToolsControl(); this.contextMenuStrip.SuspendLayout(); this.SuspendLayout(); // // saveFileDialog // this.saveFileDialog.DefaultExt = "bmp"; this.saveFileDialog.Filter = "BMP 文件(*.bmp)|*.bmp|JPEG 文件(*.jpg,*.jpeg)|*.jpg,*.jpeg|PNG 文件(*.png)|*.png|GIF 文件" + "(*.gif)|*.gif"; // // textBox // this.textBox.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox.ImeMode = System.Windows.Forms.ImeMode.On; this.textBox.Location = new System.Drawing.Point(2, 233); this.textBox.Multiline = true; this.textBox.Name = "textBox"; this.textBox.Size = new System.Drawing.Size(100, 21); this.textBox.TabIndex = 4; // // contextMenuStrip // this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuItemRedo, this.menuItemReselect, this.toolStripSeparator1, this.menuItemAccept, this.menuItemSave, this.toolStripSeparator2, this.menuItemExit}); this.contextMenuStrip.Name = "contextMenuStrip"; this.contextMenuStrip.Size = new System.Drawing.Size(173, 148); // // menuItemRedo // this.menuItemRedo.Image = global::CSS.IM.Library.Properties.Resources.Redo; this.menuItemRedo.Name = "menuItemRedo"; this.menuItemRedo.Size = new System.Drawing.Size(172, 22); this.menuItemRedo.Text = "撤销编辑"; // // menuItemReselect // this.menuItemReselect.Name = "menuItemReselect"; this.menuItemReselect.Size = new System.Drawing.Size(172, 22); this.menuItemReselect.Text = "重新选择截图区域"; // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(169, 6); // // menuItemAccept // this.menuItemAccept.Image = global::CSS.IM.Library.Properties.Resources.Accept; this.menuItemAccept.Name = "menuItemAccept"; this.menuItemAccept.Size = new System.Drawing.Size(172, 22); this.menuItemAccept.Text = "复制并退出截图"; // // menuItemSave // this.menuItemSave.Image = global::CSS.IM.Library.Properties.Resources.Save; this.menuItemSave.Name = "menuItemSave"; this.menuItemSave.Size = new System.Drawing.Size(172, 22); this.menuItemSave.Text = "另存为..."; // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(169, 6); // // menuItemExit // this.menuItemExit.Image = global::CSS.IM.Library.Properties.Resources.Exit; this.menuItemExit.Name = "menuItemExit"; this.menuItemExit.Size = new System.Drawing.Size(172, 22); this.menuItemExit.Text = "退出截图"; // // colorSelector // this.colorSelector.Location = new System.Drawing.Point(2, 189); this.colorSelector.Name = "colorSelector"; this.colorSelector.Padding = new System.Windows.Forms.Padding(2); this.colorSelector.Size = new System.Drawing.Size(189, 38); this.colorSelector.TabIndex = 3; // // drawToolsControl // this.drawToolsControl.Location = new System.Drawing.Point(2, 154); this.drawToolsControl.Name = "drawToolsControl"; this.drawToolsControl.Padding = new System.Windows.Forms.Padding(2); this.drawToolsControl.Size = new System.Drawing.Size(224, 29); this.drawToolsControl.TabIndex = 0; // // CaptureImageTool // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.Control; this.ClientSize = new System.Drawing.Size(319, 266); this.Controls.Add(this.textBox); this.Controls.Add(this.colorSelector); this.Controls.Add(this.drawToolsControl); this.Name = "CaptureImageTool"; this.Text = "CaptureImageTool"; this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.CaptureImageTool_KeyUp); this.contextMenuStrip.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }
void Awake () { myslf = this; }
private void ButtonColor_Click(object sender, EventArgs e) { IColorSelector selector = new ColorSelector(); selector.Color = ((ColorButton)sender).ButtonColor; selector.Location = base.PointToScreen(new Point(((ColorButton)sender).Left, ((ColorButton)sender).Bottom)); if (selector.DoModal()) { ((ColorButton)sender).ButtonColor = selector.Color; } }
public ShadowEffect() { Color = new ColorSelector(Colors.Black); }