├── .gitattributes ├── .gitignore ├── README.md ├── Scada.Controls ├── BlueEllipse.cs ├── DesignerItem.cs ├── Modifiers │ ├── Drag.cs │ ├── Resize.cs │ └── ResizeThumb.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Scada.Controls.csproj ├── Tank.xaml ├── Tank.xaml.cs └── Themes │ ├── DesignerItems.xaml │ └── Modifiers.xaml ├── scada.sln └── scada ├── App.config ├── App.xaml ├── App.xaml.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings └── scada.csproj /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | *.cs text diff=csharp 5 | *.java text diff=java 6 | *.html text diff=html 7 | *.css text 8 | *.js text 9 | *.sql text 10 | 11 | *.csproj text merge=union 12 | *.sln text merge=union eol=crlf 13 | 14 | *.docx diff=astextplain 15 | *.DOCX diff=astextplain -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Visual Studio 3 | ################# 4 | 5 | ## Ignore Visual Studio temporary files, build results, and 6 | ## files generated by popular Visual Studio add-ons. 7 | 8 | # User-specific files 9 | *.suo 10 | *.user 11 | *.sln.docstates 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Rr]elease/ 16 | *_i.c 17 | *_p.c 18 | *.ilk 19 | *.meta 20 | *.obj 21 | *.pch 22 | *.pdb 23 | *.pgc 24 | *.pgd 25 | *.rsp 26 | *.sbr 27 | *.tlb 28 | *.tli 29 | *.tlh 30 | *.tmp 31 | *.vspscc 32 | .builds 33 | *.dotCover 34 | 35 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 36 | #packages/ 37 | 38 | # Visual C++ cache files 39 | ipch/ 40 | *.aps 41 | *.ncb 42 | *.opensdf 43 | *.sdf 44 | 45 | # Visual Studio profiler 46 | *.psess 47 | *.vsp 48 | 49 | # ReSharper is a .NET coding add-in 50 | _ReSharper* 51 | 52 | # Installshield output folder 53 | [Ee]xpress 54 | 55 | # DocProject is a documentation generator add-in 56 | DocProject/buildhelp/ 57 | DocProject/Help/*.HxT 58 | DocProject/Help/*.HxC 59 | DocProject/Help/*.hhc 60 | DocProject/Help/*.hhk 61 | DocProject/Help/*.hhp 62 | DocProject/Help/Html2 63 | DocProject/Help/html 64 | 65 | # Click-Once directory 66 | publish 67 | 68 | # Others 69 | [Bb]in 70 | [Oo]bj 71 | sql 72 | TestResults 73 | *.Cache 74 | ClientBin 75 | stylecop.* 76 | ~$* 77 | *.dbmdl 78 | Generated_Code #added for RIA/Silverlight projects 79 | 80 | # Backup & report files from converting an old project file to a newer 81 | # Visual Studio version. Backup files are not needed, because we have git ;-) 82 | _UpgradeReport_Files/ 83 | Backup*/ 84 | UpgradeLog*.XML 85 | 86 | 87 | 88 | ############ 89 | ## Windows 90 | ############ 91 | 92 | # Windows image file caches 93 | Thumbs.db 94 | 95 | # Folder config file 96 | Desktop.ini 97 | 98 | 99 | ############# 100 | ## Python 101 | ############# 102 | 103 | *.py[co] 104 | 105 | # Packages 106 | *.egg 107 | *.egg-info 108 | dist 109 | build 110 | eggs 111 | parts 112 | bin 113 | var 114 | sdist 115 | develop-eggs 116 | .installed.cfg 117 | 118 | # Installer logs 119 | pip-log.txt 120 | 121 | # Unit test / coverage reports 122 | .coverage 123 | .tox 124 | 125 | #Translations 126 | *.mo 127 | 128 | #Mr Developer 129 | .mr.developer.cfg 130 | 131 | # Mac crap 132 | .DS_Store 133 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | scada 2 | ===== 3 | 4 | WPF Scada app -------------------------------------------------------------------------------- /Scada.Controls/BlueEllipse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | 8 | 9 | namespace Scada.Controls 10 | { 11 | public class BlueEllipse : DesignerItem 12 | { 13 | 14 | public BlueEllipse() 15 | { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Scada.Controls/DesignerItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Scada.Controls 17 | { 18 | /// 19 | /// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file. 20 | /// 21 | /// Step 1a) Using this custom control in a XAML file that exists in the current project. 22 | /// Add this XmlNamespace attribute to the root element of the markup file where it is 23 | /// to be used: 24 | /// 25 | /// xmlns:MyNamespace="clr-namespace:Scada.Controls" 26 | /// 27 | /// 28 | /// Step 1b) Using this custom control in a XAML file that exists in a different project. 29 | /// Add this XmlNamespace attribute to the root element of the markup file where it is 30 | /// to be used: 31 | /// 32 | /// xmlns:MyNamespace="clr-namespace:Scada.Controls;assembly=Scada.Controls" 33 | /// 34 | /// You will also need to add a project reference from the project where the XAML file lives 35 | /// to this project and Rebuild to avoid compilation errors: 36 | /// 37 | /// Right click on the target project in the Solution Explorer and 38 | /// "Add Reference"->"Projects"->[Select this project] 39 | /// 40 | /// 41 | /// Step 2) 42 | /// Go ahead and use your control in the XAML file. 43 | /// 44 | /// 45 | /// 46 | /// 47 | public class DesignerItem : Control 48 | { 49 | static DesignerItem() 50 | { 51 | DefaultStyleKeyProperty.OverrideMetadata(typeof(DesignerItem), new FrameworkPropertyMetadata(typeof(DesignerItem))); 52 | } 53 | 54 | public DesignerItem() 55 | { 56 | Height = 100; 57 | Width = 100; 58 | 59 | Canvas.SetTop(this, 100); 60 | Canvas.SetLeft(this, 100); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /Scada.Controls/Modifiers/Drag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Controls; 7 | using System.Windows.Controls.Primitives; 8 | 9 | namespace Scada.Controls.Modifiers 10 | { 11 | public class Drag : Thumb 12 | { 13 | 14 | /// 15 | /// Initializer for DragThumb 16 | /// 17 | public Drag() 18 | { 19 | IsEnabled = true; 20 | base.DragDelta += DragThumb_DragDelta; 21 | } 22 | 23 | void DragThumb_DragDelta(object sender, DragDeltaEventArgs e) 24 | { 25 | if (IsEnabled) 26 | { 27 | // Drag object here. 28 | Control item = this.DataContext as Control; 29 | 30 | if (item != null) 31 | { 32 | double left = Canvas.GetLeft(item); 33 | double top = Canvas.GetTop(item); 34 | 35 | Canvas.SetLeft(item, left + e.HorizontalChange); 36 | Canvas.SetTop(item, top + e.VerticalChange); 37 | } 38 | e.Handled = true; 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Scada.Controls/Modifiers/Resize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Controls; 7 | 8 | namespace Scada.Controls.Modifiers 9 | { 10 | public class Resize : Control 11 | { 12 | public Resize() 13 | { } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Scada.Controls/Modifiers/ResizeThumb.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Diagnostics; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Controls.Primitives; 10 | 11 | namespace Scada.Controls.Modifiers 12 | { 13 | public class ResizeThumb : Thumb 14 | { 15 | 16 | /// 17 | /// Initializer for ResizeThumb 18 | /// 19 | public ResizeThumb() 20 | { 21 | IsEnabled = true; 22 | DragDelta += ResizeThumb_DragDelta; 23 | } 24 | 25 | void ResizeThumb_DragDelta(object sender, DragDeltaEventArgs e) 26 | { 27 | if (IsEnabled) 28 | { 29 | Control item = this.DataContext as Control; 30 | 31 | if (item != null) 32 | { 33 | double deltaVertical, deltaHorizontal; 34 | 35 | switch (VerticalAlignment) 36 | { 37 | case VerticalAlignment.Bottom: 38 | deltaVertical = Math.Min(-e.VerticalChange, item.ActualHeight - item.MinHeight); 39 | item.Height -= deltaVertical; 40 | break; 41 | 42 | case VerticalAlignment.Top: 43 | deltaVertical = Math.Min(e.VerticalChange, item.ActualHeight - item.MinHeight); 44 | Canvas.SetTop(item, Canvas.GetTop(item) + deltaVertical); 45 | item.Height -= deltaVertical; 46 | break; 47 | 48 | default: 49 | break; 50 | } 51 | 52 | switch (HorizontalAlignment) 53 | { 54 | case HorizontalAlignment.Left: 55 | deltaHorizontal = Math.Min(e.HorizontalChange, item.ActualWidth - item.MinWidth); 56 | Canvas.SetLeft(item, Canvas.GetLeft(item) + deltaHorizontal); 57 | item.Width -= deltaHorizontal; 58 | break; 59 | case HorizontalAlignment.Right: 60 | deltaHorizontal = Math.Min(-e.HorizontalChange, item.ActualWidth - item.MinWidth); 61 | item.Width -= deltaHorizontal; 62 | break; 63 | default: 64 | break; 65 | } 66 | 67 | } 68 | e.Handled = true; 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Scada.Controls/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("Scada.Controls")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("Scada.Controls")] 15 | [assembly: AssemblyCopyright("Copyright © 2013")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly:ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /Scada.Controls/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18033 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Scada.Controls.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Scada.Controls.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Scada.Controls/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Scada.Controls/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18033 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Scada.Controls.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Scada.Controls/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Scada.Controls/Scada.Controls.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {6D8832B3-D4B6-4B34-9739-6E49CDF84A10} 8 | library 9 | Properties 10 | Scada.Controls 11 | Scada.Controls 12 | v4.5 13 | 512 14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 4 16 | 5.2.30810.0 17 | 18 | 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 4.0 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | Tank.xaml 53 | 54 | 55 | Designer 56 | MSBuild:Compile 57 | 58 | 59 | MSBuild:Compile 60 | Designer 61 | 62 | 63 | 64 | Code 65 | 66 | 67 | MSBuild:Compile 68 | Designer 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | Code 77 | 78 | 79 | True 80 | True 81 | Resources.resx 82 | 83 | 84 | True 85 | Settings.settings 86 | True 87 | 88 | 89 | ResXFileCodeGenerator 90 | Resources.Designer.cs 91 | 92 | 93 | SettingsSingleFileGenerator 94 | Settings.Designer.cs 95 | 96 | 97 | 98 | 99 | 106 | -------------------------------------------------------------------------------- /Scada.Controls/Tank.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Scada.Controls/Tank.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Scada.Controls 17 | { 18 | /// 19 | /// Interaction logic for RedEllipse.xaml 20 | /// 21 | public partial class Tank : UserControl 22 | { 23 | 24 | #region Properties 25 | /// 26 | /// Gets or sets the Background Brush for the tank. 27 | /// 28 | public Brush TankBackgroundColor 29 | { 30 | get { return TankDrawing.Fill; } 31 | set { TankDrawing.Fill = value; } 32 | } 33 | 34 | /// 35 | /// Gets or sets the Stroke Brush for the tank. 36 | /// 37 | public Brush TankStrokeColor 38 | { 39 | get { return TankDrawing.Stroke; } 40 | set { TankDrawing.Stroke = value; } 41 | } 42 | 43 | /// 44 | /// Gets or sets the StrokeThickness for the tank 45 | /// 46 | public double TankStrokeThickness 47 | { 48 | get { return TankDrawing.StrokeThickness; } 49 | set { TankDrawing.StrokeThickness = value; } 50 | } 51 | 52 | /// 53 | /// Indicates whether or not the TankGradient is visible; 54 | /// 55 | public bool IsTankGradientVisible 56 | { 57 | get { return TankGradient.IsVisible; } 58 | set { TankGradient.Visibility = value ? Visibility.Visible : Visibility.Collapsed;} 59 | } 60 | #endregion 61 | 62 | public Tank() 63 | { 64 | InitializeComponent(); 65 | Height = 300; 66 | Width = 250; 67 | Canvas.SetTop(this, 100); 68 | Canvas.SetLeft(this, 100); 69 | 70 | // Default Colors 71 | TankBackgroundColor = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FF797979")); 72 | TankStrokeColor = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FF1F1F1F")); 73 | TankStrokeThickness = 2.0; 74 | IsTankGradientVisible = true; 75 | 76 | TankFill.Minimum = 0; 77 | TankFill.Maximum = 100; 78 | TankFill.Value = 1; 79 | 80 | // Water - #FFE6E6E6 81 | // Oil - #FF1F1F1F 82 | } 83 | 84 | private void UserControl_MouseDoubleClick_1(object sender, MouseButtonEventArgs e) 85 | { 86 | if (TankFill.Value != 100) { TankFill.Value += TankFill.Maximum / 10; } else { TankFill.Value = 0; } 87 | System.Diagnostics.Debug.WriteLine(TankFill.Value); 88 | 89 | } 90 | 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Scada.Controls/Themes/DesignerItems.xaml: -------------------------------------------------------------------------------- 1 |  7 | 19 | 20 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Scada.Controls/Themes/Modifiers.xaml: -------------------------------------------------------------------------------- 1 |  6 | 15 | 16 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /scada.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scada", "scada\Scada.csproj", "{C1137016-F206-4BAC-9A3F-DB5CCF90EF28}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scada.Controls", "Scada.Controls\Scada.Controls.csproj", "{6D8832B3-D4B6-4B34-9739-6E49CDF84A10}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {C1137016-F206-4BAC-9A3F-DB5CCF90EF28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {C1137016-F206-4BAC-9A3F-DB5CCF90EF28}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {C1137016-F206-4BAC-9A3F-DB5CCF90EF28}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {C1137016-F206-4BAC-9A3F-DB5CCF90EF28}.Release|Any CPU.Build.0 = Release|Any CPU 18 | {6D8832B3-D4B6-4B34-9739-6E49CDF84A10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {6D8832B3-D4B6-4B34-9739-6E49CDF84A10}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {6D8832B3-D4B6-4B34-9739-6E49CDF84A10}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {6D8832B3-D4B6-4B34-9739-6E49CDF84A10}.Release|Any CPU.Build.0 = Release|Any CPU 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /scada/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /scada/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /scada/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace Scada 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /scada/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /scada/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | using Scada.Controls; 17 | 18 | namespace Scada 19 | { 20 | /// 21 | /// Interaction logic for MainWindow.xaml 22 | /// 23 | public partial class MainWindow : Window 24 | { 25 | public MainWindow() 26 | { 27 | InitializeComponent(); 28 | } 29 | 30 | private void NewSchematic_Click(object sender, RoutedEventArgs e) 31 | { 32 | Schematic.Children.Clear(); 33 | } 34 | 35 | private void mnuTank_Click(object sender, RoutedEventArgs e) 36 | { 37 | Schematic.Children.Add(new Tank()); 38 | } 39 | 40 | private void mnuBlueEllipse_Click(object sender, RoutedEventArgs e) 41 | { 42 | Schematic.Children.Add(new BlueEllipse()); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /scada/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("Scada")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("Scada")] 15 | [assembly: AssemblyCopyright("Copyright © 2013")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /scada/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18033 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Scada.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Scada.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /scada/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /scada/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18033 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Scada.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /scada/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /scada/scada.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C1137016-F206-4BAC-9A3F-DB5CCF90EF28} 8 | WinExe 9 | Properties 10 | Scada 11 | Scada 12 | v4.5 13 | 512 14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 4 16 | 5.2.30810.0 17 | 18 | 19 | AnyCPU 20 | true 21 | full 22 | false 23 | bin\Debug\ 24 | DEBUG;TRACE 25 | prompt 26 | 4 27 | 28 | 29 | AnyCPU 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 4.0 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | MSBuild:Compile 55 | Designer 56 | 57 | 58 | MSBuild:Compile 59 | Designer 60 | 61 | 62 | App.xaml 63 | Code 64 | 65 | 66 | MainWindow.xaml 67 | Code 68 | 69 | 70 | 71 | 72 | Code 73 | 74 | 75 | True 76 | True 77 | Resources.resx 78 | 79 | 80 | True 81 | Settings.settings 82 | True 83 | 84 | 85 | ResXFileCodeGenerator 86 | Resources.Designer.cs 87 | 88 | 89 | SettingsSingleFileGenerator 90 | Settings.Designer.cs 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | {6d8832b3-d4b6-4b34-9739-6e49cdf84a10} 100 | Scada.Controls 101 | 102 | 103 | 104 | 111 | --------------------------------------------------------------------------------