aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-07 12:42:14 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-07 12:42:14 +0300
commite72e9dd78e3cb3bb97d3a846d0fe8db4f5a42c4d (patch)
treea1153f5b016853fdd12b8dd5fbe3aa113b39eef2 /Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
parentce34a07e9ae75c9172425322248dc2fd1754852e (diff)
downloadTango-e72e9dd78e3cb3bb97d3a846d0fe8db4f5a42c4d.tar.gz
Tango-e72e9dd78e3cb3bb97d3a846d0fe8db4f5a42c4d.zip
1. Top priority: When stopping job (stop button), the system cannot run again (notes it is still printing). Disconnectconnect solves
2. Dispenser manual control (tech bord) a. Add Color and name to the dispenser controller at the tech-bord b. Homing dosnt work on the tech-bord controller c. When moving the courser from the icon while still pushing and then removing the finger, the motor still running d. Limit sw are not activated in manual dispenser jogging 3. Read dispenser pressure manually separately for each dispenser 4. High priority: Dispenser pressure is presented in PSI (that’s what written..) ?? I am not sure that the formula is correct even for PSI.. 5. TI is calculated in the job by factor and not by min uptake (factor for TI is meaningless) 6. Top priority: TI dispensing amounts are constant: Changing TI amounts by factor did not change the total amount of dispensing (tested by flow sensor) 7. I would like to monitor (tech bord) the RPM or pulse rate of all possible motors (priority: thread system, dispensers, others) 8. I would like to monitor (tech bord) the status of the 3Wvalves of the dispensers (open / close) 9. Top priority: Cannot read head temperatures
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs')
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs21
1 files changed, 15 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
index e3575bfdc..bff778eec 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
@@ -22,7 +22,7 @@ namespace Tango.BL
/// </summary>
/// <param name="path">The server file path.</param>
/// <param name="isFile">if set to <c>true</c> will try to connect to an .mdf file.</param>
- public ObservablesContext(String path) : base(ComposeConnectionString(path))
+ public ObservablesContext(String path, String dbName) : base(ComposeConnectionString(path, dbName))
{
Database.SetInitializer<ObservablesContext>(null);
}
@@ -42,15 +42,15 @@ namespace Tango.BL
/// <param name="source">The source.</param>
/// <param name="isFile">if set to <c>true</c> [is file].</param>
/// <returns></returns>
- private static String ComposeConnectionString(String source)
+ private static String ComposeConnectionString(String source, String dbName)
{
if (!File.Exists(source))
{
- return String.Format("Data Source={0};Initial Catalog=Tango;Integrated Security=True;", source);
+ return String.Format("Data Source={0};Initial Catalog={1};Integrated Security=True;", source, dbName);
}
else
{
- return String.Format("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFileName={0};Initial Catalog=Tango;Integrated Security=True;MultipleActiveResultSets=True;App=EntityFramework", Path.GetFullPath(source));
+ return String.Format("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFileName={0};Initial Catalog={1};Integrated Security=True;MultipleActiveResultSets=True;App=EntityFramework", Path.GetFullPath(source), dbName);
}
}
@@ -65,7 +65,7 @@ namespace Tango.BL
}
/// <summary>
- /// Creates a default remote database context by the address specified in <see cref="SettingsManager.Default.DataBase.SQLServerAddress" />.
+ /// Creates a default remote database context.
/// </summary>
/// <returns></returns>
public static ObservablesContext CreateDefault(String dataSource)
@@ -83,11 +83,20 @@ namespace Tango.BL
}
else
{
- return new ObservablesContext(source);
+ return new ObservablesContext(source, "Tango");
}
}
/// <summary>
+ /// Creates a default remote database context.
+ /// </summary>
+ /// <returns></returns>
+ public static ObservablesContext CreateDefault(String address, String database)
+ {
+ return new ObservablesContext(address, database);
+ }
+
+ /// <summary>
/// Saves all changes made in this context to the underlying database.
/// </summary>
/// <returns>