public MapPushpinForm(IWin32Window parentFrame, Point location, MapPushpinEditedHandler pushpinEditedHandler, MapPushpinInfo pushpinInfo) : base(parentFrame) { // // Required for Windows Form Designer support // InitializeComponent(); if (SystemInformation.HighContrast) { this.BackColor = SystemColors.Control; } this.labelTitle.Text = Res.Get(StringId.PushpinTitle); this.textBoxTitle.Text = Res.Get(StringId.PushpinUntitled); this.labelNotes.Text = Res.Get(StringId.PushpinNotes); this.labelPhotoUrl.Text = Res.Get(StringId.PushpinPhotoUrl); this.labelMoreInfoUrl.Text = Res.Get(StringId.PushpinMoreInfoUrl); this.buttonSave.Text = Res.Get(StringId.SaveButton); this.buttonCancel.Text = Res.Get(StringId.CancelButton); _pushpinEditedHandler = pushpinEditedHandler; if (pushpinInfo == null) { pushpinInfo = new MapPushpinInfo(String.Empty); } textBoxTitle.Text = pushpinInfo.Title; if (textBoxTitle.Text == String.Empty) { textBoxTitle.Text = UNTITLED_PUSHPIN; } textBoxNotes.Text = pushpinInfo.Notes; textBoxPhotoUrl.Text = pushpinInfo.PhotoUrl; textBoxMoreInfoUrl.Text = pushpinInfo.MoreInfoUrl; if (pushpinInfo.Title == String.Empty) { Text = Res.Get(StringId.PushpinAdd); } else { Text = Res.Get(StringId.PushpinEdit); } Location = location; }
public MapPushpinForm(IWin32Window parentFrame, Point location, MapPushpinEditedHandler pushpinEditedHandler, MapPushpinInfo pushpinInfo) : base(parentFrame) { // // Required for Windows Form Designer support // InitializeComponent(); if (SystemInformation.HighContrast) this.BackColor = SystemColors.Control; this.labelTitle.Text = Res.Get(StringId.PushpinTitle); this.textBoxTitle.Text = Res.Get(StringId.PushpinUntitled); this.labelNotes.Text = Res.Get(StringId.PushpinNotes); this.labelPhotoUrl.Text = Res.Get(StringId.PushpinPhotoUrl); this.labelMoreInfoUrl.Text = Res.Get(StringId.PushpinMoreInfoUrl); this.buttonSave.Text = Res.Get(StringId.SaveButton); this.buttonCancel.Text = Res.Get(StringId.CancelButton); _pushpinEditedHandler = pushpinEditedHandler; if (pushpinInfo == null) pushpinInfo = new MapPushpinInfo(String.Empty); textBoxTitle.Text = pushpinInfo.Title; if (textBoxTitle.Text == String.Empty) textBoxTitle.Text = UNTITLED_PUSHPIN; textBoxNotes.Text = pushpinInfo.Notes; textBoxPhotoUrl.Text = pushpinInfo.PhotoUrl; textBoxMoreInfoUrl.Text = pushpinInfo.MoreInfoUrl; if (pushpinInfo.Title == String.Empty) { Text = Res.Get(StringId.PushpinAdd); } else { Text = Res.Get(StringId.PushpinEdit); } Location = location; }
public MapPushpinForm(IWin32Window parentFrame, Point location, MapPushpinEditedHandler pushpinEditedHandler) : this(parentFrame, location, pushpinEditedHandler, null) { }