private void RemoveCommand(string id, bool skipInput) { FollowRemoveCommandArgs arg = new FollowRemoveCommandArgs(); arg.tw = tw; arg.id = id; if (!skipInput) { using (InputTabName inputName = new InputTabName()) { inputName.FormTitle = "Unfollow"; inputName.FormDescription = Properties.Resources.FRMessage1; inputName.TabName = id; if (inputName.ShowDialog() == DialogResult.OK && !string.IsNullOrEmpty(inputName.TabName.Trim())) { arg.tw = tw; arg.id = inputName.TabName.Trim(); } else { return; } } } using (FormInfo _info = new FormInfo(this, Properties.Resources.RemoveCommandText1, RemoveCommand_DoWork, null, arg)) { _info.ShowDialog(); string ret = (string)_info.Result; if (!string.IsNullOrEmpty(ret)) MessageBox.Show(Properties.Resources.FRMessage2 + ret); else MessageBox.Show(Properties.Resources.FRMessage3); } }
private void RemoveCommand(string id, bool skipInput) { if (id == null) { return; } if (!skipInput) { var removeid = id; if (!TryUserInputText(ref removeid, "Unfollow", R.FRMessage1)) { return; } id = removeid; } if (string.IsNullOrEmpty(id) || id == _tw.Username) { return; } var arg = new FollowRemoveCommandArgs { Tw = _tw, Id = id }; using (var info = new FormInfo(this, R.RemoveCommandText1, RemoveCommand_DoWork, null, arg)) { info.ShowDialog(); var ret = (string)info.Result; MessageBox.Show(!string.IsNullOrEmpty(ret) ? R.FRMessage2 + ret : R.FRMessage3); } }