protected virtual void OnSaveConfig() { SaveConfig?.Invoke(this, EventArgs.Empty); try { var log = SB.Logger.Entries.LastOrDefault(); if (log == null || !log.LogString.StartsWith("Failed to save the config. Reason:") && log.LogLevel != LogLevel.Error) { //green iconSave.Foreground = bc.ConvertFrom("#FF5DF5A7") as Brush; RestoreForegroundIconSave(); } else { //red iconSave.Foreground = bc.ConvertFrom("#FFF5645D") as Brush; RestoreForegroundIconSave(); } } catch { try { iconSave.Foreground = Brushes.White; } catch { } } }
protected virtual void OnSaveConfig() { SaveConfig?.Invoke(this, EventArgs.Empty); }
private void MBtnConfigSaveConnectionString_Click(object sender, EventArgs e) { ConnectionString = mTxtConfigConnectionString.Text; SaveConfig?.Invoke(this, null); }