mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
Upgrade project style
This commit is contained in:
parent
afd22ca85d
commit
baa6c1445a
136 changed files with 29 additions and 770 deletions
54
SourceGit/UI/CherryPick.xaml.cs
Normal file
54
SourceGit/UI/CherryPick.xaml.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SourceGit.UI {
|
||||
|
||||
/// <summary>
|
||||
/// Cherry pick commit dialog.
|
||||
/// </summary>
|
||||
public partial class CherryPick : UserControl {
|
||||
private Git.Repository repo = null;
|
||||
private string commitSHA = null;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="opened"></param>
|
||||
/// <param name="commit"></param>
|
||||
public CherryPick(Git.Repository opened, Git.Commit commit) {
|
||||
InitializeComponent();
|
||||
|
||||
repo = opened;
|
||||
commitSHA = commit.SHA;
|
||||
desc.Content = $"{commit.ShortSHA} {commit.Subject}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Display this dialog.
|
||||
/// </summary>
|
||||
/// <param name="repo"></param>
|
||||
/// <param name="commit"></param>
|
||||
public static void Show(Git.Repository repo, Git.Commit commit) {
|
||||
PopupManager.Show(new CherryPick(repo, commit));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start pick.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Start(object sender, RoutedEventArgs e) {
|
||||
repo.CherryPick(commitSHA, chkCommitChanges.IsChecked != true);
|
||||
PopupManager.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancel.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Cancel(object sender, RoutedEventArgs e) {
|
||||
PopupManager.Close();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue