public static void ShowModelDialog(Repository repository, String rootPath = null) { if (repository == null) { return; } try { CommitDialog dlg = new CommitDialog(); var model = new FileManagerViewModel(repository, rootPath); model.Owner = dlg; dlg.DataContext = model; dlg.ShowDialog(); } catch (Exception ee) { Trace.WriteLine("### [" + ee.Source + "] Exception: " + ee.Message); Trace.WriteLine("### " + ee.StackTrace); } }
/// <summary> /// 显示代码提交对话框; /// </summary> public void Commit(String path = null) { CommitDialog.ShowModelDialog(this.TheRepository, path); }