private void LinkEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (TemplateCombo.SelectedItem == null) { return; } ProfileTemplate template = (ProfileTemplate)TemplateCombo.SelectedItem; if (template.Inactive) { return; } // if ondisk, copy before editing if (template.OnDisk) { ProfileTemplate copy = new ProfileTemplate(false, false); copy.User = template.User + " (edited)"; copy.User = copy.User.TrimStart(new char[] { ' ' }); copy.Html = template.Html; template = copy; } EditTemplate edit = new EditTemplate(template, this); edit.ShowDialog(this); }
private void LinkNew_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { ProfileTemplate newTemplate = new ProfileTemplate(false, false); newTemplate.User = "******"; newTemplate.Html = ""; if (NewCount > 0) { newTemplate.User += " " + NewCount.ToString(); } NewCount++; EditTemplate edit = new EditTemplate(newTemplate, this); edit.ShowDialog(this); }
private void LinkNew_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { ProfileTemplate newTemplate = new ProfileTemplate(false, false); newTemplate.User = "******"; newTemplate.Html = ""; if (NewCount > 0) newTemplate.User += " " + NewCount.ToString(); NewCount++; EditTemplate edit = new EditTemplate(newTemplate, this); edit.ShowDialog(this); }
private void LinkEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (TemplateCombo.SelectedItem == null) return; ProfileTemplate template = (ProfileTemplate)TemplateCombo.SelectedItem; if (template.Inactive) return; // if ondisk, copy before editing if (template.OnDisk) { ProfileTemplate copy = new ProfileTemplate(false, false); copy.User = template.User + " (edited)"; copy.User = copy.User.TrimStart(new char[] { ' ' }); copy.Html = template.Html; template = copy; } EditTemplate edit = new EditTemplate(template, this); edit.ShowDialog(this); }