public void Save() { foreach (Action SaveAction in SaveActions) { SaveAction?.Invoke(); } }
public MessagingContext() { SaveCommand = new DelegateCommand(() => { SaveAction?.Invoke(); }); }
public EmailContext() { SaveCommand = new DelegateCommand(() => { SaveAction?.Invoke(); }); }
public UserContext() { GenderList = new ObservableCollection <string>(); CountryList = new ObservableCollection <string>(); SaveCommand = new DelegateCommand(() => { SaveAction?.Invoke(); }); }
void SaveToolBarItem_Clicked(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(_ProductSelectionEntry.Text)) { OrderItemNotSelectedAction.Invoke(); } else { SaveAction.Invoke(); } }
public async Task SaveAsync() { SaveAction?.Invoke(); // TODO: alternative solution? try { await TryCloseAsync(true); } catch (Exception) { await TryCloseAsync(); } }
public void WriteToFile <T>(string filePath, T toSave) { SaveAction <T> saveAction = null; switch (fileFormat) { case FileFormat.Binary: saveAction = WriteBinary; break; case FileFormat.Xml: saveAction = WriteXml; break; case FileFormat.Json: saveAction = WriteJson; break; } saveAction.Invoke(filePath, toSave); }
public static void Save <T>(string key, T value) { SaveAction saveAction = null; #region COMMON TYPES if (value is int) { saveAction = SetInt; } else if (value is float) { saveAction = SetFloat; } else if (value is string) { saveAction = SetString; } else if (value is bool) { saveAction = SetBool; } else if (value is double) { saveAction = SetDouble; } else if (value is long) { saveAction = SetLong; } else if (value is byte) { saveAction = SetByte; } else if (value is short) { saveAction = SetShort; } else if (value is char) { saveAction = SetChar; } else if (value is DateTime) { saveAction = SetDateTime; } #endregion #region UNSIGNED TYPES else if (value is uint) { saveAction = SetUnsignedInt; } else if (value is ulong) { saveAction = SetUnsignedLong; } else if (value is ushort) { saveAction = SetUnsignedShort; } #endregion #region OBJECT else { saveAction = SetObject <T>; } #endregion saveAction.Invoke(key, value); }
private void button1_Click(object sender, EventArgs e) { SaveAction?.Invoke(); }
private void saveMenuItem_Click(object sender, EventArgs e) { SaveAction?.Invoke(); }
public WeatherContext() { SaveCommand = new DelegateCommand(() => { SaveAction?.Invoke(); }); }
private void Btn_save_match_Click(object sender, EventArgs e) { var artworks = GetArtworks(); SaveAction?.Invoke(artworks); }