private void OnLinkClick(object sender, LinkLabelLinkClickedEventArgs e) { fadMapTextType mapGraticuleTextType = fadMapTextType.mapTextTypeNone; switch (((LinkLabel)sender).Name) { case "lnkTitle": mapGraticuleTextType = fadMapTextType.mapTextTypeTitle; break; case "lnkNote": mapGraticuleTextType = fadMapTextType.mapTextTypeNote; break; } var configForm = GraticuleTextHelperForm.GetInstance(mapGraticuleTextType, this); if (configForm.Visible) { configForm.BringToFront(); } else { configForm.Show(this); } }
public static GraticuleTextHelperForm GetInstance(fadMapTextType mapText, GraticuleForm parentForm) { if (_instance == null) { _instance = new GraticuleTextHelperForm(mapText, parentForm); } return(_instance); }
public GraticuleTextHelperForm(fadMapTextType mapTextType, GraticuleForm parentForm) { InitializeComponent(); _mapTextType = mapTextType; _parentForm = parentForm; }