private void ColorBtn_Click(object sender, EventArgs e) { PenModifyDlg dlg = new PenModifyDlg(Root); DrawingAttributes da = stroke.DrawingAttributes.Clone(); //dlg.hideWidth(); if (dlg.ModifyPen(ref da)) { stroke.DrawingAttributes = da; Root.FormDisplay.ClearCanvus(); Root.FormDisplay.DrawStrokes(); Root.FormDisplay.UpdateFormDisplay(true); } }
private void pboxPens_Click(object sender, EventArgs e) { for (int p = 0; p < Root.MaxPenCount; p++) { if ((PictureBox)sender == pboxPens[p]) { PenModifyDlg dlg = new PenModifyDlg(Root); if (dlg.ModifyPen(ref Root.PenAttr[p])) { (sender as PictureBox).BackColor = Color.FromArgb(255, Root.PenAttr[p].Color); comboPensAlpha[p].Text = string.Format("{0}", Root.PenAttr[p].Transparency); comboPensWidth[p].Text = string.Format("{0}", Root.PenAttr[p].Width); } } } }
private void BoardCustColorPnl_Click(object sender, EventArgs e) { PenModifyDlg dlg = new PenModifyDlg(Root); dlg.Text = Root.Local.BoardCustColorModifyTitle; Microsoft.Ink.DrawingAttributes at = new Microsoft.Ink.DrawingAttributes(); at.Transparency = (byte)(255 - Root.Gray1[0]); at.Color = Color.FromArgb(Root.Gray1[0], Root.Gray1[1], Root.Gray1[2], Root.Gray1[3]); at.Width = 0; if (dlg.ModifyPen(ref at)) { Root.Gray1[0] = 255 - at.Transparency; Root.Gray1[1] = at.Color.R; Root.Gray1[2] = at.Color.G; Root.Gray1[3] = at.Color.B; BoardCustColorPnl.BackColor = Color.FromArgb(Root.Gray1[0], at.Color); } }
private void ToolbarDwg_Click(object sender, EventArgs e) { PenModifyDlg dlg = new PenModifyDlg(Root); dlg.Text = ""; Microsoft.Ink.DrawingAttributes at = new Microsoft.Ink.DrawingAttributes(); at.Transparency = (byte)(255 - Root.ToolbarBGColor[0]); at.Color = Color.FromArgb(Root.ToolbarBGColor[0], Root.ToolbarBGColor[1], Root.ToolbarBGColor[2], Root.ToolbarBGColor[3]); at.Width = 0; if (dlg.ModifyPen(ref at)) { Root.ToolbarBGColor[0] = 255 - at.Transparency; Root.ToolbarBGColor[1] = at.Color.R; Root.ToolbarBGColor[2] = at.Color.G; Root.ToolbarBGColor[3] = at.Color.B; ToolbarDwg.BackColor = Color.FromArgb(Root.ToolbarBGColor[0], at.Color); } }