aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Rendering/VisualLineTextParagraphProperties.cs
blob: c97cd6b6c00583dc3110fc0b3af1dbf5a9293b83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)

using System;
using System.Windows;
using System.Windows.Media.TextFormatting;

namespace ICSharpCode.AvalonEdit.Rendering
{
	sealed class VisualLineTextParagraphProperties : TextParagraphProperties
	{
		internal TextRunProperties defaultTextRunProperties;
		internal TextWrapping textWrapping;
		internal double tabSize;
		internal double indent;
		internal bool firstLineInParagraph;
		
		public override double DefaultIncrementalTab {
			get { return tabSize; }
		}
		
		public override FlowDirection FlowDirection { get { return FlowDirection.LeftToRight; } }
		public override TextAlignment TextAlignment { get { return TextAlignment.Left; } }
		public override double LineHeight { get { return double.NaN; } }
		public override bool FirstLineInParagraph { get { return firstLineInParagraph; } }
		public override TextRunProperties DefaultTextRunProperties { get { return defaultTextRunProperties; } }
		public override TextWrapping TextWrapping { get { return textWrapping; } }
		public override TextMarkerProperties TextMarkerProperties { get { return null; } }
		public override double Indent { get { return indent; } }
	}
}
n>} #endregion #region Commands /// <summary> /// Gets or sets the save command. /// </summary> public RelayCommand SaveCommand { get; set; } /// <summary> /// Gets or sets the discard command. /// </summary> public RelayCommand DiscardCommand { get; set; } #endregion public MainViewVM() { SaveCommand = new RelayCommand(Save); DiscardCommand = new RelayCommand(Discard); } private void Discard() { NavigationManager.NavigateBack(); } private void Save() { Machine.SupportedJobTypes = SelectedJobTypes.SynchedSource.ToList(); Machine.ShallowCopyTo(MachineProvider.Machine); MachineProvider.Machine.SaveAsync(ObservablesEntitiesAdapter.Instance.Context); NavigationManager.NavigateBack(); RaiseMessage(new MachineSettingsSavedMessage() { Machine = MachineProvider.Machine }); } /// <summary> /// Called when the application has been started /// </summary> public override void OnApplicationStarted() { } public override void OnNavigatedTo() { base.OnNavigatedTo(); Machine = new Machine(); MachineProvider.Machine.ShallowCopyTo(Machine); RaisePropertyChanged(nameof(Machine)); SelectedJobTypes = new SelectedObjectCollection<JobTypes>(Enum.GetValues(typeof(JobTypes)).Cast<JobTypes>().ToObservableCollection(), Machine.SupportedJobTypes.ToObservableCollection()); } } }