private void SelectedPath_Changed(string new_value) { if (string.IsNullOrWhiteSpace(new_value)) { return; } Util.AddToHistoryList(History, new_value, true, MaxHistoryLength); SelectedPathChanged?.Invoke(this, EventArgs.Empty); }
private void ValidatePath() { SelectedPath = Directory.Exists(textBox1.Text) ? textBox1.Text : null; textBox1.Text = SelectedPath; if (SelectedPath != previousPath) { SelectedPathChanged?.Invoke(this, EventArgs.Empty); } previousPath = SelectedPath; }