From 54802d8343dcb710ced4d009995a8cc796915039 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 24 Jun 2018 13:03:39 +0300 Subject: Added password encryption. Core version 1.0.0.1 Machine Studio version 1.0.0.4 Added forced update to machine studio versions db. Removed pubxml files from gitignore. Implemented a publish profile for machine studio update service. Worked on twine.local IIS & FTP !! :( Implemented virtual host names for publish and download (MS versions) FTP sites. --- .../Tango.BL/Entities/MachineStudioVersion.cs | 20 ++++++++++++++++++++ .../Tango.BL/ObservablesContextExtension.cs | 9 --------- 2 files changed, 20 insertions(+), 9 deletions(-) (limited to 'Software/Visual_Studio/Tango.BL') diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs index ccc6df2cb..63f6563ed 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs @@ -105,6 +105,26 @@ namespace Tango.BL.Entities } + protected Boolean _forceupdate; + /// + /// Gets or sets the machinestudioversion force update. + /// + [Column("FORCE_UPDATE")] + + public Boolean ForceUpdate + { + get + { + return _forceupdate; + } + + set + { + _forceupdate = value; RaisePropertyChanged(nameof(ForceUpdate)); + } + + } + protected User _user; /// /// Gets or sets the machinestudioversion user. diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs index 4c703a96b..8c0957e9a 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs @@ -80,14 +80,5 @@ namespace Tango.BL return new ObservablesContext(source); } } - - /// - /// Creates a default remote database context by the address specified in . - /// - /// - public static ObservablesContext CreateDefaultForWeb() - { - return new ObservablesContext("localhost\\SQLTWINE"); - } } } -- cgit v1.3.1 From 545f603c873cd026faf5560dae83da947f0a02a6 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 24 Jun 2018 18:39:34 +0300 Subject: Working on PPC!!!!!! --- Software/DB/PPC/Tango.mdf | Bin 0 -> 75497472 bytes Software/DB/Tango.db-journal | Bin 0 -> 16928 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 1572864 -> 1572864 bytes Software/Graphics/Mobile/large-cards-view.png | Bin 0 -> 306 bytes Software/Graphics/Mobile/large-cards-view@2x.png | Bin 0 -> 445 bytes Software/Graphics/Mobile/large-cards-view@3x.png | Bin 0 -> 668 bytes Software/Graphics/Mobile/small-cards-view.png | Bin 0 -> 370 bytes Software/Graphics/Mobile/small-cards-view@2x.png | Bin 0 -> 576 bytes Software/Graphics/Mobile/small-cards-view@3x.png | Bin 0 -> 805 bytes .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 100 +++++++++++++++++++++ .../PPC/Tango.PPC.Common/Resources/Merged.xaml | 1 + .../PPCApplication/DefaultPPCApplicationManager.cs | 4 +- .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 32 ++++++- .../Tango.BL/EntitiesExtensions/BrushStop.cs | 5 ++ .../Tango.BL/EntitiesExtensions/Segment.cs | 28 ++++++ .../Converters/SegmentToBrushConverter.cs | 48 ++++++++++ .../Converters/SegmentToBrushConverterMulti.cs | 53 +++++++++++ .../Tango.SharedUI/Tango.SharedUI.csproj | 6 ++ .../Tango.Touch/Controls/TouchComboBox.cs | 2 +- .../Tango.Touch/Controls/TouchTextBox.xaml | 4 +- .../Tango.Touch/Controls/TouchToggleIconButton.cs | 60 +++++++++++++ .../Controls/TouchToggleIconButton.xaml | 38 ++++++++ .../Visual_Studio/Tango.Touch/Tango.Touch.csproj | 5 ++ .../Visual_Studio/Tango.Touch/Themes/Generic.xaml | 1 + 25 files changed, 380 insertions(+), 7 deletions(-) create mode 100644 Software/DB/PPC/Tango.mdf create mode 100644 Software/DB/Tango.db-journal create mode 100644 Software/Graphics/Mobile/large-cards-view.png create mode 100644 Software/Graphics/Mobile/large-cards-view@2x.png create mode 100644 Software/Graphics/Mobile/large-cards-view@3x.png create mode 100644 Software/Graphics/Mobile/small-cards-view.png create mode 100644 Software/Graphics/Mobile/small-cards-view@2x.png create mode 100644 Software/Graphics/Mobile/small-cards-view@3x.png create mode 100644 Software/Visual_Studio/Tango.SharedUI/Converters/SegmentToBrushConverter.cs create mode 100644 Software/Visual_Studio/Tango.SharedUI/Converters/SegmentToBrushConverterMulti.cs create mode 100644 Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs create mode 100644 Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml (limited to 'Software/Visual_Studio/Tango.BL') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf new file mode 100644 index 000000000..73b7beea4 Binary files /dev/null and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/Tango.db-journal b/Software/DB/Tango.db-journal new file mode 100644 index 000000000..6f9622257 Binary files /dev/null and b/Software/DB/Tango.db-journal differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 650455a02..73b7beea4 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 31425db90..7e3784466 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Graphics/Mobile/large-cards-view.png b/Software/Graphics/Mobile/large-cards-view.png new file mode 100644 index 000000000..697ce228c Binary files /dev/null and b/Software/Graphics/Mobile/large-cards-view.png differ diff --git a/Software/Graphics/Mobile/large-cards-view@2x.png b/Software/Graphics/Mobile/large-cards-view@2x.png new file mode 100644 index 000000000..ee016ea09 Binary files /dev/null and b/Software/Graphics/Mobile/large-cards-view@2x.png differ diff --git a/Software/Graphics/Mobile/large-cards-view@3x.png b/Software/Graphics/Mobile/large-cards-view@3x.png new file mode 100644 index 000000000..ed65a5adf Binary files /dev/null and b/Software/Graphics/Mobile/large-cards-view@3x.png differ diff --git a/Software/Graphics/Mobile/small-cards-view.png b/Software/Graphics/Mobile/small-cards-view.png new file mode 100644 index 000000000..873b7513f Binary files /dev/null and b/Software/Graphics/Mobile/small-cards-view.png differ diff --git a/Software/Graphics/Mobile/small-cards-view@2x.png b/Software/Graphics/Mobile/small-cards-view@2x.png new file mode 100644 index 000000000..43ccd82aa Binary files /dev/null and b/Software/Graphics/Mobile/small-cards-view@2x.png differ diff --git a/Software/Graphics/Mobile/small-cards-view@3x.png b/Software/Graphics/Mobile/small-cards-view@3x.png new file mode 100644 index 000000000..a86e393af Binary files /dev/null and b/Software/Graphics/Mobile/small-cards-view@3x.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml index a7cc548dc..d66005016 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml @@ -9,6 +9,8 @@ xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch" xmlns:global="clr-namespace:Tango.PPC.Jobs" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:local="clr-namespace:Tango.PPC.Jobs.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}"> @@ -20,6 +22,11 @@ + + + @@ -108,6 +115,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Segment # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml index 37e2d8074..2629c6a14 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -25,6 +25,7 @@ + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs index 554bd704c..c8dc68291 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -118,12 +118,12 @@ namespace Tango.PPC.UI.PPCApplication // DataBaseSettings.DefaultDataSource = Path.Combine(PathHelper.GetUserTangoFolder(), "DB", "Tango.db"); //#endif - CoreSettings.DefaultDataBaseSource = Path.Combine(PathHelper.GetUserTangoFolder(), "DB", "Tango.db"); + CoreSettings.DefaultDataBaseSource = Path.Combine(PathHelper.GetUserTangoFolder(), "DB", "Tango.mdf"); if (!File.Exists(CoreSettings.DefaultDataBaseSource)) { Directory.CreateDirectory(Path.GetDirectoryName(CoreSettings.DefaultDataBaseSource)); - File.Copy(Path.Combine(PathHelper.GetStartupPath(), "DB", "Tango.db"), CoreSettings.DefaultDataBaseSource); + File.Copy(Path.Combine(PathHelper.GetStartupPath(), "DB", "Tango.mdf"), CoreSettings.DefaultDataBaseSource); } var settings = SettingsManager.Default.GetOrCreate(); ; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index d4c2bb037..c42924d2d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -15,6 +15,21 @@ true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true AnyCPU @@ -189,8 +204,8 @@ ResXFileCodeGenerator Resources.Designer.cs - - DB\Tango.db + + DB\Tango.mdf PreserveNewest @@ -278,7 +293,18 @@ - + + + False + Microsoft .NET Framework 4.6 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs index ad5781b7b..de887d8fe 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs @@ -204,6 +204,11 @@ namespace Tango.BL.Entities RaisePropertyChanged(prop.Name); } + if (Segment != null) + { + Segment.RaiseSegmentBrushChanged(); + } + _ignorePropChanged = false; } } diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs index 2c08cbf37..c4bbd0f65 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs @@ -61,6 +61,29 @@ namespace Tango.BL.Entities set { _completed = value; RaisePropertyChangedAuto(); } } + [NotMapped] + [JsonIgnore] + public Brush SegmentBrush + { + get + { + GradientStopCollection stops = new GradientStopCollection(); + + foreach (var stop in BrushStops.OrderBy(x => x.StopIndex)) + { + stops.Add(new GradientStop(stop.Color, stop.OffsetPercent / 100d)); + } + + LinearGradientBrush brush = new LinearGradientBrush(); + brush.StartPoint = new Point(0, 0); + brush.EndPoint = new Point(1, 0); + + brush.GradientStops = stops; + + return brush; + } + } + public override Segment Clone() { Segment cloned = base.Clone(); @@ -140,5 +163,10 @@ namespace Tango.BL.Entities return System.Drawing.Brushes.Black; } } + + public void RaiseSegmentBrushChanged() + { + RaisePropertyChanged(nameof(SegmentBrush)); + } } } diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/SegmentToBrushConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/SegmentToBrushConverter.cs new file mode 100644 index 000000000..60a79feb0 --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/SegmentToBrushConverter.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; +using System.Windows.Media; +using Tango.BL.Entities; + +namespace Tango.SharedUI.Converters +{ + public class SegmentToBrushConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + try + { + Segment segment = value as Segment; + + GradientStopCollection stops = new GradientStopCollection(); + + foreach (var stop in segment.BrushStops.OrderBy(x => x.StopIndex)) + { + stops.Add(new GradientStop(stop.Color, stop.OffsetPercent / 100d)); + } + + LinearGradientBrush brush = new LinearGradientBrush(); + brush.StartPoint = new Point(0,0); + brush.EndPoint = new Point(1, 0); + + brush.GradientStops = stops; + + return brush; + } + catch + { + return null; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/SegmentToBrushConverterMulti.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/SegmentToBrushConverterMulti.cs new file mode 100644 index 000000000..4b525b2d8 --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/SegmentToBrushConverterMulti.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; +using System.Windows.Media; +using Tango.BL.Entities; + +namespace Tango.SharedUI.Converters +{ + public class SegmentToBrushConverterMulti : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + Segment segment = values[0] as Segment; + + if (segment != null) + { + GradientStopCollection stops = new GradientStopCollection(); + + foreach (var stop in segment.BrushStops.OrderBy(x => x.StopIndex)) + { + stops.Add(new GradientStop(stop.Color, stop.OffsetPercent / 100d)); + } + + LinearGradientBrush brush = new LinearGradientBrush(); + brush.StartPoint = new Point(0, 0); + brush.EndPoint = new Point(1, 0); + + brush.GradientStops = stops; + + return brush; + } + + return null; + } + catch + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj index f877b327f..3795d9782 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj +++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj @@ -97,6 +97,8 @@ + + @@ -189,6 +191,10 @@ {6c55b776-26d4-4db3-a6ab-87e783b2f3d1} ICSharpCode.AvalonEdit + + {f441feee-322a-4943-b566-110e12fd3b72} + Tango.BL + {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} Tango.Core diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchComboBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchComboBox.cs index abe00a0a2..438d22272 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchComboBox.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchComboBox.cs @@ -38,7 +38,7 @@ namespace Tango.Touch.Controls set { SetValue(SelectedItemProperty, value); } } public static readonly DependencyProperty SelectedItemProperty = - DependencyProperty.Register("SelectedItem", typeof(object), typeof(TouchComboBox), new PropertyMetadata(null)); + DependencyProperty.Register("SelectedItem", typeof(object), typeof(TouchComboBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)); public IList ItemsSource { diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml index c463b5277..71624bb37 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml @@ -35,7 +35,9 @@ BorderThickness="{TemplateBinding BorderThickness}" keyboard:KeyboardView.Container="{TemplateBinding KeyboardContainer}"> + + @@ -99,7 +101,7 @@ - + diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs new file mode 100644 index 000000000..8deb6b527 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs @@ -0,0 +1,60 @@ +using FontAwesome.WPF; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.Touch.Controls +{ + public class TouchToggleIconButton : ToggleButton + { + static TouchToggleIconButton() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchToggleIconButton), new FrameworkPropertyMetadata(typeof(TouchToggleIconButton))); + } + + public FontAwesomeIcon Icon + { + get { return (FontAwesomeIcon)GetValue(IconProperty); } + set { SetValue(IconProperty, value); } + } + public static readonly DependencyProperty IconProperty = + DependencyProperty.Register("Icon", typeof(FontAwesomeIcon), typeof(TouchToggleIconButton), new PropertyMetadata(FontAwesomeIcon.Check)); + + public FontAwesomeIcon CheckedIcon + { + get { return (FontAwesomeIcon)GetValue(CheckedIconProperty); } + set { SetValue(CheckedIconProperty, value); } + } + public static readonly DependencyProperty CheckedIconProperty = + DependencyProperty.Register("CheckedIcon", typeof(FontAwesomeIcon), typeof(TouchToggleIconButton), new PropertyMetadata(FontAwesomeIcon.Close)); + + public Brush CheckedForeground + { + get { return (Brush)GetValue(CheckedForegroundProperty); } + set { SetValue(CheckedForegroundProperty, value); } + } + public static readonly DependencyProperty CheckedForegroundProperty = + DependencyProperty.Register("CheckedForeground", typeof(Brush), typeof(TouchToggleIconButton), new PropertyMetadata(null)); + + public CornerRadius CornerRadius + { + get { return (CornerRadius)GetValue(CornerRadiusProperty); } + set { SetValue(CornerRadiusProperty, value); } + } + public static readonly DependencyProperty CornerRadiusProperty = + DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(TouchToggleIconButton), new PropertyMetadata(default(CornerRadius))); + + } +} diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml new file mode 100644 index 000000000..61d2f0ca7 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj index ebbcf650c..9f393898a 100644 --- a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj +++ b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj @@ -71,6 +71,7 @@ + @@ -162,6 +163,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml index 58b13bb8e..f987a0584 100644 --- a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml +++ b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml @@ -30,6 +30,7 @@ + -- cgit v1.3.1