• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Views.VersionControlDocumentInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MonoDevelop.VersionControl.Views.VersionControlDocumentInfo的典型用法代码示例。如果您正苦于以下问题:C# VersionControlDocumentInfo类的具体用法?C# VersionControlDocumentInfo怎么用?C# VersionControlDocumentInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



VersionControlDocumentInfo类属于MonoDevelop.VersionControl.Views命名空间,在下文中一共展示了VersionControlDocumentInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Load

		public void Load (VersionControlDocumentInfo info)
		{
			base.info = info;
			// SetLocal calls create diff & sets UpdateDiff handler -> should be connected after diff is created
			SetLocal (MainEditor.GetTextEditorData ());
			Show ();
		}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:7,代码来源:MergeWidget.cs


示例2: DiffWidget

		public DiffWidget (VersionControlDocumentInfo info)
		{
			this.info = info;
			this.Build ();
			fixed1.SetSizeRequest (16, 16);
			this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext ();
			this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev ();
			notebook1.Page = 0;
			comparisonWidget.DiffChanged += delegate {
				labelOverview.Markup = "<big>" + LabelText + "</big>";
				SetButtonSensitivity ();
			};
			comparisonWidget.SetVersionControlInfo (info);
			this.buttonDiff.Clicked += HandleButtonDiffhandleClicked;
			diffTextEditor = new global::Mono.TextEditor.TextEditor ();
			diffTextEditor.Document.MimeType = "text/x-diff";
			diffTextEditor.Options.FontName = info.Document.Editor.Options.FontName;
			diffTextEditor.Options.ColorScheme = info.Document.Editor.Options.ColorScheme;
			diffTextEditor.Options.ShowFoldMargin = false;
			diffTextEditor.Options.ShowIconMargin = false;
			diffTextEditor.Options.ShowTabs = info.Document.Editor.Options.ShowTabs;
			diffTextEditor.Options.ShowSpaces = info.Document.Editor.Options.ShowSpaces;
			diffTextEditor.Options.ShowInvalidLines = info.Document.Editor.Options.ShowInvalidLines;
			diffTextEditor.Options.ShowInvalidLines = info.Document.Editor.Options.ShowInvalidLines;
			diffTextEditor.Document.ReadOnly = true;
			scrolledwindow1.Child = diffTextEditor;
			diffTextEditor.Show ();
			SetButtonSensitivity ();
		}
开发者ID:pgoron,项目名称:monodevelop,代码行数:29,代码来源:DiffWidget.cs


示例3: DiffWidget

		public DiffWidget (VersionControlDocumentInfo info, bool viewOnly)
		{
			this.info = info;
			this.Build ();
			comparisonWidget = new MonoDevelop.VersionControl.Views.ComparisonWidget (viewOnly);
			
			fixed1.SetSizeRequest (16, 16);
			this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext ();
			this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev ();
			notebook1.Page = 0;
			vboxComparisonView.PackStart (comparisonWidget, true, true, 0);
			comparisonWidget.Show ();
			
			comparisonWidget.DiffChanged += delegate {
				labelOverview.Markup = LabelText;
				SetButtonSensitivity ();
			};
			comparisonWidget.SetVersionControlInfo (info);
			this.buttonDiff.Clicked += HandleButtonDiffhandleClicked;
			diffTextEditor = new global::Mono.TextEditor.TextEditor (new Mono.TextEditor.Document (), new CommonTextEditorOptions ());
			diffTextEditor.Document.MimeType = "text/x-diff";
			
			diffTextEditor.Options.ShowFoldMargin = false;
			diffTextEditor.Options.ShowIconMargin = false;
			diffTextEditor.Document.ReadOnly = true;
			scrolledwindow1.Child = diffTextEditor;
			diffTextEditor.Show ();
			SetButtonSensitivity ();
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:29,代码来源:DiffWidget.cs


示例4: PatchWidget

		public PatchWidget (ComparisonView comparisonView, VersionControlDocumentInfo info)
		{
			this.Build ();
			diffEditor = new Mono.TextEditor.TextEditor ();
			diffEditor.Document.MimeType = "text/x-diff";
			diffEditor.Options.FontName = info.Document.Editor.Options.FontName;
			diffEditor.Options.ColorScheme = info.Document.Editor.Options.ColorScheme;
			diffEditor.Options.ShowFoldMargin = false;
			diffEditor.Options.ShowIconMargin = false;
			diffEditor.Options.ShowTabs = true;
			diffEditor.Options.ShowSpaces = true;
			diffEditor.Options.ShowInvalidLines = info.Document.Editor.Options.ShowInvalidLines;
			diffEditor.Document.ReadOnly = true;
			scrolledwindow1.Child = diffEditor;
			diffEditor.ShowAll ();
			using (var writer = new StringWriter ()) {
				UnifiedDiff.WriteUnifiedDiff (comparisonView.Diff, writer, 
				                              System.IO.Path.GetFileName (info.Item.Path) + "    (repository)", 
				                              System.IO.Path.GetFileName (info.Item.Path) + "    (working copy)",
				                              3);
				diffEditor.Document.Text = writer.ToString ();
			}
			buttonSave.Clicked += delegate {
				var dlg = new OpenFileDialog (GettextCatalog.GetString ("Save as..."), FileChooserAction.Save) {
					TransientFor = IdeApp.Workbench.RootWindow
				};
				
				if (!dlg.Run ())
					return;
				File.WriteAllText (dlg.SelectedFile, diffEditor.Document.Text);
			};
		}
开发者ID:acken,项目名称:monodevelop,代码行数:32,代码来源:PatchWidget.cs


示例5: TryAttachView

		static void TryAttachView (Document document, VersionControlDocumentInfo info, string type)
		{
			var handler = AddinManager.GetExtensionObjects<IVersionControlViewHandler> (type)
				.FirstOrDefault (h => h.CanHandle (info.Item, info.Document));
			if (handler != null)
				document.Window.AttachViewContent (handler.CreateView (info));
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:SubviewAttachmentHandler.cs


示例6: DiffWidget

		public DiffWidget (VersionControlDocumentInfo info, bool viewOnly = false)
		{
			this.info = info;
			this.Build ();
			comparisonWidget = new ComparisonWidget (viewOnly);
			buttonNext = new DocumentToolButton (Gtk.Stock.GoUp, GettextCatalog.GetString ("Previous Change"));
			buttonPrev = new DocumentToolButton (Gtk.Stock.GoDown, GettextCatalog.GetString ("Next Change"));
			labelOverview = new Gtk.Label () { Xalign = 0 };
			buttonDiff = new Gtk.Button (GettextCatalog.GetString ("Unified Diff"));
			
			this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext ();
			this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev ();
			notebook1.Page = 0;
			vboxComparisonView.PackStart (comparisonWidget, true, true, 0);
			comparisonWidget.Show ();
			
			comparisonWidget.DiffChanged += delegate {
				labelOverview.Markup = LabelText;
				SetButtonSensitivity ();
			};
			comparisonWidget.SetVersionControlInfo (info);
			this.buttonDiff.Clicked += HandleButtonDiffhandleClicked;
			diffTextEditor = new global::Mono.TextEditor.MonoTextEditor (new Mono.TextEditor.TextDocument (), CommonTextEditorOptions.Instance);
			diffTextEditor.Document.MimeType = "text/x-diff";
			
			diffTextEditor.Options.ShowFoldMargin = false;
			diffTextEditor.Options.ShowIconMargin = false;
			diffTextEditor.Options.DrawIndentationMarkers = PropertyService.Get ("DrawIndentationMarkers", false);
			diffTextEditor.Document.ReadOnly = true;
			scrolledwindow1.Child = diffTextEditor;
			diffTextEditor.Show ();
			SetButtonSensitivity ();
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:33,代码来源:DiffWidget.cs


示例7: DiffView

		public DiffView (VersionControlDocumentInfo info, Revision baseRev, Revision toRev) : base (GettextCatalog.GetString ("Changes"))
		{
			this.info = info;
			widget = new DiffWidget (info);
			ComparisonWidget.SetRevision (ComparisonWidget.DiffEditor, baseRev);
			ComparisonWidget.SetRevision (ComparisonWidget.OriginalEditor, toRev);
			
			widget.ShowAll ();
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:9,代码来源:DiffView.cs


示例8: DiffWidget

		public DiffWidget (VersionControlDocumentInfo info, bool viewOnly)
		{
			this.info = info;
			this.Build ();
			comparisonWidget = new MonoDevelop.VersionControl.Views.ComparisonWidget (viewOnly);
			
			fixed1.SetSizeRequest (16, 16);
			this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext ();
			this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev ();
			notebook1.Page = 0;
			vboxComparisonView.PackStart (comparisonWidget, true, true, 0);
			comparisonWidget.Show ();
			
			comparisonWidget.DiffChanged += delegate {
				labelOverview.Markup = "<big>" + LabelText + "</big>";
				SetButtonSensitivity ();
			};
			comparisonWidget.SetVersionControlInfo (info);
			this.buttonDiff.Clicked += HandleButtonDiffhandleClicked;
			diffTextEditor = new global::Mono.TextEditor.TextEditor ();
			diffTextEditor.Document.MimeType = "text/x-diff";
			if (info.Document != null) {
				diffTextEditor.Options.FontName = info.Document.Editor.Options.FontName;
				diffTextEditor.Options.ColorScheme = info.Document.Editor.Options.ColorScheme;
				diffTextEditor.Options.ShowTabs = info.Document.Editor.Options.ShowTabs;
				diffTextEditor.Options.ShowSpaces = info.Document.Editor.Options.ShowSpaces;
				diffTextEditor.Options.ShowInvalidLines = info.Document.Editor.Options.ShowInvalidLines;
				diffTextEditor.Options.ShowInvalidLines = info.Document.Editor.Options.ShowInvalidLines;
			} else {
				var options = MonoDevelop.SourceEditor.DefaultSourceEditorOptions.Instance;
				diffTextEditor.Options.FontName = options.FontName;
				diffTextEditor.Options.ColorScheme = options.ColorScheme;
				diffTextEditor.Options.ShowTabs = options.ShowTabs;
				diffTextEditor.Options.ShowSpaces = options.ShowSpaces;
				diffTextEditor.Options.ShowInvalidLines = options.ShowInvalidLines;
				diffTextEditor.Options.ShowInvalidLines = options.ShowInvalidLines;
			}
			
			diffTextEditor.Options.ShowFoldMargin = false;
			diffTextEditor.Options.ShowIconMargin = false;
			diffTextEditor.Document.ReadOnly = true;
			scrolledwindow1.Child = diffTextEditor;
			diffTextEditor.Show ();
			SetButtonSensitivity ();
		}
开发者ID:silk,项目名称:monodevelop,代码行数:45,代码来源:DiffWidget.cs


示例9: Show

		public static void Show (VersionControlItemList items, Revision since)
		{
			foreach (VersionControlItem item in items) {
				if (!item.IsDirectory) {
					var document = IdeApp.Workbench.OpenDocument (item.Path, OpenDocumentOptions.Default | OpenDocumentOptions.OnlyInternalViewer);
					if (document != null) {
						DiffView.AttachViewContents (document, item);
						document.Window.SwitchView (document.Window.FindView (typeof(LogView)));
					} else {
						VersionControlDocumentInfo info = new VersionControlDocumentInfo (null, item, item.Repository);
						LogView logView = new LogView (info);
						info.Document = IdeApp.Workbench.OpenDocument (logView, true);
						logView.Selected ();
					}
				} else if (item.VersionInfo.CanLog) {
					new Worker (item.Repository, item.Path, item.IsDirectory, since).Start ();
				}
			}
		}
开发者ID:hduregger,项目名称:monodevelop,代码行数:19,代码来源:LogView.cs


示例10: LogView

		public LogView (string filepath, bool isDirectory, Revision [] history, Repository vc) 
			: base (Path.GetFileName (filepath) + " Log")
		{
			try {
				this.vinfo = vc.GetVersionInfo (filepath, VersionInfoQueryFlags.IgnoreCache);
			}
			catch (Exception ex) {
				MessageService.ShowError (GettextCatalog.GetString ("Version control command failed."), ex);
			}
			
			// Widget setup
			VersionControlDocumentInfo info  =new VersionControlDocumentInfo (null, null, vc);
			info.History = history;
			info.Item.VersionInfo = vinfo;
			var lw = new LogWidget (info);
			
			widget = lw;
			lw.History = history;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:19,代码来源:LogView.cs


示例11: Show

		public static bool Show (VersionControlItemList items, bool test)
		{
			if (test)
				return items.All (CanShow);
			
			foreach (var item in items) {
				var document = IdeApp.Workbench.OpenDocument (item.Path, OpenDocumentOptions.Default | OpenDocumentOptions.OnlyInternalViewer);
				if (document != null) {
					document.Window.SwitchView (document.Window.FindView<ILogView> ());
				} else {
					VersionControlDocumentInfo info = new VersionControlDocumentInfo (null, item, item.Repository);
					LogView logView = new LogView (info);
					info.Document = IdeApp.Workbench.OpenDocument (logView, true).PrimaryView;
					logView.Selected ();	
				}
			}
			
			return true;
		}
开发者ID:head-thrash,项目名称:monodevelop,代码行数:19,代码来源:LogCommand.cs


示例12: HandleDocumentChanged

		static void HandleDocumentChanged (object sender, EventArgs e)
		{
			var document = Ide.IdeApp.Workbench.ActiveDocument;
			try {
				if (document == null || !document.IsFile || document.Window.FindView<ILogView> () >= 0)
					return;

				WorkspaceObject project = document.Project;
				if (project == null) {
					// Fix for broken .csproj and .sln files not being seen as having a project.
					foreach (var projItem in Ide.IdeApp.Workspace.GetAllItems<UnknownSolutionItem> ()) {
						if (projItem.FileName == document.FileName) {
							project = projItem;
						}
					}

					if (project == null)
						return;
				}
				
				var repo = VersionControlService.GetRepository (project);
				if (repo == null)
					return;

				var versionInfo = repo.GetVersionInfo (document.FileName, VersionInfoQueryFlags.IgnoreCache);
				if (!versionInfo.IsVersioned)
					return;

				var item = new VersionControlItem (repo, project, document.FileName, false, null);
				var vcInfo = new VersionControlDocumentInfo (document.PrimaryView, item, item.Repository);
				TryAttachView (document, vcInfo, DiffCommand.DiffViewHandlers);
				TryAttachView (document, vcInfo, BlameCommand.BlameViewHandlers);
				TryAttachView (document, vcInfo, LogCommand.LogViewHandlers);
				TryAttachView (document, vcInfo, MergeCommand.MergeViewHandlers);
			} catch (Exception ex) {
				// If a user is hitting this, it will show a dialog box every time they
				// switch to a document or open a document, so suppress the crash dialog
				// This bug *should* be fixed already, but it's hard to tell.
				LoggingService.LogInternalError (ex);
			}
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:41,代码来源:SubviewAttachmentHandler.cs


示例13: Show

		public static async Task<bool> Show (VersionControlItemList items, bool test)
		{
			if (test)
				return items.All (CanShow);
			
			foreach (var item in items) {
				Document document = null;
				if (!item.IsDirectory)
					document = await IdeApp.Workbench.OpenDocument (item.Path, item.ContainerProject, OpenDocumentOptions.Default | OpenDocumentOptions.OnlyInternalViewer);

				if (document != null) {
					document.Window.SwitchView (document.Window.FindView<ILogView> ());
				} else {
					VersionControlDocumentInfo info = new VersionControlDocumentInfo (null, item, item.Repository);
					LogView logView = new LogView (info);
					info.Document = IdeApp.Workbench.OpenDocument (logView, true).PrimaryView;
					logView.Init ();
				}
			}
			
			return true;
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:22,代码来源:LogCommand.cs


示例14: LogWidget

		public LogWidget (VersionControlDocumentInfo info)
		{
			this.Build ();
			this.info = info;
			if (info.Document != null)
				this.preselectFile = info.Document.FileName;
			
			revertButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert changes from this revision"));
			revertButton.IsImportant = true;
//			revertButton.Sensitive = false;
			revertButton.Clicked += new EventHandler (RevertRevisionClicked);
			CommandBar.Insert (revertButton, -1);
			
			revertToButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert to this revision"));
			revertToButton.IsImportant = true;
//			revertToButton.Sensitive = false;
			revertToButton.Clicked += new EventHandler (RevertToRevisionClicked);
			CommandBar.Insert (revertToButton, -1);
			
			Gtk.ToolItem item = new Gtk.ToolItem ();
			Gtk.HBox a = new Gtk.HBox ();
			item.Add (a);
			searchEntry = new SearchEntry ();
			searchEntry.WidthRequest = 200;
			searchEntry.ForceFilterButtonVisible = true;
			searchEntry.EmptyMessage = GettextCatalog.GetString ("Search");
			searchEntry.Changed += HandleSearchEntryFilterChanged;
			searchEntry.Ready = true;
			searchEntry.Show ();
			a.PackEnd (searchEntry, false, false, 0);
			CommandBar.Insert (item, -1);
			((Gtk.Toolbar.ToolbarChild)CommandBar[item]).Expand = true;
			
			CommandBar.ShowAll ();
			
			messageRenderer.Ellipsize = Pango.EllipsizeMode.End;
			TreeViewColumn colRevMessage = new TreeViewColumn ();
			colRevMessage.Title = GettextCatalog.GetString ("Message");
			var graphRenderer = new RevisionGraphCellRenderer ();
			colRevMessage.PackStart (graphRenderer, false);
			colRevMessage.SetCellDataFunc (graphRenderer, GraphFunc);
			
			colRevMessage.PackStart (messageRenderer, true);
			colRevMessage.SetCellDataFunc (messageRenderer, MessageFunc);
			colRevMessage.Sizing = TreeViewColumnSizing.Autosize;
			
			treeviewLog.AppendColumn (colRevMessage);
			colRevMessage.MinWidth = 350;
			colRevMessage.Resizable = true;
			
			
			TreeViewColumn colRevDate = new TreeViewColumn (GettextCatalog.GetString ("Date"), textRenderer);
			colRevDate.SetCellDataFunc (textRenderer, DateFunc);
			colRevDate.Resizable = true;
			treeviewLog.AppendColumn (colRevDate);
			
			TreeViewColumn colRevAuthor = new TreeViewColumn ();
			colRevAuthor.Title = GettextCatalog.GetString ("Author");
			colRevAuthor.PackStart (pixRenderer, false);
			colRevAuthor.PackStart (textRenderer, true);
			colRevAuthor.SetCellDataFunc (textRenderer, AuthorFunc);
			colRevAuthor.SetCellDataFunc (pixRenderer, AuthorIconFunc);
			colRevAuthor.Resizable = true;
			treeviewLog.AppendColumn (colRevAuthor);

			TreeViewColumn colRevNum = new TreeViewColumn (GettextCatalog.GetString ("Revision"), textRenderer);
			colRevNum.SetCellDataFunc (textRenderer, RevisionFunc);
			colRevNum.Resizable = true;
			treeviewLog.AppendColumn (colRevNum);

			treeviewLog.Model = logstore;
			treeviewLog.Selection.Changed += TreeSelectionChanged;
			
			treeviewFiles = new FileTreeView ();
			treeviewFiles.DiffLineActivated += HandleTreeviewFilesDiffLineActivated;
			scrolledwindowFiles.Child = treeviewFiles;
			scrolledwindowFiles.ShowAll ();
			
			changedpathstore = new TreeStore (typeof(Gdk.Pixbuf), typeof (string), // icon/file name
				typeof(Gdk.Pixbuf), typeof (string), // icon/operation
				typeof (string), // path
				typeof (string), // revision path (invisible)
				typeof (string[]) // diff
				);
			
			TreeViewColumn colChangedFile = new TreeViewColumn ();
			var crp = new CellRendererPixbuf ();
			var crt = new CellRendererText ();
			colChangedFile.Title = GettextCatalog.GetString ("File");
			colChangedFile.PackStart (crp, false);
			colChangedFile.PackStart (crt, true);
			colChangedFile.AddAttribute (crp, "pixbuf", 2);
			colChangedFile.AddAttribute (crt, "text", 3);
			treeviewFiles.AppendColumn (colChangedFile);
			
			TreeViewColumn colOperation = new TreeViewColumn ();
			colOperation.Title = GettextCatalog.GetString ("Operation");
			colOperation.PackStart (crp, false);
			colOperation.PackStart (crt, true);
			colOperation.AddAttribute (crp, "pixbuf", 0);
//.........这里部分代码省略.........
开发者ID:okrmartin,项目名称:monodevelop,代码行数:101,代码来源:LogWidget.cs


示例15: ComparisonWidget

		public ComparisonWidget (VersionControlDocumentInfo info)
		{
			this.info = info;
			vAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
			vAdjustment.Changed += HandleAdjustmentChanged;
			leftVAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
			Connect (leftVAdjustment, vAdjustment);
			
			rightVAdjustment =  new Adjustment (0, 0, 0, 0, 0, 0);
			Connect (rightVAdjustment, vAdjustment);
			
			vScrollBar = new VScrollbar (vAdjustment);
			AddChild (vScrollBar);
			vScrollBar.Hide ();
			
			hAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
			hAdjustment.Changed += HandleAdjustmentChanged;
			leftHAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
			Connect (leftHAdjustment, hAdjustment);
			
			rightHAdjustment =  new Adjustment (0, 0, 0, 0, 0, 0);
			Connect (rightHAdjustment, hAdjustment);
			
			leftHScrollBar = new HScrollbar (hAdjustment);
			AddChild (leftHScrollBar);
			
			rightHScrollBar = new HScrollbar (hAdjustment);
			AddChild (rightHScrollBar);
			
			originalEditor = new TextEditor ();
			originalEditor.Caret.PositionChanged += CaretPositionChanged;
			originalEditor.FocusInEvent += EditorFocusIn;
			AddChild (originalEditor);
			originalEditor.SetScrollAdjustments (leftHAdjustment, leftVAdjustment);
			
			originalComboBox = new DropDownBox ();
			originalComboBox.WindowRequestFunc = CreateComboBoxSelector;
			originalComboBox.Text = "Local";
			originalComboBox.Tag = originalEditor;
			AddChild (originalComboBox);
			
			diffEditor = new TextEditor ();
			diffEditor.Caret.PositionChanged += CaretPositionChanged;
			diffEditor.FocusInEvent += EditorFocusIn;
			
			AddChild (diffEditor);
			diffEditor.Document.ReadOnly = true;
			diffEditor.SetScrollAdjustments (leftHAdjustment, leftVAdjustment);
			this.vAdjustment.ValueChanged += delegate {
				middleArea.QueueDraw ();
			};
			
			diffComboBox = new DropDownBox ();
			diffComboBox.WindowRequestFunc = CreateComboBoxSelector;
			diffComboBox.Text = "Base";
			diffComboBox.Tag = diffEditor;
			AddChild (diffComboBox);
			
			
			overview = new OverviewRenderer (this);
			AddChild (overview);
			
			middleArea = new MiddleArea (this);
			AddChild (middleArea);
			
			prev = new Button ();
			prev.Add (new Arrow (ArrowType.Up, ShadowType.None));
			AddChild (prev);
			prev.ShowAll ();
			prev.Clicked += delegate {
				if (this.Diff == null)
					return;
				originalEditor.GrabFocus ();
				
				int line = originalEditor.Caret.Line;
				int max  = -1, searched = -1;
				foreach (Diff.Hunk hunk in this.Diff) {
					if (hunk.Same)
						continue;
					max = System.Math.Max (hunk.Right.Start, max);
					if (hunk.Right.Start < line)
						searched = System.Math.Max (hunk.Right.Start, searched);
				}
				if (max >= 0) {
					originalEditor.Caret.Line = searched < 0 ? max : searched;
					originalEditor.CenterToCaret ();
				}
			};
			
			next = new Button ();
			next.BorderWidth = 0;
			next.Add (new Arrow (ArrowType.Down, ShadowType.None));
			next.Clicked += delegate {
				if (this.Diff == null)
					return;
				originalEditor.GrabFocus ();
				
				int line = originalEditor.Caret.Line;
				int min  = Int32.MaxValue, searched = Int32.MaxValue;
				foreach (Diff.Hunk hunk in this.Diff) {
//.........这里部分代码省略.........
开发者ID:acken,项目名称:monodevelop,代码行数:101,代码来源:ComparisonWidget.cs


示例16: CreateView

		public IBlameView CreateView (VersionControlDocumentInfo info)
		{
			return new BlameView (info);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:4,代码来源:DefaultBlameViewHandler.cs


示例17: DiffView

		public DiffView (VersionControlDocumentInfo info) : base ("Diff")
		{
			this.info = info;
		}
开发者ID:pgoron,项目名称:monodevelop,代码行数:4,代码来源:DiffView.cs


示例18: BlameWidget

		public BlameWidget (VersionControlDocumentInfo info)
		{
			GtkWorkarounds.FixContainerLeak (this);
			
			this.info = info;
			var sourceEditor = info.Document.GetContent<MonoDevelop.SourceEditor.SourceEditorView> ();
			
			vAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
			vAdjustment.Changed += HandleAdjustmentChanged;
			
			vScrollBar = new VScrollbar (vAdjustment);
			AddChild (vScrollBar);
			
			hAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
			hAdjustment.Changed += HandleAdjustmentChanged;

			hScrollBar = new HScrollbar (hAdjustment);
			AddChild (hScrollBar);
			
			editor = new TextEditor (sourceEditor.TextEditor.Document, sourceEditor.TextEditor.Options);
			AddChild (editor);
			editor.SetScrollAdjustments (hAdjustment, vAdjustment);
			
			overview = new BlameRenderer (this);
			AddChild (overview);
			
			this.DoubleBuffered = true;
			editor.Painted += HandleEditorExposeEvent;
			editor.EditorOptionsChanged += delegate {
				overview.OptionsChanged ();
			};
			editor.Caret.PositionChanged += ComparisonWidget.CaretPositionChanged;
			editor.FocusInEvent += ComparisonWidget.EditorFocusIn;
			editor.Document.Folded += delegate {
				QueueDraw ();
			};
			editor.Document.FoldTreeUpdated += delegate {
				QueueDraw ();
			};
			editor.DoPopupMenu = ShowPopup;
			Show ();
		}
开发者ID:halleyxu,项目名称:monodevelop,代码行数:42,代码来源:BlameWidget.cs


示例19: MergeView

		public MergeView (VersionControlDocumentInfo info) : base (GettextCatalog.GetString ("Merge"))
		{
			this.info = info;
		}
开发者ID:ZZHGit,项目名称:monodevelop,代码行数:4,代码来源:MergeView.cs


示例20: AttachViewContents

		public static void AttachViewContents (Document document, VersionControlItem item)
		{
			IWorkbenchWindow window = document.Window;
			if (window.SubViewContents.Any (sub => sub is DiffView))
				return;
			
			VersionControlDocumentInfo info = new VersionControlDocumentInfo (document, item);
			
			DiffView comparisonView = new DiffView (info);
			window.AttachViewContent (comparisonView);
//			window.AttachViewContent (new PatchView (comparisonView, info));
			window.AttachViewContent (new BlameView (info));
			window.AttachViewContent (new LogView (info));
			
			if (info.VersionInfo != null && info.VersionInfo.Status == VersionStatus.Conflicted)
				window.AttachViewContent (new MergeView (info));
		}
开发者ID:pgoron,项目名称:monodevelop,代码行数:17,代码来源:DiffView.cs



注:本文中的MonoDevelop.VersionControl.Views.VersionControlDocumentInfo类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# XmlEditor.XmlElementPath类代码示例发布时间:2022-05-26
下一篇:
C# Unix.LibSvnClient类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap