private void laborNameLabel_Click(object sender, EventArgs e) { var dialog = new TextInputForm { initialValue = laborNameLabel.Text, Text = "Choose new name" }; if (dialog.ShowDialog(out string newName) == DialogResult.OK) { inner.name = newName; sync(); informOfChange(LaborChange.NameChanged); } }
private void ProfileNameLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var dialog = new TextInputForm { initialValue = ProfileNameLinkLabel.Text, Text = "Choose new name" }; if (dialog.ShowDialog(out string newName) == DialogResult.OK) { profile.name = newName; ProfileNameLinkLabel.Text = profile.name; } resetSaveTimer(); }
private void linkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if ((e.Button & MouseButtons.Right) != 0) { var dialog = new TextInputForm { initialValue = inner.link, Text = "Choose new link" }; if (dialog.ShowDialog(out string newLink) == DialogResult.OK) { inner.link = newLink; sync(); informOfChange(LaborChange.LinkChanged); } } else { if (inner.link == null) { return; } System.Diagnostics.Process.Start(inner.link); } }