internal CommitDialog( WindowOwner owner, Func < CommitDialog, BranchName, IEnumerable <CommitFile>, string, bool, CommitDialogViewModel> CommitDialogViewModelProvider, BranchName branchName, IEnumerable <CommitFile> files, string commitMessage, bool isMerging) { Owner = owner; InitializeComponent(); viewModel = CommitDialogViewModelProvider( this, branchName, files, commitMessage, isMerging); DataContext = viewModel; if (string.IsNullOrWhiteSpace(viewModel.Subject)) { SubjectText.Focus(); } else { DescriptionText.Focus(); } }
protected void Page_Load(object sender, EventArgs e) { EmpDS.SelectCommand = "SELECT [Name], [EmpNo] FROM " + Tables.tblEmployees + " ORDER BY Name ASC"; SubjectText.Focus(); UpdateButton.ValidationGroup = Owner.ValidationGroup; UpdateButton.CommandName = Mode == AdvancedFormMode.Edit ? "Update" : "Insert"; if (Owner.AdvancedForm.EnableTimeZonesEditing) { PopulateTimeZonesDropDown(); } else { TimeZonesDropDown.Visible = false; } if (!Owner.Reminders.Enabled) { ReminderDropDown.Visible = false; } InitializeStrings(); InitializeRecurrenceEditor(); if (!FormInitialized) { UpdateResetExceptionsVisibility(); } }
public void BbsStrategyTest_AnalyzeSubjectText() { BbsStrategy strategy = new ShitarabaBbsStrategy(new BbsInfo { }); PrivateObject accessor = new PrivateObject(strategy); List <ThreadInfo> threadList = (List <ThreadInfo>)accessor.Invoke("AnalyzeSubjectText", new object[] { SubjectText.Replace("\r\n", "\n").Split('\n') }); // スレッド一覧数のチェック Assert.AreEqual(threadTitleList.Length, threadList.Count); for (int i = 0; i < threadList.Count; i++) { Assert.AreEqual(threadNoList[i], threadList[i].ThreadNo); Assert.AreEqual(threadTitleList[i], threadList[i].ThreadTitle); Assert.AreEqual(resCountList[i], threadList[i].ResCount); // TODO レス勢い取得:未実装 Assert.AreEqual(threadNoList[i], threadList[i].ThreadSpeed); } }