public void HandlePost(PostInfo i_Post) { if (Enabled) { foreach (KeyValuePair<string, string> pair in r_ShortcutsToReplace) { i_Post.StatusText = i_Post.StatusText.Replace(pair.Key, pair.Value); } } }
public void HandlePost(PostInfo i_Post) { SendPostCommand postCommand = new SendPostCommand { Post = i_Post, LoggedInUser = this.LoggedInUser }; bool networkAvalable = NetworkInterface.GetIsNetworkAvailable(); if (Enabled && !networkAvalable) { MessageBox.Show(@"Network is unavailable. The post will be posted when network is returns."); NetworkCommandScheduler.ScheduleOnNetworkAvailability(postCommand); } else { postCommand.Execute(); } }
private void buttonPost_Click(object i_Sender, EventArgs i_Args) { CompiledPost = CannedPost.GeneratePost(r_DynamicParts); this.DialogResult = DialogResult.OK; this.Close(); }