public frmMain() { InitializeComponent(); //toolTip usado no sistema tooltip = new ToolTipAdv(this); tooltip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(225))))); //adiciona eventos as images do form configurados pelo recurso do MetroForm foreach (CaptionImage image in this.CaptionImages) { image.ImageMouseDown += new CaptionImage.MouseDown(ImageMouseDown); image.ImageMouseLeave += new CaptionImage.MouseLeave(ImageMouseLeave); image.ImageMouseMove += new CaptionImage.MouseMove(ImageMouseMove); this.Resize += new EventHandler(FormResize); } InicializaTreeViewListasTarefas(); }
public Main() { ToolTipAdv tooltip = null; TrackBarEx trackBar = new TrackBarEx(); InitializeComponent(); tooltip = new ToolTipAdv(this); tooltip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(225))))); foreach (CaptionImage image in this.CaptionImages) { if (image.Name == "CaptionImage6") { image.Location = new Point(this.Width - 34, 4); } else if (image.Name == "CaptionImage7") { image.Location = new Point(this.Width - 63, 4); } else if (image.Name == "CaptionImage8") { image.Location = new Point(this.Width - 87, 4); } if (image.Name == "CaptionImage3") { image.Location = new Point(this.Width - 3 * image.Size.Width - 30, 40); } else if (image.Name == "CaptionImage4") { image.Location = new Point(this.Width - 2 * image.Size.Width - 20, 40); } else if (image.Name == "CaptionImage5") { image.Location = new Point(this.Width - image.Size.Width - 10, 40); } image.ImageMouseEnter += new CaptionImage.MouseEnter(image_ImageMouseEnter); image.ImageMouseLeave += new CaptionImage.MouseLeave(image_ImageMouseLeave); image.ImageMouseMove += new CaptionImage.MouseMove(image_ImageMouseMove); image.ImageMouseUp += new CaptionImage.MouseUp(image_ImageMouseUp); this.Resize += new EventHandler(Main_Resize); } this.HideControlboxHighlights(); }
public Form1() { InitializeComponent(); tooltip = new ToolTipAdv(this); tooltip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(225))))); foreach (CaptionImage image in this.CaptionImages) { if (image.Name == "CaptionImage6") { image.Location = new Point(this.Width - 34, 4); } else if (image.Name == "CaptionImage7") { image.Location = new Point(this.Width - 63, 4); } else if (image.Name == "CaptionImage8") { image.Location = new Point(this.Width - 87, 4); } if (image.Name == "CaptionImage3") { image.Location = new Point(this.Width - 3 * image.Size.Width - 30, 40); } else if (image.Name == "CaptionImage4") { image.Location = new Point(this.Width - 2 * image.Size.Width - 20, 40); } else if (image.Name == "CaptionImage5") { image.Location = new Point(this.Width - image.Size.Width - 10, 40); } image.ImageMouseEnter += new CaptionImage.MouseEnter(image_ImageMouseEnter); image.ImageMouseLeave += new CaptionImage.MouseLeave(image_ImageMouseLeave); image.ImageMouseMove += new CaptionImage.MouseMove(image_ImageMouseMove); image.ImageMouseUp += new CaptionImage.MouseUp(image_ImageMouseUp); this.Resize += new EventHandler(Form1_Resize); } this.HideControlboxHighlights(); try { System.Drawing.Icon ico = new System.Drawing.Icon(GetIconFile(@"common\Images\Grid\Icon\sfgrid.ico")); this.Icon = ico; } catch { } this.trackBarEx1.ValueChanged += new EventHandler(trackBarEx1_ValueChanged); trackBar.Location = new Point(180, 210); this.trackBar.Size = new Size(150, 100); trackBar.Style = TrackBarEx.Theme.Metro; this.Controls.Add(trackBar); trackBar.ValueChanged += new EventHandler(trackBar_ValueChanged); trackBar.Value = 1; this.radioButtonAdv7.Checked = true; this.radioButton2.Checked = true; this.FormBorderStyle = FormBorderStyle.Sizable; this.radioButtonAdv2.MetroColor = Color.Black; this.radioButtonAdv3.MetroColor = Color.Black; this.radioButtonAdv4.MetroColor = Color.Black; this.radioButtonAdv5.MetroColor = Color.Black; this.radioButtonAdv6.MetroColor = Color.Black; this.radioButtonAdv7.MetroColor = Color.Black; this.radioButtonAdv8.MetroColor = Color.Black; this.checkBoxAdv1.MetroColor = Color.Black; this.StartPosition = FormStartPosition.CenterScreen; this.ShowIcon = true; }
public Form1() { InitializeComponent(); toolip = new ToolTipAdv(this); this.Activated += new EventHandler(Form1_Activated); this.tileLayout1.Text = "Start"; this.tileLayout1.ForeColor = Color.White; getImageStreamers(); this.tileLayout1.NewGroupIndicatorColor = Color.White; // this.tileLayout1.ExitButtonImage = Image.FromFile(imagePath + "Close.png"); // this.tileLayout1.ShowPreviewButtonImage = Image.FromFile(imagePath + "Selection.png"); // this.tileLayout1.NewGroupButtonImage = Image.FromFile(imagePath + "Pause.png"); Timer time = new Timer(); time.Interval = 1000; time.Start(); time.Tick += new EventHandler(time_Tick); openMenu.Tick += new EventHandler(t_Tick); CloseMenu.Tick += new EventHandler(CloseMenu_Tick); this.openMenu.Interval = 10; this.CloseMenu.Interval = 10; this.panel2.Height = 0; this.panel3.Height = 0; this.panel1.Click += new EventHandler(panel1_Click); this.panel2.MouseLeave += new EventHandler(panel2_MouseLeave); this.panel3.MouseLeave += new EventHandler(panel2_MouseLeave); this.panel2.MouseEnter += new EventHandler(panel2_MouseEnter); this.layoutGroup1.Text = "Group 1"; this.layoutGroup2.Text = "Group 2"; color.Style = ColorPickerUIAdv.visualstyle.Metro; this.panel6.Controls.Add(color); color.Location = new Point(0, -40); color.Size = new Size(210, 195); color.BackColor = this.panel2.BackColor; color.Picked += new ColorPickerUIAdv.ColorPickedEventHandler(color_Picked); ScrollersFrame scroll = new ScrollersFrame(); scroll.VisualStyle = ScrollBarCustomDrawStyles.Metro; scroll.AttachedTo = this.panel5; treeViewAdv1.Click += new EventHandler(treeViewAdv1_Click); treeViewAdv1.Style = TreeStyle.Metro; // this.panel9.Controls.Add(treeViewAdv1); treeViewAdv1.Size = new Size(panel9.Width, panel9.Height - 15); treeViewAdv1.Location = new Point(0, 15); popup.Size = new Size(200, 400); // panel11.Width = 200; pic.Dock = DockStyle.Fill; ScrollersFrame scroll1 = new ScrollersFrame(); scroll1.VisualStyle = ScrollBarCustomDrawStyles.Metro; scroll1.AttachedTo = propertyGrid1; FlowLayout flowLayout = new FlowLayout(); //flowLayout.ContainerControl = this.panel3; flowLayout.HGap = 150; this.checkBoxAdv1.Checked = true; popupOpen.Tick += new EventHandler(popupOpen_Tick); popupClose.Tick += new EventHandler(popupClose_Tick); popupOpen.Interval = 10; using (Graphics g = this.CreateGraphics()) { if (g.DpiX >= 120) { this.Size = new System.Drawing.Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); Dpi125(); } } }