private void metroLink2_Click(object sender, EventArgs e) { MetroLink link = (MetroLink)sender; DetalhesCarro form = new DetalhesCarro(link.TabIndex); form.ShowDialog(); }
/// <summary> /// Read xml from "../../lib/Configure.xml" /// A standard xml look like this: /// <students> /// <cnblogs number="123456" home="http://cnblogs.com/SivilTaram"> /// <link title="我对软工有话说[上]"> /// http://www.cnblogs.com/SivilTaram/p/advice_for_software.html /// </link> /// </cnblogs> /// </students> /// </summary> private void InitialPanel() { XmlDocument xml_doc = new XmlDocument(); try { xml_doc.Load("../../lib/Configure.xml"); //if load success } catch (System.IO.FileNotFoundException) { //create a xml file XmlNode node = xml_doc.CreateXmlDeclaration("1.0", "utf-8", ""); xml_doc.AppendChild(node); XmlNode root_node = xml_doc.CreateElement("students"); xml_doc.AppendChild(root_node); xml_doc.Save("../../lib/Configure.xml"); } finally { XmlNode root_node = xml_doc.DocumentElement.SelectSingleNode("/students"); string path; if ((path = ((XmlElement)root_node).GetAttribute("path")) != null) { PathTextBox.Text = path; } blogs_dict = ReadXmlToBlogString(); foreach (string key in blogs_dict.Keys) { MetroLink name_label = GetLink(key); NamePanel.Controls.Add(name_label); ToolTip.SetToolTip(name_label, blogs_dict[key]); } } }
private void AddControlButton(MetroLink button) { button.Location = new Point(controlBoxSpace, 0); controlBoxSpace += 45; CustomPanelWinControl.Size = new Size(controlBoxSpace, 30); CustomPanelWinControl.Controls.Add(button); }
void LoadTasksToFlowLayoutPanel(Project p) { this.flp_Tasks.Controls.Clear(); foreach (Task task in TaskController.getListTaskByProject(p.ID)) { FlowLayoutPanel flp = new FlowLayoutPanel { Width = flp_Tasks.Width - 20, Height = 30 }; MetroLabel mlb = new MetroLabel { Text = task.Name, Width = flp_Tasks.Width - 280, Height = 25, FontSize = MetroFramework.MetroLabelSize.Tall, BackColor = Color.Transparent }; MetroLink mtl = new MetroLink { Text = "docs", Width = 100, FontSize = MetroFramework.MetroLinkSize.Medium, BackColor = Color.Transparent, Tag = task.ID }; mtl.Click += Mtl_Click; RadioButton rdb_Yes = new RadioButton { Text = "", Width = 100, Tag = task.ID }; rdb_Yes.Click += Rdb_Yes_CheckedChanged; RadioButton rdb_No = new RadioButton { Text = "", Width = 20, Tag = task.ID }; rdb_No.Click += Rdb_No_CheckedChanged; if (task.Status == 1) { rdb_Yes.Checked = true; } else { rdb_No.Checked = true; } flp.Controls.Add(mlb); flp.Controls.Add(rdb_Yes); flp.Controls.Add(rdb_No); flp.Controls.Add(mtl); flp_Tasks.Controls.Add(flp); } ; pgb_Progress.Value = f_Project.LoadValueProject(p); lb_Progress.Text = pgb_Progress.Value.ToString() + "%"; }
private void InitializeControls() { btnPinned = new MetroLink(); btnPinned.Location = new Point(5, 5); btnPinned.Size = new Size(32, 32); btnPinned.Image = Properties.Resources.Pin24; btnPinned.NoFocusImage = Properties.Resources.Pin24g; btnPinned.ImageSize = 32; btnPinned.UseSelectable = true; btnPinned.TextImageRelation = TextImageRelation.ImageAboveText; btnPinned.Click += BtnPinned_Click; btnPinned.UseStyleColors = true; btnPinned.BackColor = BackColor; btnPinned.UseCustomBackColor = true; btnPinned.Name = "btnPinned"; Controls.Add(btnPinned); panelbutton = new MetroFlowLayoutPanel(); panelbutton.Location = new Point(0, 40); panelbutton.Size = new Size(0, Height - 40); panelbutton.UseStyleColors = true; panelbutton.BackColor = BackColor; panelbutton.UseCustomBackColor = true; panelbutton.Name = "panelbutton"; Controls.Add(panelbutton); }
private void metroLink2_Click(object sender, EventArgs e) { MetroLink link = (MetroLink)sender; CarDetails form = new CarDetails(link.TabIndex, this.StyleManager); form.ShowDialog(); }
public void olustur(MetroForm frm) { DataTable dtbSinirli = new DataTable(); //Sadece görüntülennecek kkullanıcıları getiriyoruz kullanici.herSayfadakiSonuc = this.herSayfadakiSonuc; dtbSinirli = kullanici.kullanicilariGetirSinirli(); MetroTile tlyatay = new MetroTile(); tlyatay.Location = new System.Drawing.Point(22, 140); tlyatay.Name = "metroyty"; tlyatay.Size = new System.Drawing.Size((frm.Width - (frm.Width * 6 / 100)), 1); frm.Controls.Add(tlyatay); int boyut = frm.Width / dtbSinirli.Columns.Count; for (int i = 0; i < dtbSinirli.Columns.Count; i++) { // Link oluşturma // MetroLink lnk = new MetroLink(); lnk.Location = new System.Drawing.Point(i * boyut + 5, 100); lnk.Name = "lnk" + dtbSinirli.Columns[i].ToString(); lnk.Size = new System.Drawing.Size(70, 20); lnk.Text = dtbSinirli.Columns[i].ToString(); lnk.UseSelectable = true; frm.Controls.Add(lnk); // for (int j = 0; j < dtbSinirli.Rows.Count; j++) { MetroLabel lbl = new MetroLabel(); // Label oluştur // lbl.Location = new System.Drawing.Point(i * boyut + 15, 150 + (j * 40)); lbl.Name = "lbl" + j; lbl.Size = new System.Drawing.Size(70, 20); lbl.Text = dtbSinirli.Rows[j][i].ToString(); //////////////////// frm.Controls.Add(lbl); } // çizgi dikey // MetroTile tl = new MetroTile(); tl.Location = new System.Drawing.Point(i * boyut - 1, 100); tl.Name = "metroTile1" + i; tl.Size = new System.Drawing.Size(1, 264); frm.Controls.Add(tl); } }
private void Link_label_Click(object sender, EventArgs e) { MetroLink temp = (MetroLink)sender; NumberTextBox.Text = temp.Text; BlogTextBox.Text = blogs_dict[temp.Text]; last_click = temp; //System.Diagnostics.Process.Start(blogs_dict[temp.Text]); }
private void Mtl_Click(object sender, EventArgs e) { MetroLink link = sender as MetroLink; Task task = TaskController.GetTasktByID((int)link.Tag); try { Process.Start(task.LinkDocuments); } catch { } }
private void timer1_Tick(object sender, EventArgs e) { timeout = timeout + 5; if (timeout >= 700) { timeout = 0; MetroLink link = (Form1.Instance.Controls["mlBack"] as MetroLink); link.PerformClick(); } }
private void metroLink3_Click(object sender, EventArgs e) { MetroLink link = (MetroLink)sender; var car = _appCar.GetCar(id: link.TabIndex); var amount = _appAmount.GetAmount(car.Id); Rent form = new Rent(car, amount, User, this.StyleManager, Client); this.Hide(); form.ShowDialog(); this.Close(); }
public WarehouseFilterForm(MetroLink link) { this.InitializeComponent(); this.dgvWarehouses.AutoGenerateColumns = false; var repository = new Repository <Warehouse>(); var warehouses = repository.GetAll(); Helpers.SetDataTable(this.dgvWarehouses, warehouses.Where(x => x.Enable).ToList()); this.link = link; }
private MetroLink GetLink(string text) { MetroLink name_label = new MetroLink(); name_label.Text = text; name_label.Width = 100; name_label.TextAlign = ContentAlignment.MiddleLeft; name_label.UseStyleColors = true; name_label.Click += Link_label_Click; name_label.FontSize = MetroFramework.MetroLinkSize.Medium; return(name_label); }
public CategoryFilterForm(MetroLink link) { this.InitializeComponent(); this.dgvCategories.AutoGenerateColumns = false; var repository = new Repository <Category>(); var categories = repository.GetAll(); Helpers.SetDataTable(this.dgvCategories, categories.Where(x => x.Enable).ToList()); this.link = link; }
private void BindLink(string url, MetroLink link) { if (!string.IsNullOrEmpty(ViewModel.ProjectSite)) { lProjectSite.Click += (s, e) => { Process.Start(url); }; } else { link.Enabled = false; } }
private void CreateFavoritesButton() { starBtn = new MetroLink { ImageSize = 16, Size = new Size(16, 16), Location = new Point(Width - 40, 4), Visible = false, NoFocusImage = FavoritesMenu.IsFavorite(item) ? Properties.Resources.StarFilled16g : Properties.Resources.ChristmasStar16g, Image = FavoritesMenu.IsFavorite(item) ? Properties.Resources.StarFilled16g : Properties.Resources.ChristmasStar16g }; starBtn.Click += FavoritesBtn_Click; Controls.Add(starBtn); }
public MetroLink addButton(int i) { MetroLink button = new MetroLink(); button.Size = metroLink2.Size; button.BackColor = Color.Gold; button.UseCustomBackColor = true; button.Text = "Detalhes"; button.TabIndex = i; button.Click += new System.EventHandler(metroLink2_Click); button.Location = metroLink2.Location; return(button); }
private void CreateFavoritesButton() { minusBtn = new MetroLink { ImageSize = 16, Size = new Size(16, 16), Visible = false, NoFocusImage = Properties.Resources.Delete16g, Image = Properties.Resources.Delete16, Location = new Point(Width - 40, 4) }; minusBtn.Click += MinusBtn_Click; Controls.Add(minusBtn); }
void LoadProjectsToFlowLayoutPanel() { flp_Projects.Controls.Clear(); foreach (Project p in ProjectController.getListProjects()) { if (p.Status == 0) { FlowLayoutPanel flp = new FlowLayoutPanel { Width = flp_Projects.Width - 30, Height = 70 }; MetroLabel mlb = new MetroLabel { Text = p.Name, Width = flp_Projects.Width - 30, Height = 25, FontSize = MetroFramework.MetroLabelSize.Tall, BackColor = Color.Transparent }; MetroProgressBar pgb = new MetroProgressBar { Value = LoadValueProject(p), Width = flp_Projects.Width - 280, Height = 15, Location = new Point(0, 15), Style = p.EndDate.Value < DateTime.Now ? MetroFramework.MetroColorStyle.Red : MetroFramework.MetroColorStyle.Green, }; MetroLabel lb = new MetroLabel { Text = pgb.Value.ToString() + "%", Width = 50 }; MetroLink mtl = new MetroLink { Text = "Chi tiết", Width = 150, Tag = p.ID }; mtl.Click += Mtl_Click; flp.Controls.Add(mlb); flp.Controls.Add(pgb); flp.Controls.Add(lb); flp.Controls.Add(mtl); flp_Projects.Controls.Add(flp); } } }
private void AddLink(Panel panel, ShAppStartPageItemDefinition def) { var link = new MetroLink(); link.Text = def.Title; link.TextAlign = ContentAlignment.MiddleLeft; link.Width = pStart.Width; if (def.Click != null) { link.Click += def.Click; } panel.Controls.Add(link); }
private void timer1_Tick(object sender, EventArgs e) { timeout = timeout + 5; if (timeout >= 700) { timeout = 0; MetroLink link = (Form1.Instance.Controls["mlBack"] as MetroLink); link.PerformClick(); } if (FormUsed.FormNow == "Main") { timer1.Enabled = false; timeout = 0; } }
public SupplierFilterForm(MetroLink link, bool customer = false) { this.InitializeComponent(); if (customer) { this.Text = "Búsqueda de Clientes"; } this.dgvSupplier.AutoGenerateColumns = false; var repository = new Repository <Supplier>(); var suppliers = repository.GetAll(); Helpers.SetDataTable(this.dgvSupplier, suppliers.Where(x => x.Enable).ToList()); this.link = link; }
public MetroLink addRentButton(int i) { MetroLink button = new MetroLink(); button.Size = metroLink3.Size; button.BackColor = Color.LimeGreen; button.UseCustomBackColor = true; button.Text = "Alugar"; button.TabIndex = i; button.Click += new System.EventHandler(metroLink3_Click); button.UseCustomForeColor = true; button.ForeColor = Color.Black; button.Location = metroLink3.Location; button.Visible = false; return(button); }
private void PaginationClick(object sender, EventArgs e) { foreach (MetroLink item in this.pPagination.Controls) { item.BackColor = Color.LightGray; item.ForeColor = Color.Black; item.UseCustomForeColor = false; } MetroLink metroLink = sender as MetroLink; metroLink.UseCustomForeColor = true; metroLink.BackColor = Color.DarkViolet; metroLink.ForeColor = Color.White; // Mostrar los datos del productos. this.ShowProduct(metroLink.Tag as Product); }
private void AddLinkPagination(Product product, int x, string name, bool select) { MetroLink metroLink = new MetroLink(); metroLink.Location = new Point(x, 0); metroLink.Size = new Size(25, 14); metroLink.TabIndex = 35; metroLink.Text = name; metroLink.TextAlign = ContentAlignment.TopCenter; metroLink.Click += this.PaginationClick; metroLink.UseCustomBackColor = true; metroLink.BackColor = Color.LightGray; metroLink.UseCustomForeColor = true; metroLink.Tag = product; this.pPagination.Controls.Add(metroLink); if (select) { this.PaginationClick(metroLink, null); } }
private void AddControls(ProductWarehouse productWarehouse) { var metroLabel1 = new MetroLabel(); metroLabel1.AutoSize = true; metroLabel1.FontWeight = MetroLabelWeight.Bold; metroLabel1.Location = new Point(15, this._index); metroLabel1.Size = new Size(33, 19); metroLabel1.Text = productWarehouse.Stock.ToString(); metroLabel1.UseCustomForeColor = true; metroLabel1.ForeColor = Color.MediumSeaGreen; if (productWarehouse.Stock <= 0) { metroLabel1.ForeColor = Color.Crimson; } if (!productWarehouse.Warehouse.Enable) { metroLabel1.ForeColor = Color.OrangeRed; } this.warehousePanel.Controls.Add(metroLabel1); var link = new MetroLink(); link.Location = new Point(50, this._index); link.Size = new Size(75, 23); link.TabIndex = 2; link.AutoSize = true; link.Text = productWarehouse.Warehouse.Name; link.TextAlign = ContentAlignment.MiddleLeft; link.UseSelectable = true; link.Tag = productWarehouse.Warehouse; link.Click += new System.EventHandler(this.metroLink1_Click); this.warehousePanel.Controls.Add(link); this._index += this._margin; }
private void WindowButton_MouseClick(object sender, MouseEventArgs e) { MetroLink button = (MetroLink)sender; WindowsButton buttonType = (WindowsButton)button.Tag; switch (buttonType) { case WindowsButton.close: Close(); break; case WindowsButton.maximized: WindowState = FormWindowState.Normal; break; case WindowsButton.minimized: WindowState = FormWindowState.Maximized; break; case WindowsButton.tray: WindowState = FormWindowState.Minimized; break; } }
public void formSifirla(MetroLink lnk, MetroForm frm) { frm.Controls.Remove(lnk); }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmSpotifyAPICredentials)); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.txtRedirectURL = new MetroFramework.Controls.MetroTextBox(); this.txtClientId = new MetroFramework.Controls.MetroTextBox(); this.txtSecretId = new MetroFramework.Controls.MetroTextBox(); this.lblClientId = new MetroFramework.Controls.MetroLabel(); this.lblSecretId = new MetroFramework.Controls.MetroLabel(); this.lblRedirectURL = new MetroFramework.Controls.MetroLabel(); this.lnkFAQSpotifyAPI = new MetroFramework.Controls.MetroLink(); this.tip = new MetroFramework.Components.MetroToolTip(); this.lnkSpotifyAPIDashboard = new MetroFramework.Controls.MetroLink(); this.tableLayoutPanel2.SuspendLayout(); this.SuspendLayout(); // // tableLayoutPanel2 // this.tableLayoutPanel2.ColumnCount = 2; this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.Controls.Add(this.txtRedirectURL, 1, 2); this.tableLayoutPanel2.Controls.Add(this.txtClientId, 1, 0); this.tableLayoutPanel2.Controls.Add(this.txtSecretId, 1, 1); this.tableLayoutPanel2.Controls.Add(this.lblClientId, 0, 0); this.tableLayoutPanel2.Controls.Add(this.lblSecretId, 0, 1); this.tableLayoutPanel2.Controls.Add(this.lblRedirectURL, 0, 2); this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel2.Location = new System.Drawing.Point(10, 60); this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0); this.tableLayoutPanel2.RowCount = 4; this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel2.Size = new System.Drawing.Size(400, 122); this.tableLayoutPanel2.TabIndex = 0; // // txtRedirectURL // this.txtRedirectURL.BackColor = System.Drawing.Color.Black; // // // this.txtRedirectURL.CustomButton.Image = null; this.txtRedirectURL.CustomButton.Location = new System.Drawing.Point(238, 1); this.txtRedirectURL.CustomButton.Name = ""; this.txtRedirectURL.CustomButton.Size = new System.Drawing.Size(27, 27); this.txtRedirectURL.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; this.txtRedirectURL.CustomButton.TabIndex = 1; this.txtRedirectURL.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; this.txtRedirectURL.CustomButton.UseSelectable = true; this.txtRedirectURL.CustomButton.Visible = false; this.txtRedirectURL.Dock = System.Windows.Forms.DockStyle.Fill; this.txtRedirectURL.FontSize = MetroFramework.MetroTextBoxSize.Medium; this.txtRedirectURL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.txtRedirectURL.Lines = new string[0]; this.txtRedirectURL.Location = new System.Drawing.Point(131, 83); this.txtRedirectURL.MaxLength = 32; this.txtRedirectURL.Name = "txtRedirectURL"; this.txtRedirectURL.PasswordChar = '\0'; this.txtRedirectURL.PromptText = "PASTE_REDIRECT_URL_HERE"; this.txtRedirectURL.ScrollBars = System.Windows.Forms.ScrollBars.None; this.txtRedirectURL.SelectedText = ""; this.txtRedirectURL.SelectionLength = 0; this.txtRedirectURL.SelectionStart = 0; this.txtRedirectURL.ShortcutsEnabled = true; this.txtRedirectURL.Size = new System.Drawing.Size(266, 29); this.txtRedirectURL.Style = MetroFramework.MetroColorStyle.Green; this.txtRedirectURL.TabIndex = 40; this.txtRedirectURL.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.txtRedirectURL.Theme = MetroFramework.MetroThemeStyle.Dark; this.txtRedirectURL.UseCustomBackColor = true; this.txtRedirectURL.UseSelectable = true; this.txtRedirectURL.WaterMark = "PASTE_REDIRECT_URL_HERE"; this.txtRedirectURL.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); this.txtRedirectURL.WaterMarkFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtRedirectURL.TextChanged += new System.EventHandler(this.TxtRedirectURL_TextChanged); // // txtClientId // this.txtClientId.BackColor = System.Drawing.Color.Black; // // // this.txtClientId.CustomButton.Image = null; this.txtClientId.CustomButton.Location = new System.Drawing.Point(238, 1); this.txtClientId.CustomButton.Name = ""; this.txtClientId.CustomButton.Size = new System.Drawing.Size(27, 27); this.txtClientId.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; this.txtClientId.CustomButton.TabIndex = 1; this.txtClientId.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; this.txtClientId.CustomButton.UseSelectable = true; this.txtClientId.CustomButton.Visible = false; this.txtClientId.Dock = System.Windows.Forms.DockStyle.Fill; this.txtClientId.FontSize = MetroFramework.MetroTextBoxSize.Medium; this.txtClientId.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.txtClientId.Lines = new string[0]; this.txtClientId.Location = new System.Drawing.Point(131, 13); this.txtClientId.MaxLength = 32; this.txtClientId.Name = "txtClientId"; this.txtClientId.PasswordChar = '\0'; this.txtClientId.PromptText = "PASTE_KEY_ID_HERE"; this.txtClientId.ScrollBars = System.Windows.Forms.ScrollBars.None; this.txtClientId.SelectedText = ""; this.txtClientId.SelectionLength = 0; this.txtClientId.SelectionStart = 0; this.txtClientId.ShortcutsEnabled = true; this.txtClientId.Size = new System.Drawing.Size(266, 29); this.txtClientId.Style = MetroFramework.MetroColorStyle.Green; this.txtClientId.TabIndex = 35; this.txtClientId.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.txtClientId.Theme = MetroFramework.MetroThemeStyle.Dark; this.txtClientId.UseCustomBackColor = true; this.txtClientId.UseSelectable = true; this.txtClientId.WaterMark = "PASTE_KEY_ID_HERE"; this.txtClientId.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); this.txtClientId.WaterMarkFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtClientId.TextChanged += new System.EventHandler(this.TxtClientId_TextChanged); // // txtSecretId // this.txtSecretId.BackColor = System.Drawing.Color.Black; // // // this.txtSecretId.CustomButton.Image = null; this.txtSecretId.CustomButton.Location = new System.Drawing.Point(238, 1); this.txtSecretId.CustomButton.Name = ""; this.txtSecretId.CustomButton.Size = new System.Drawing.Size(27, 27); this.txtSecretId.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; this.txtSecretId.CustomButton.TabIndex = 1; this.txtSecretId.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; this.txtSecretId.CustomButton.UseSelectable = true; this.txtSecretId.CustomButton.Visible = false; this.txtSecretId.Dock = System.Windows.Forms.DockStyle.Fill; this.txtSecretId.FontSize = MetroFramework.MetroTextBoxSize.Medium; this.txtSecretId.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.txtSecretId.Lines = new string[0]; this.txtSecretId.Location = new System.Drawing.Point(131, 48); this.txtSecretId.MaxLength = 32; this.txtSecretId.Name = "txtSecretId"; this.txtSecretId.PasswordChar = '\0'; this.txtSecretId.PromptText = "PASTE_KEY_ID_HERE"; this.txtSecretId.ScrollBars = System.Windows.Forms.ScrollBars.None; this.txtSecretId.SelectedText = ""; this.txtSecretId.SelectionLength = 0; this.txtSecretId.SelectionStart = 0; this.txtSecretId.ShortcutsEnabled = true; this.txtSecretId.Size = new System.Drawing.Size(266, 29); this.txtSecretId.Style = MetroFramework.MetroColorStyle.Green; this.txtSecretId.TabIndex = 36; this.txtSecretId.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.txtSecretId.Theme = MetroFramework.MetroThemeStyle.Dark; this.txtSecretId.UseCustomBackColor = true; this.txtSecretId.UseSelectable = true; this.txtSecretId.WaterMark = "PASTE_KEY_ID_HERE"; this.txtSecretId.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); this.txtSecretId.WaterMarkFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtSecretId.TextChanged += new System.EventHandler(this.TxtSecretId_TextChanged); // // lblClientId // this.lblClientId.AutoSize = true; this.lblClientId.Dock = System.Windows.Forms.DockStyle.Fill; this.lblClientId.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.lblClientId.Location = new System.Drawing.Point(3, 10); this.lblClientId.Name = "lblClientId"; this.lblClientId.Size = new System.Drawing.Size(122, 35); this.lblClientId.TabIndex = 37; this.lblClientId.Text = "LBL_CLIENT_ID"; this.lblClientId.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblClientId.Theme = MetroFramework.MetroThemeStyle.Dark; // // lblSecretId // this.lblSecretId.AutoSize = true; this.lblSecretId.Dock = System.Windows.Forms.DockStyle.Fill; this.lblSecretId.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.lblSecretId.Location = new System.Drawing.Point(3, 45); this.lblSecretId.Name = "lblSecretId"; this.lblSecretId.Size = new System.Drawing.Size(122, 35); this.lblSecretId.TabIndex = 38; this.lblSecretId.Text = "LBL_SECRET_ID"; this.lblSecretId.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblSecretId.Theme = MetroFramework.MetroThemeStyle.Dark; // // lblRedirectURL // this.lblRedirectURL.AutoSize = true; this.lblRedirectURL.Dock = System.Windows.Forms.DockStyle.Fill; this.lblRedirectURL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.lblRedirectURL.Location = new System.Drawing.Point(3, 80); this.lblRedirectURL.Name = "lblRedirectURL"; this.lblRedirectURL.Size = new System.Drawing.Size(122, 35); this.lblRedirectURL.TabIndex = 39; this.lblRedirectURL.Text = "LBL_REDIRECT_URL"; this.lblRedirectURL.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblRedirectURL.Theme = MetroFramework.MetroThemeStyle.Dark; // // lnkFAQSpotifyAPI // this.lnkFAQSpotifyAPI.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.lnkFAQSpotifyAPI.Image = global::EspionSpotify.Properties.Resources.faq; this.lnkFAQSpotifyAPI.ImageSize = 12; this.lnkFAQSpotifyAPI.Location = new System.Drawing.Point(369, 5); this.lnkFAQSpotifyAPI.Margin = new System.Windows.Forms.Padding(0); this.lnkFAQSpotifyAPI.Name = "lnkFAQSpotifyAPI"; this.lnkFAQSpotifyAPI.Size = new System.Drawing.Size(18, 18); this.lnkFAQSpotifyAPI.TabIndex = 44; this.lnkFAQSpotifyAPI.UseCustomBackColor = true; this.lnkFAQSpotifyAPI.UseSelectable = true; this.lnkFAQSpotifyAPI.Click += new System.EventHandler(this.LnkFAQSpotifyAPI_Click); // // tip // this.tip.Style = MetroFramework.MetroColorStyle.Default; this.tip.StyleManager = null; this.tip.Theme = MetroFramework.MetroThemeStyle.Light; // // lnkSpotifyAPIDashboard // this.lnkSpotifyAPIDashboard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.lnkSpotifyAPIDashboard.Image = global::EspionSpotify.Properties.Resources.spotify; this.lnkSpotifyAPIDashboard.ImageSize = 14; this.lnkSpotifyAPIDashboard.Location = new System.Drawing.Point(344, 5); this.lnkSpotifyAPIDashboard.Margin = new System.Windows.Forms.Padding(0); this.lnkSpotifyAPIDashboard.Name = "lnkSpotifyAPIDashboard"; this.lnkSpotifyAPIDashboard.Size = new System.Drawing.Size(18, 18); this.lnkSpotifyAPIDashboard.TabIndex = 45; this.lnkSpotifyAPIDashboard.UseCustomBackColor = true; this.lnkSpotifyAPIDashboard.UseSelectable = true; this.lnkSpotifyAPIDashboard.Click += new System.EventHandler(this.LnkSpotifyAPIDashboard_Click); // // FrmSpotifyAPICredentials // this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle; this.ClientSize = new System.Drawing.Size(420, 202); this.Controls.Add(this.lnkSpotifyAPIDashboard); this.Controls.Add(this.lnkFAQSpotifyAPI); this.Controls.Add(this.tableLayoutPanel2); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; this.Movable = false; this.Name = "FrmSpotifyAPICredentials"; this.Padding = new System.Windows.Forms.Padding(10, 60, 10, 20); this.Resizable = false; this.ShowIcon = false; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Style = MetroFramework.MetroColorStyle.Green; this.Text = "SPOTIFY_API_CREDENTIALS"; this.Theme = MetroFramework.MetroThemeStyle.Dark; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmSpotifyAPICredentials_FormClosing); this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); this.ResumeLayout(false); }
private void CreateBaseTextBox() { if (upButton != null) { return; } var resources = new System.ComponentModel.ComponentResourceManager(typeof(MetroNumericUpDown)); var size = TextRenderer.MeasureText("0", MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight)); upButton = new MetroLink { Theme = Theme, Style = Style, Location = new Point(Width - 8, 3), Size = new Size(8, 8), ImageSize = 8, Image = ((System.Drawing.Image)(resources.GetObject("Up8"))), NoFocusImage = ((System.Drawing.Image)(resources.GetObject("Up8g"))), TabStop = false }; upButton.Click += UpButton_Click; if (!this.Controls.Contains(this.upButton)) { this.Controls.Add(upButton); } dwButton = new MetroLink { Theme = Theme, Style = Style, Location = new Point(Width - 8, 5), Size = new Size(8, 8), ImageSize = 8, TabStop = false, Image = ((System.Drawing.Image)(resources.GetObject("Down8"))), NoFocusImage = ((System.Drawing.Image)(resources.GetObject("Down8g"))) }; dwButton.Click += DwButton_Click; if (!this.Controls.Contains(this.dwButton)) { this.Controls.Add(dwButton); } if (baseTextBox != null) { return; } baseTextBox = new TextBox { BorderStyle = BorderStyle.None, Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight), Size = new Size(Width - 14, Height - 6), Location = new Point(3, 3), TextAlign = HorizontalAlignment.Right, TabStop = true }; UpdateBaseTextBox(); Controls.Add(baseTextBox); }