Ejemplo n.º 1
0
        public ActionResult Index()
        {
            var vm = new ChangesetViewModel();

            vm.Changes = BuildTranslations();

            return(View("Changeset", vm));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Standard constructor for the tool window.
        /// </summary>
        public vMergeChangesetsToolWindow() :
            base(null)
        {
            // Set the window title reading it from the resources.

            try
            {
                this.Caption = Resources.ChangesetToolWindowTitle;
                // Set the image that will appear on the tab of the window frame
                // when docked with an other window
                // The resource ID correspond to the one defined in the resx file
                // while the Index is the offset in the bitmap strip. Each image in
                // the strip being 16x16.
                SimpleLogger.Checkpoint("vMergeWorkItemsToolWindow - Set Bitmap");
                this.BitmapResourceID = 301;
                this.BitmapIndex      = 1;
                SimpleLogger.Checkpoint("vMergeWorkItemsToolWindow - Set Bitmap finished");
            }
            catch (Exception ex)
            {
                SimpleLogger.Log(ex, false, false);
            }

            // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
            // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
            // the object returned by the Content property.
            try {
                SimpleLogger.Checkpoint("vMergeWorkItemsToolWindow - Set ViewModels");
                var changesetViewModel = new ChangesetViewModel(vMergePackage.TfsItemCache);
                var changesetWindow    = Repository.Instance.ViewManager.CreateViewFor(changesetViewModel);
                vMergePackage.ThemeWindow(changesetWindow.View);

                //MahApps.Metro.ThemeManager.ChangeTheme(changesetWindow.View.Resources, vMergePackage.DefaultAccent, vMergePackage.DefaultTheme);
                SimpleLogger.Checkpoint("vMergeWorkItemsToolWindow - Set Content");
                base.Content = changesetWindow.View;
            }
            catch (Exception ex)
            {
                SimpleLogger.Log(ex, false, false);
            }
        }
Ejemplo n.º 3
0
 public ChangesetsViewController(string user, string slug, ulong pullRequestId) : this()
 {
     ViewModel = new PullRequestCommitsViewModel(user, slug, pullRequestId);
     DoBinding();
 }
Ejemplo n.º 4
0
 public ChangesetsViewController(string user, string slug, string branch = null) : this()
 {
     ViewModel = new ChangesetViewModel(user, slug, branch);
     DoBinding();
 }