Compare commits

..

No commits in common. "a2c35ac9a52f8c85aff89fd2aa0f9bdc6de7a89f" and "9084fa4381d639e7b794603c94058c886b573bf7" have entirely different histories.

44 changed files with 3626 additions and 5165 deletions

View File

@ -402,34 +402,6 @@ namespace AppServer
} }
private string get_radio_type()
{
string radio_type = string.Empty;
// if radio_type isn't saved in db => check folder's name
System.IO.DirectoryInfo myDirectory = new DirectoryInfo(Environment.CurrentDirectory);
// get parent directory
string parentDirectory = myDirectory.Parent.FullName;
DirectoryInfo dInfo = new DirectoryInfo(parentDirectory);
DirectoryInfo[] subdirs = dInfo.GetDirectories();
foreach (DirectoryInfo folder in subdirs)
{
if (folder.Name == "Gateway") { radio_type = ((int)RADIOTYPE.MOTO).ToString(); break; }
else if (folder.Name == "Hytera") { radio_type = ((int)RADIOTYPE.HYT).ToString(); break; }
else if (folder.Name == "Momentum") { radio_type = ((int)RADIOTYPE.HARRIS).ToString(); break; }
else if (folder.Name == "Astro") { radio_type = ((int)RADIOTYPE.ATLAS).ToString(); break; }
else if (folder.Name == "Tetra") { radio_type = ((int)RADIOTYPE.TETRA).ToString(); break; }
else if (folder.Name == "Connect Plus") { radio_type = ((int)RADIOTYPE.CONECTPLUS).ToString(); break; }
else if (folder.Name == "Repeater_Gateway") { radio_type = ((int)RADIOTYPE.REPEATER_TRBO).ToString(); break; }
else if (folder.Name == "SMC_Gateway") { radio_type = ((int)RADIOTYPE.MOTO).ToString(); break; }
else if (folder.Name == "Simoco") { radio_type = ((int)RADIOTYPE.SIMOCO).ToString(); break; }
else if (folder.Name == "Sepura3T_SDR") { radio_type = ((int)RADIOTYPE.LISF).ToString(); break; }
}
return radio_type;
}
/// <summary> /// <summary>
/// Update the UI licenses circular controllers. This will read the dongle licenses /// Update the UI licenses circular controllers. This will read the dongle licenses
/// and the ones from the DB and the display them in the UI. /// and the ones from the DB and the display them in the UI.
@ -437,26 +409,40 @@ namespace AppServer
private void UpdateLicensesUI() private void UpdateLicensesUI()
{ {
Version v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; Version v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
String[] appname = this.Text.Split(" ".ToCharArray()); String[] appname = this.Text.Split(' ');
this.Text = appname[0] + " " + v.ToString(); this.Text = appname[0] + " " + v.ToString();
lbVersion.Text = "Version " + v.ToString(); lbVersion.Text = "Version " + v.ToString();
//check radio type from database to set job ticketing to visible //check radio type from database to set job ticketing to visible
if (Program.cfg == null) if (Program.cfg == null)
return; return;
radioTypeManager = new DBRadioTypeManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port); radioTypeManager = new DBRadioTypeManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port);
dbSettings = new DBsettingsManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port); dbSettings = new DBsettingsManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port);
string radio_type = radioTypeManager.getRadioType(); string radio_type = radioTypeManager.getRadioType();
if(radio_type == "") if(radio_type == "")
{ {
// if radio_type isn't saved in db => check folder's name
radio_type = get_radio_type(); System.IO.DirectoryInfo myDirectory = new DirectoryInfo(Environment.CurrentDirectory);
// get parent directory
string parentDirectory = myDirectory.Parent.FullName;
DirectoryInfo dInfo = new DirectoryInfo(parentDirectory);
DirectoryInfo[] subdirs = dInfo.GetDirectories();
foreach(DirectoryInfo folder in subdirs)
{
if (folder.Name == "Gateway") { radio_type = ((int)RADIOTYPE.MOTO).ToString(); break; }
else if (folder.Name == "Hytera") { radio_type = ((int)RADIOTYPE.HYT).ToString(); break; }
else if (folder.Name == "Momentum") { radio_type = ((int)RADIOTYPE.HARRIS).ToString(); break; }
else if (folder.Name == "Astro") { radio_type = ((int)RADIOTYPE.ATLAS).ToString(); break; }
else if (folder.Name == "Tetra") { radio_type = ((int)RADIOTYPE.TETRA).ToString(); break; }
else if (folder.Name == "Connect Plus") { radio_type = ((int)RADIOTYPE.CONECTPLUS).ToString(); break; }
else if (folder.Name == "Repeater_Gateway") { radio_type = ((int)RADIOTYPE.REPEATER_TRBO).ToString(); break; }
else if (folder.Name == "SMC_Gateway") { radio_type = ((int)RADIOTYPE.MOTO).ToString(); break; }
else if (folder.Name == "Simoco") { radio_type = ((int)RADIOTYPE.SIMOCO).ToString(); break; }
else if (folder.Name == "Sepura3T_SDR") { radio_type = ((int)RADIOTYPE.LISF).ToString(); break; }
}
//save radiotype in db //save radiotype in db
radioTypeManager.setRadioType(radio_type); radioTypeManager.setRadioType(radio_type);
} }
if (radio_type != "") if (radio_type != "")
RadioType = (RADIOTYPE)Enum.Parse(typeof(RADIOTYPE), radio_type); RadioType = (RADIOTYPE)Enum.Parse(typeof(RADIOTYPE), radio_type);
@ -465,18 +451,31 @@ namespace AppServer
= (RadioType == RADIOTYPE.MOTO || RadioType == RADIOTYPE.REPEATER_TRBO || RadioType == RADIOTYPE.HYT || RadioType == RADIOTYPE.HARRIS); = (RadioType == RADIOTYPE.MOTO || RadioType == RADIOTYPE.REPEATER_TRBO || RadioType == RADIOTYPE.HYT || RadioType == RADIOTYPE.HARRIS);
circularSDM.Visible = pbSDM.Visible = labelSDM.Visible = lbLicSDM.Visible = (RadioType == RADIOTYPE.SIMOCO); circularSDM.Visible = pbSDM.Visible = labelSDM.Visible = lbLicSDM.Visible = (RadioType == RADIOTYPE.SIMOCO);
// change logo icon depending on the system type // change logo icon depending on the system type
pbLogo.Image = (RadioType == RADIOTYPE.SIMOCO) ? AppServer.Properties.Resources.simoco : if (RadioType == RADIOTYPE.SIMOCO)
AppServer.Properties.Resources.safemobile; {
pbLogo.Image = AppServer.Properties.Resources.simoco;
}
else
{
pbLogo.Image = AppServer.Properties.Resources.safemobile;
}
if (error) if (error)
{ {
if (regLib.demoMode) if (regLib.demoMode)
{ {
lbRegistrationStatus.Text = (regLib.remainingTime() == 1) ? "Demo invalidated, please contact " + Program.COMPANY : "Demo registration expired"; ; if (regLib.remainingTime() == 1)
lbRegistrationStatus.ForeColor = Color.DarkRed; {
lbRegistrationStatus.Text = "Demo invalidated, please contact " + Program.COMPANY;
lbRegistrationStatus.ForeColor = Color.DarkRed;
}
else
{
lbRegistrationStatus.Text = "Demo registration expired";
lbRegistrationStatus.ForeColor = Color.DarkRed;
}
} }
} }
else else
@ -487,11 +486,9 @@ namespace AppServer
lbRegistrationStatus.Text = "trial ends in " + (regLib.remainingTime() / 86400).ToString() + " days "; lbRegistrationStatus.Text = "trial ends in " + (regLib.remainingTime() / 86400).ToString() + " days ";
lbRegistrationStatus.ForeColor = Color.Yellow; lbRegistrationStatus.ForeColor = Color.Yellow;
} }
regManager = new DBregistrationManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port); regManager = new DBregistrationManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port);
vehManager = new DBvehiclesManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port); vehManager = new DBvehiclesManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port);
dbsub = new DBsubsOperationManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port); dbsub = new DBsubsOperationManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port);
uint gpsCount = regManager.getGPSCount(); uint gpsCount = regManager.getGPSCount();
uint smsCount = regManager.getSMSCount(); uint smsCount = regManager.getSMSCount();
uint reportsCount = regManager.getReportsCount(); uint reportsCount = regManager.getReportsCount();
@ -647,7 +644,6 @@ namespace AppServer
regManager.resetSafeDispatchRegistrations(); regManager.resetSafeDispatchRegistrations();
lbRegistrationRemaining.Text = "Database licenses reset"; lbRegistrationRemaining.Text = "Database licenses reset";
} }
if(gatewaysCount > regLib.gatewayCount()) if(gatewaysCount > regLib.gatewayCount())
regManager.removeAllGatewayRegistrations(); regManager.removeAllGatewayRegistrations();
@ -1001,7 +997,6 @@ namespace AppServer
try try
{ {
DB.InitConnection(); DB.InitConnection();
DB.CloseConnection();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -1201,19 +1196,15 @@ namespace AppServer
private void BroadcastWebSocketStatusOnMessageBus(object source, ElapsedEventArgs e) private void BroadcastWebSocketStatusOnMessageBus(object source, ElapsedEventArgs e)
{ {
//string message; //$"#0.0#{failoverStatusToMessBuss}#{configHelper.PCIp}#{msg}#{master}#"; string message; //$"#0.0#{failoverStatusToMessBuss}#{configHelper.PCIp}#{msg}#{master}#";
string status = "offline"; string status = WebsocketThread.Instance.getClient().IsRunning ? "online" : "offline";
IWebsocketClient iWebsocketClient = WebsocketThread.Instance.getClient();
if( iWebsocketClient != null)
status = iWebsocketClient.IsRunning ? "online" : "offline";
string message = $"#0.0#{Utils.enumConvertToString(MessageBusCmds.WebsocketStatusToMsgBus)}#{status}#"; message = $"#0.0#{Utils.enumConvertToString(MessageBusCmds.WebsocketStatusToMsgBus)}#{status}#";
byte[] dataToSend = Utils.Convert_text_For_multicast(message); byte[] dataToSend = Utils.Convert_text_For_multicast(message);
if(dataToSend != null && dataToSend.Length > 0) udp.Send(dataToSend, dataToSend.Length);
udp.Send(dataToSend, dataToSend.Length);
} }

View File

@ -1721,7 +1721,6 @@ namespace AppServer
UserList.Add(obj.Id, obj.UserName); UserList.Add(obj.Id, obj.UserName);
} }
// gateways
GatewayListTMP = dbgate.getAllGateways(); GatewayListTMP = dbgate.getAllGateways();
GatewayList.Clear(); GatewayList.Clear();
foreach (Gateway obj in GatewayListTMP) foreach (Gateway obj in GatewayListTMP)
@ -1733,7 +1732,6 @@ namespace AppServer
GatewayList.Add(obj.Id, (obj.Peer_id > 0)); GatewayList.Add(obj.Id, (obj.Peer_id > 0));
} }
// vehicles
VehicleListTMP = dbveh.getAllVehicles(); VehicleListTMP = dbveh.getAllVehicles();
VehicleList.Clear(); VehicleList.Clear();
foreach (Vehicles obj in VehicleListTMP) foreach (Vehicles obj in VehicleListTMP)
@ -2005,22 +2003,20 @@ namespace AppServer
{ {
Vehicle_Data vehicle_Data = (Vehicle_Data)VehListTMP[obj]; Vehicle_Data vehicle_Data = (Vehicle_Data)VehListTMP[obj];
// populate Zone list
ArrayList tmparr = new ArrayList(); ArrayList tmparr = new ArrayList();
foreach (ZoneClass obj2 in ZoneListTMP) foreach (ZoneClass obj2 in ZoneListTMP)
{ {
tmparr.Add(new ZoneClass(obj2, obj2.id, obj2.arrSc_id)); ZoneClass tmp = new ZoneClass(obj2, obj2.id, obj2.arrSc_id);
tmparr.Add(tmp);
} }
vehicle_Data.zonelist = tmparr; vehicle_Data.zonelist = tmparr;
// populate Landmark list
ArrayList tmparr2 = new ArrayList(); ArrayList tmparr2 = new ArrayList();
foreach (LandMark obj2 in LandListTMP) foreach (LandMark obj2 in LandListTMP)
{ {
tmparr2.Add(new LandMark(obj2.name, obj2.lat, obj2.lng, obj2.land_id, obj2.useridx, obj2.callout, obj2.calloutSeverity)); LandMark tmp = new LandMark(obj2.name, obj2.lat, obj2.lng, obj2.land_id, obj2.useridx, obj2.callout, obj2.calloutSeverity);
tmparr2.Add(tmp);
} }
vehicle_Data.landlist = tmparr2; vehicle_Data.landlist = tmparr2;
} }
@ -2042,9 +2038,11 @@ namespace AppServer
MainForm.VehList.Clear(); MainForm.VehList.Clear();
// move from TMP used List // move from TMP used List
ZoneList.AddRange(ZoneListTMP); foreach (ZoneClass obj in ZoneListTMP)
LandList.AddRange(LandListTMP); ZoneList.Add(obj);
foreach (LandMark obj in LandListTMP)
LandList.Add(obj);
foreach (String obj in VehListTMP.Keys) foreach (String obj in VehListTMP.Keys)
{ {
@ -2112,8 +2110,8 @@ namespace AppServer
{ {
try try
{ {
//DB = new DBmanager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port); DB = new DBmanager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port);
//DB.InitConnection(); DB.InitConnection();
//load vehs for stolen test //load vehs for stolen test
dbvehs = new DBvehiclesManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port); dbvehs = new DBvehiclesManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port);
dbsubsoperManage = new DBsubsOperationManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port); dbsubsoperManage = new DBsubsOperationManager(Program.cfg.DB_IP, Program.cfg.DB_schema, Program.cfg.DB_user, Program.cfg.DB_passwd, Program.cfg.DB_port);

View File

@ -247,11 +247,18 @@ namespace RegLibDLL
return true; return true;
#else #else
int ret = SDX_Find(); int ret = SDX_Find();
if (ret >= 1) if (ret > 1)
{
return true; return true;
}
return false; else if (ret == 1)
{
return true;
}
else
{
return false;
}
#endif #endif
} }
@ -262,8 +269,9 @@ namespace RegLibDLL
#else #else
int ret = SDX_Open(1, uid, ref hid); int ret = SDX_Open(1, uid, ref hid);
if (ret < 0) if (ret < 0)
{
return false; return false;
}
handle = ret; handle = ret;
return true; return true;
#endif #endif
@ -274,8 +282,9 @@ namespace RegLibDLL
Byte[] retbuff = new byte[512]; Byte[] retbuff = new byte[512];
int ret = SDX_Read(handle, blockNumber, retbuff); int ret = SDX_Read(handle, blockNumber, retbuff);
if (ret < 0) if (ret < 0)
{
return ""; return "";
}
String sReturn = System.Text.ASCIIEncoding.ASCII.GetString(retbuff); String sReturn = System.Text.ASCIIEncoding.ASCII.GetString(retbuff);
return sReturn; return sReturn;
} }
@ -284,8 +293,9 @@ namespace RegLibDLL
{ {
int ret = SDX_Write(handle, blockIndex, dataToWrite); int ret = SDX_Write(handle, blockIndex, dataToWrite);
if (ret < 0) if (ret < 0)
{
return -1; return -1;
}
return 0; return 0;
} }
private String DecryptString(string Message, string Passphrase) private String DecryptString(string Message, string Passphrase)
@ -346,11 +356,13 @@ namespace RegLibDLL
return true; return true;
#else #else
if (existsDongle) if (existsDongle)
{
return true; return true;
}
else
return false; {
return false;
}
#endif #endif
} }
@ -364,10 +376,13 @@ namespace RegLibDLL
return true; return true;
#else #else
if (validDongle) if (validDongle)
{
return true; return true;
}
return false; else
{
return false;
}
#endif #endif
} }
@ -382,8 +397,10 @@ namespace RegLibDLL
Int32 length = Convert.ToInt32(decodedMessage.Substring(10, 3)); Int32 length = Convert.ToInt32(decodedMessage.Substring(10, 3));
return decodedMessage.Substring(13, length); return decodedMessage.Substring(13, length);
} }
else
return null; {
return null;
}
} }
/// <summary> /// <summary>
@ -397,8 +414,10 @@ namespace RegLibDLL
Int32 length = Convert.ToInt32(decodedMessage.Substring(35, 3)); Int32 length = Convert.ToInt32(decodedMessage.Substring(35, 3));
return decodedMessage.Substring(38, length); return decodedMessage.Substring(38, length);
} }
else
return null; {
return null;
}
} }
/// <summary> /// <summary>
@ -412,8 +431,10 @@ namespace RegLibDLL
Int32 length = Convert.ToInt32(decodedMessage.Substring(85, 3)); Int32 length = Convert.ToInt32(decodedMessage.Substring(85, 3));
return decodedMessage.Substring(88, length); return decodedMessage.Substring(88, length);
} }
else
return null; {
return null;
}
} }
/// <summary> /// <summary>
@ -427,9 +448,10 @@ namespace RegLibDLL
Int32 length = Convert.ToInt32(decodedMessage.Substring(195, 3)); Int32 length = Convert.ToInt32(decodedMessage.Substring(195, 3));
return decodedMessage.Substring(198, length); return decodedMessage.Substring(198, length);
} }
else
return null; {
return null;
}
} }
/// <summary> /// <summary>
@ -442,13 +464,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[zonesIndex]); return ((int)decodedMessage[zonesIndex]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -462,13 +488,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[gpsIndex]); return ((int)decodedMessage[gpsIndex]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -482,13 +512,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[smsIndex]); return ((int)decodedMessage[smsIndex]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -502,13 +536,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[jobTicketingIndex]); return ((int)decodedMessage[jobTicketingIndex]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -522,13 +560,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[recordingsIndex]); return ((int)decodedMessage[recordingsIndex]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -539,13 +581,17 @@ namespace RegLibDLL
public int voiceCount() public int voiceCount()
{ {
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[voiceIndex]); return ((int)decodedMessage[voiceIndex]);
}
return 0; else
{
return 0;
}
} }
/// <summary> /// <summary>
@ -555,14 +601,17 @@ namespace RegLibDLL
public int audibleAlertsCount() public int audibleAlertsCount()
{ {
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[audibleAlertsIndex]); return ((int)decodedMessage[audibleAlertsIndex]);
}
else
return 0; {
return 0;
}
} }
/// <summary> /// <summary>
@ -572,14 +621,17 @@ namespace RegLibDLL
public int dbAccessCount() public int dbAccessCount()
{ {
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[dbAccessIndex]); return ((int)decodedMessage[dbAccessIndex]);
}
else
return 0; {
return 0;
}
} }
/// <summary> /// <summary>
@ -592,14 +644,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[emailGatewayIndex]); return ((int)decodedMessage[emailGatewayIndex]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -613,13 +668,13 @@ namespace RegLibDLL
return 45; return 45;
#else #else
if (demoMode) if (demoMode)
{
return 12; //10 return 12; //10
}
if (oldDongle) if (oldDongle)
{
return 12; //10 return 12; //10
}
int numberOfUnits = 0; int numberOfUnits = 0;
if (validDongle) if (validDongle)
{ {
@ -632,9 +687,10 @@ namespace RegLibDLL
} }
else return numberOfUnits; else return numberOfUnits;
} }
else
return 0; {
return 0;
}
#endif #endif
} }
@ -648,13 +704,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[reportsIndex]); return ((int)decodedMessage[reportsIndex]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -668,13 +728,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[telemetryIndex]); return ((int)decodedMessage[telemetryIndex]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -688,13 +752,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[mapType1Index]); return ((int)decodedMessage[mapType1Index]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -708,14 +776,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[mapType2Index]); return ((int)decodedMessage[mapType2Index]);
}
else
return 0; {
return 0;
}
#endif #endif
} }
@ -729,15 +800,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[mapType3Index]); return ((int)decodedMessage[mapType3Index]);
}
else
return 0; {
return 0;
}
#endif #endif
} }
@ -751,15 +824,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[mapType4Index]); return ((int)decodedMessage[mapType4Index]);
}
else
return 0; {
return 0;
}
#endif #endif
} }
@ -773,14 +848,17 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[safeDispatchIndex]); return ((int)decodedMessage[safeDispatchIndex]);
}
else
return 0; {
return 0;
}
#endif #endif
} }
@ -794,14 +872,24 @@ namespace RegLibDLL
return true; return true;
#else #else
if (demoMode) if (demoMode)
{
return true; return true;
}
if (validDongle) if (validDongle)
return (decodedMessage[342].CompareTo('y') == 0); {
if (decodedMessage[342].CompareTo('y') == 0)
return false; {
return true;
}
else
{
return false;
}
}
else
{
return false;
}
#endif #endif
} }
@ -815,7 +903,9 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
/*if (enabledGateway()) /*if (enabledGateway())
{ {
oldDongle = true; oldDongle = true;
@ -823,11 +913,13 @@ namespace RegLibDLL
} }
oldDongle = false;*/ oldDongle = false;*/
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[gatewayIndex]); return ((int)decodedMessage[gatewayIndex]);
}
else
return 0; {
return 0;
}
#endif #endif
} }
@ -841,7 +933,9 @@ namespace RegLibDLL
return 2; return 2;
#else #else
if (demoMode) if (demoMode)
{
return 1; return 1;
}
/*if (enabledGateway()) /*if (enabledGateway())
{ {
oldDongle = true; oldDongle = true;
@ -849,10 +943,13 @@ namespace RegLibDLL
} }
oldDongle = false;*/ oldDongle = false;*/
if (validDongle) if (validDongle)
{
return ((int)decodedMessage[SDMobileIndex]); return ((int)decodedMessage[SDMobileIndex]);
}
return 0; else
{
return 0;
}
#endif #endif
} }
@ -866,18 +963,26 @@ namespace RegLibDLL
return true; return true;
#else #else
if (demoMode) if (demoMode)
{
return true; return true;
}
if (validDongle) if (validDongle)
{ {
Int32 length = Convert.ToInt32(decodedMessage.Substring(320, 3)); Int32 length = Convert.ToInt32(decodedMessage.Substring(320, 3));
String HID_READ = decodedMessage.Substring(323, length); String HID_READ = decodedMessage.Substring(323, length);
return (HID_READ.CompareTo(hid.ToString()) == 0); if (HID_READ.CompareTo(hid.ToString()) == 0)
{
return true;
}
else
{
return false;
}
}
else
{
return false;
} }
return false;
#endif #endif
} }

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("8.1.0.10898")] [assembly: AssemblyVersion("8.0.0.10885")]
[assembly: AssemblyFileVersion("8.1.0.10898")] [assembly: AssemblyFileVersion("8.0.0.10885")]

View File

@ -1,10 +0,0 @@
// Generated on Wed, Jun 5, 2024 11:58:38 AM by prebuild script
namespace SafeDispatch-git
{
public class VersionInfo
{
public string Version{ get; set; } = "8.1.0.10898-4-g9084fa4";
}
}

View File

@ -1,491 +0,0 @@
namespace ReportsLibrary
{
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;
partial class BatchHistoryReport
{
#region Component Designer generated code
/// <summary>
/// Required method for telerik Reporting designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
Telerik.Reporting.GraphGroup graphGroup1 = new Telerik.Reporting.GraphGroup();
Telerik.Reporting.GraphTitle graphTitle1 = new Telerik.Reporting.GraphTitle();
Telerik.Reporting.NumericalScale numericalScale1 = new Telerik.Reporting.NumericalScale();
Telerik.Reporting.CategoryScale categoryScale1 = new Telerik.Reporting.CategoryScale();
Telerik.Reporting.GraphGroup graphGroup2 = new Telerik.Reporting.GraphGroup();
Telerik.Reporting.Group group1 = new Telerik.Reporting.Group();
Telerik.Reporting.Drawing.StyleRule styleRule1 = new Telerik.Reporting.Drawing.StyleRule();
Telerik.Reporting.Drawing.StyleRule styleRule2 = new Telerik.Reporting.Drawing.StyleRule();
Telerik.Reporting.Drawing.StyleRule styleRule3 = new Telerik.Reporting.Drawing.StyleRule();
Telerik.Reporting.Drawing.StyleRule styleRule4 = new Telerik.Reporting.Drawing.StyleRule();
this.labelsGroupFooter = new Telerik.Reporting.GroupFooterSection();
this.labelsGroupHeader = new Telerik.Reporting.GroupHeaderSection();
this.dateCaptionTextBox = new Telerik.Reporting.TextBox();
this.timeCaptionTextBox = new Telerik.Reporting.TextBox();
this.locationCaptionTextBox = new Telerik.Reporting.TextBox();
this.speedCaptionTextBox = new Telerik.Reporting.TextBox();
this.unitCaptionTextBox = new Telerik.Reporting.TextBox();
this.departmentCaptionTextBox = new Telerik.Reporting.TextBox();
this.graph1 = new Telerik.Reporting.Graph();
this.polarCoordinateSystem1 = new Telerik.Reporting.PolarCoordinateSystem();
this.graphAxis1 = new Telerik.Reporting.GraphAxis();
this.graphAxis2 = new Telerik.Reporting.GraphAxis();
this.barSeries1 = new Telerik.Reporting.BarSeries();
this.pageHeader = new Telerik.Reporting.PageHeaderSection();
this.pageFooter = new Telerik.Reporting.PageFooterSection();
this.currentTimeTextBox = new Telerik.Reporting.TextBox();
this.pageInfoTextBox = new Telerik.Reporting.TextBox();
this.reportHeader = new Telerik.Reporting.ReportHeaderSection();
this.titleTextBox = new Telerik.Reporting.TextBox();
this.periodTextBox = new Telerik.Reporting.TextBox();
this.detail = new Telerik.Reporting.DetailSection();
this.departmentDataTextBox = new Telerik.Reporting.TextBox();
this.unitDataTextBox = new Telerik.Reporting.TextBox();
this.dateDataTextBox = new Telerik.Reporting.TextBox();
this.timeDataTextBox = new Telerik.Reporting.TextBox();
this.locationDataTextBox = new Telerik.Reporting.TextBox();
this.speedDataTextBox = new Telerik.Reporting.TextBox();
this.objectDataSource1 = new Telerik.Reporting.ObjectDataSource();
this.reportFooterSection1 = new Telerik.Reporting.ReportFooterSection();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// labelsGroupFooter
//
this.labelsGroupFooter.Height = Telerik.Reporting.Drawing.Unit.Inch(0.052083294838666916D);
this.labelsGroupFooter.Name = "labelsGroupFooter";
this.labelsGroupFooter.Style.Visible = false;
//
// labelsGroupHeader
//
this.labelsGroupHeader.Height = Telerik.Reporting.Drawing.Unit.Inch(0.51875019073486328D);
this.labelsGroupHeader.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
this.dateCaptionTextBox,
this.timeCaptionTextBox,
this.locationCaptionTextBox,
this.speedCaptionTextBox,
this.unitCaptionTextBox,
this.departmentCaptionTextBox});
this.labelsGroupHeader.Name = "labelsGroupHeader";
this.labelsGroupHeader.PrintOnEveryPage = true;
//
// dateCaptionTextBox
//
this.dateCaptionTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.dateCaptionTextBox.CanGrow = true;
this.dateCaptionTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(2.5D), Telerik.Reporting.Drawing.Unit.Inch(0.019999999552965164D));
this.dateCaptionTextBox.Name = "dateCaptionTextBox";
this.dateCaptionTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.43999999761581421D));
this.dateCaptionTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.dateCaptionTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.dateCaptionTextBox.StyleName = "Caption";
this.dateCaptionTextBox.Value = "Date";
//
// timeCaptionTextBox
//
this.timeCaptionTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.timeCaptionTextBox.CanGrow = true;
this.timeCaptionTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(3.309999942779541D), Telerik.Reporting.Drawing.Unit.Inch(0.019999999552965164D));
this.timeCaptionTextBox.Name = "timeCaptionTextBox";
this.timeCaptionTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.43999999761581421D));
this.timeCaptionTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.timeCaptionTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.timeCaptionTextBox.StyleName = "Caption";
this.timeCaptionTextBox.Value = "Time";
//
// locationCaptionTextBox
//
this.locationCaptionTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.locationCaptionTextBox.CanGrow = true;
this.locationCaptionTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(4.119999885559082D), Telerik.Reporting.Drawing.Unit.Inch(0.019999999552965164D));
this.locationCaptionTextBox.Name = "locationCaptionTextBox";
this.locationCaptionTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1.6699999570846558D), Telerik.Reporting.Drawing.Unit.Inch(0.43999999761581421D));
this.locationCaptionTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.locationCaptionTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.locationCaptionTextBox.StyleName = "Caption";
this.locationCaptionTextBox.Value = "Location";
//
// speedCaptionTextBox
//
this.speedCaptionTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.speedCaptionTextBox.CanGrow = true;
this.speedCaptionTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(5.8000001907348633D), Telerik.Reporting.Drawing.Unit.Inch(0.019999999552965164D));
this.speedCaptionTextBox.Name = "speedCaptionTextBox";
this.speedCaptionTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.699999988079071D), Telerik.Reporting.Drawing.Unit.Inch(0.43999999761581421D));
this.speedCaptionTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.speedCaptionTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.speedCaptionTextBox.StyleName = "Caption";
this.speedCaptionTextBox.Value = "Speed";
//
// unitCaptionTextBox
//
this.unitCaptionTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.unitCaptionTextBox.CanGrow = true;
this.unitCaptionTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(1.1799999475479126D), Telerik.Reporting.Drawing.Unit.Inch(0.019999999552965164D));
this.unitCaptionTextBox.Name = "unitCaptionTextBox";
this.unitCaptionTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1.309999942779541D), Telerik.Reporting.Drawing.Unit.Inch(0.43999999761581421D));
this.unitCaptionTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.unitCaptionTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.unitCaptionTextBox.StyleName = "Caption";
this.unitCaptionTextBox.Value = "Unit";
//
// departmentCaptionTextBox
//
this.departmentCaptionTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.departmentCaptionTextBox.CanGrow = true;
this.departmentCaptionTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(3.9378803194267675E-05D), Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D));
this.departmentCaptionTextBox.Name = "departmentCaptionTextBox";
this.departmentCaptionTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1.1699999570846558D), Telerik.Reporting.Drawing.Unit.Inch(0.43999999761581421D));
this.departmentCaptionTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.departmentCaptionTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.departmentCaptionTextBox.StyleName = "Caption";
this.departmentCaptionTextBox.Value = "Department";
//
// graph1
//
graphGroup1.Name = "categoryGroup";
this.graph1.CategoryGroups.Add(graphGroup1);
this.graph1.CoordinateSystems.Add(this.polarCoordinateSystem1);
this.graph1.Legend.Style.LineColor = System.Drawing.Color.LightGray;
this.graph1.Legend.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D);
this.graph1.Legend.Style.Visible = false;
this.graph1.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.60000008344650269D), Telerik.Reporting.Drawing.Unit.Inch(3.9498012483818457E-05D));
this.graph1.Name = "graph1";
this.graph1.PlotAreaStyle.LineColor = System.Drawing.Color.LightGray;
this.graph1.PlotAreaStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D);
this.graph1.Series.Add(this.barSeries1);
this.graph1.SeriesGroups.Add(graphGroup2);
this.graph1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(5.0899996757507324D), Telerik.Reporting.Drawing.Unit.Inch(1.6000000238418579D));
graphTitle1.Position = Telerik.Reporting.GraphItemPosition.TopCenter;
graphTitle1.Style.LineColor = System.Drawing.Color.LightGray;
graphTitle1.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D);
graphTitle1.Text = "";
this.graph1.Titles.Add(graphTitle1);
//
// polarCoordinateSystem1
//
this.polarCoordinateSystem1.AngularAxis = this.graphAxis1;
this.polarCoordinateSystem1.Name = "polarCoordinateSystem1";
this.polarCoordinateSystem1.RadialAxis = this.graphAxis2;
//
// graphAxis1
//
this.graphAxis1.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis1.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis1.MajorGridLineStyle.Visible = false;
this.graphAxis1.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis1.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis1.MinorGridLineStyle.Visible = false;
this.graphAxis1.Name = "graphAxis1";
this.graphAxis1.Scale = numericalScale1;
this.graphAxis1.Style.Visible = false;
//
// graphAxis2
//
this.graphAxis2.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis2.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis2.MajorGridLineStyle.Visible = false;
this.graphAxis2.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis2.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis2.MinorGridLineStyle.Visible = false;
this.graphAxis2.Name = "graphAxis2";
categoryScale1.PositionMode = Telerik.Reporting.AxisPositionMode.OnTicks;
categoryScale1.SpacingSlotCount = 0D;
this.graphAxis2.Scale = categoryScale1;
this.graphAxis2.Style.Visible = false;
//
// barSeries1
//
this.barSeries1.ArrangeMode = Telerik.Reporting.GraphSeriesArrangeMode.Stacked100;
this.barSeries1.CategoryGroup = graphGroup1;
this.barSeries1.CoordinateSystem = this.polarCoordinateSystem1;
this.barSeries1.DataPointLabel = "= Sum(Fields.Value) / CDbl(Exec(\'graph1\', Sum(Fields.Value)))";
this.barSeries1.DataPointLabelAlignment = Telerik.Reporting.BarDataPointLabelAlignment.OutsideColumn;
this.barSeries1.DataPointLabelConnectorStyle.Padding.Bottom = Telerik.Reporting.Drawing.Unit.Point(2D);
this.barSeries1.DataPointLabelConnectorStyle.Padding.Top = Telerik.Reporting.Drawing.Unit.Point(2D);
this.barSeries1.DataPointLabelFormat = "{0:P}";
this.barSeries1.DataPointLabelOffset = Telerik.Reporting.Drawing.Unit.Mm(5D);
this.barSeries1.DataPointLabelStyle.Visible = true;
this.barSeries1.DataPointStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D);
this.barSeries1.DataPointStyle.Visible = true;
this.barSeries1.LegendItem.Value = "= Fields.Type";
this.barSeries1.Name = "barSeries1";
graphGroup2.Groupings.Add(new Telerik.Reporting.Grouping("= Fields.Type"));
graphGroup2.Name = "typeGroup";
graphGroup2.Sortings.Add(new Telerik.Reporting.Sorting("= Fields.Type", Telerik.Reporting.SortDirection.Asc));
this.barSeries1.SeriesGroup = graphGroup2;
this.barSeries1.X = "= Sum(Fields.Value)";
//
// pageHeader
//
this.pageHeader.Height = Telerik.Reporting.Drawing.Unit.Inch(0.099999986588954926D);
this.pageHeader.Name = "pageHeader";
//
// pageFooter
//
this.pageFooter.Height = Telerik.Reporting.Drawing.Unit.Inch(0.28125D);
this.pageFooter.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
this.currentTimeTextBox,
this.pageInfoTextBox});
this.pageFooter.Name = "pageFooter";
//
// currentTimeTextBox
//
this.currentTimeTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D), Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D));
this.currentTimeTextBox.Name = "currentTimeTextBox";
this.currentTimeTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(3.1979167461395264D), Telerik.Reporting.Drawing.Unit.Inch(0.20000003278255463D));
this.currentTimeTextBox.StyleName = "PageInfo";
this.currentTimeTextBox.Value = "=NOW()";
//
// pageInfoTextBox
//
this.pageInfoTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(3.2395832538604736D), Telerik.Reporting.Drawing.Unit.Inch(0.02083333395421505D));
this.pageInfoTextBox.Name = "pageInfoTextBox";
this.pageInfoTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(3.1979167461395264D), Telerik.Reporting.Drawing.Unit.Inch(0.20000003278255463D));
this.pageInfoTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Right;
this.pageInfoTextBox.StyleName = "PageInfo";
this.pageInfoTextBox.Value = "=PageNumber";
//
// reportHeader
//
this.reportHeader.Height = Telerik.Reporting.Drawing.Unit.Inch(0.60000008344650269D);
this.reportHeader.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
this.titleTextBox,
this.periodTextBox});
this.reportHeader.Name = "reportHeader";
//
// titleTextBox
//
this.titleTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0D), Telerik.Reporting.Drawing.Unit.Inch(0D));
this.titleTextBox.Name = "titleTextBox";
this.titleTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.4583334922790527D), Telerik.Reporting.Drawing.Unit.Inch(0.30000001192092896D));
this.titleTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.titleTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.titleTextBox.StyleName = "Title";
this.titleTextBox.Value = "BatchHistoryReport";
//
// periodTextBox
//
this.periodTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0D), Telerik.Reporting.Drawing.Unit.Inch(0.30000004172325134D));
this.periodTextBox.Name = "periodTextBox";
this.periodTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.4583334922790527D), Telerik.Reporting.Drawing.Unit.Inch(0.30000004172325134D));
this.periodTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.periodTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.periodTextBox.Style.Visible = false;
this.periodTextBox.StyleName = "Title";
this.periodTextBox.Value = "";
//
// detail
//
this.detail.Height = Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D);
this.detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
this.departmentDataTextBox,
this.unitDataTextBox,
this.dateDataTextBox,
this.timeDataTextBox,
this.locationDataTextBox,
this.speedDataTextBox});
this.detail.Name = "detail";
this.detail.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
//
// departmentDataTextBox
//
this.departmentDataTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.departmentDataTextBox.Angle = 0D;
this.departmentDataTextBox.CanGrow = true;
this.departmentDataTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(3.9365557313431054E-05D), Telerik.Reporting.Drawing.Unit.Inch(0D));
this.departmentDataTextBox.Name = "departmentDataTextBox";
this.departmentDataTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1.1699999570846558D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
this.departmentDataTextBox.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
this.departmentDataTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.departmentDataTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.departmentDataTextBox.StyleName = "Data";
this.departmentDataTextBox.Value = "=Fields.Department";
//
// unitDataTextBox
//
this.unitDataTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.unitDataTextBox.Angle = 0D;
this.unitDataTextBox.CanGrow = true;
this.unitDataTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(1.1799999475479126D), Telerik.Reporting.Drawing.Unit.Inch(0D));
this.unitDataTextBox.Name = "unitDataTextBox";
this.unitDataTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1.309999942779541D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
this.unitDataTextBox.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
this.unitDataTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.unitDataTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.unitDataTextBox.StyleName = "Data";
this.unitDataTextBox.Value = "=Fields.Unit";
//
// dateDataTextBox
//
this.dateDataTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.dateDataTextBox.Angle = 0D;
this.dateDataTextBox.CanGrow = true;
this.dateDataTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(2.5D), Telerik.Reporting.Drawing.Unit.Inch(0D));
this.dateDataTextBox.Name = "dateDataTextBox";
this.dateDataTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
this.dateDataTextBox.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
this.dateDataTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.dateDataTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.dateDataTextBox.StyleName = "Data";
this.dateDataTextBox.Value = "=Fields.Date";
//
// timeDataTextBox
//
this.timeDataTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.timeDataTextBox.Angle = 0D;
this.timeDataTextBox.CanGrow = true;
this.timeDataTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(3.309999942779541D), Telerik.Reporting.Drawing.Unit.Inch(0D));
this.timeDataTextBox.Name = "timeDataTextBox";
this.timeDataTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
this.timeDataTextBox.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
this.timeDataTextBox.Style.BorderStyle.Left = Telerik.Reporting.Drawing.BorderType.Solid;
this.timeDataTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.timeDataTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.timeDataTextBox.StyleName = "Data";
this.timeDataTextBox.Value = "=Fields.Time";
//
// locationDataTextBox
//
this.locationDataTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.locationDataTextBox.Angle = 0D;
this.locationDataTextBox.CanGrow = true;
this.locationDataTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(4.119999885559082D), Telerik.Reporting.Drawing.Unit.Inch(0D));
this.locationDataTextBox.Name = "locationDataTextBox";
this.locationDataTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1.6699999570846558D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
this.locationDataTextBox.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
this.locationDataTextBox.Style.BorderStyle.Left = Telerik.Reporting.Drawing.BorderType.Solid;
this.locationDataTextBox.Style.BorderStyle.Right = Telerik.Reporting.Drawing.BorderType.Solid;
this.locationDataTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.locationDataTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.locationDataTextBox.StyleName = "Data";
this.locationDataTextBox.Value = "=Fields.Location";
//
// speedDataTextBox
//
this.speedDataTextBox.Anchoring = ((Telerik.Reporting.AnchoringStyles)((Telerik.Reporting.AnchoringStyles.Top | Telerik.Reporting.AnchoringStyles.Bottom)));
this.speedDataTextBox.Angle = 0D;
this.speedDataTextBox.CanGrow = true;
this.speedDataTextBox.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(5.8000001907348633D), Telerik.Reporting.Drawing.Unit.Inch(0D));
this.speedDataTextBox.Name = "speedDataTextBox";
this.speedDataTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.699999988079071D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
this.speedDataTextBox.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
this.speedDataTextBox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.speedDataTextBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.speedDataTextBox.StyleName = "Data";
this.speedDataTextBox.Value = "=Fields.Speed";
//
// objectDataSource1
//
this.objectDataSource1.DataMember = "GetALL";
this.objectDataSource1.DataSource = typeof(ReportsLibrary.BatchHistoryDataObj);
this.objectDataSource1.Name = "objectDataSource1";
//
// reportFooterSection1
//
this.reportFooterSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(1.6000394821166992D);
this.reportFooterSection1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
this.graph1});
this.reportFooterSection1.Name = "reportFooterSection1";
//
// BatchHistoryReport
//
this.DataSource = this.objectDataSource1;
group1.GroupFooter = this.labelsGroupFooter;
group1.GroupHeader = this.labelsGroupHeader;
group1.Name = "labelsGroup";
this.Groups.AddRange(new Telerik.Reporting.Group[] {
group1});
this.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
this.labelsGroupHeader,
this.labelsGroupFooter,
this.pageHeader,
this.pageFooter,
this.reportHeader,
this.detail,
this.reportFooterSection1});
this.Name = "BatchHistoryReport";
this.PageSettings.Landscape = false;
this.PageSettings.Margins = new Telerik.Reporting.Drawing.MarginsU(Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D));
this.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter;
this.Style.BackgroundColor = System.Drawing.Color.White;
styleRule1.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {
new Telerik.Reporting.Drawing.StyleSelector("Title")});
styleRule1.Style.BackgroundColor = System.Drawing.Color.Empty;
styleRule1.Style.Color = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(58)))), ((int)(((byte)(112)))));
styleRule1.Style.Font.Name = "Tahoma";
styleRule1.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(18D);
styleRule2.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {
new Telerik.Reporting.Drawing.StyleSelector("Caption")});
styleRule2.Style.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(58)))), ((int)(((byte)(112)))));
styleRule2.Style.Color = System.Drawing.Color.White;
styleRule2.Style.Font.Bold = true;
styleRule2.Style.Font.Italic = false;
styleRule2.Style.Font.Name = "Tahoma";
styleRule2.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(11D);
styleRule2.Style.Font.Strikeout = false;
styleRule2.Style.Font.Underline = false;
styleRule2.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
styleRule3.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {
new Telerik.Reporting.Drawing.StyleSelector("Data")});
styleRule3.Style.Color = System.Drawing.Color.Black;
styleRule3.Style.Font.Name = "Tahoma";
styleRule3.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(10D);
styleRule3.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
styleRule4.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {
new Telerik.Reporting.Drawing.StyleSelector("PageInfo")});
styleRule4.Style.Color = System.Drawing.Color.Black;
styleRule4.Style.Font.Name = "Tahoma";
styleRule4.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(8D);
styleRule4.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.StyleSheet.AddRange(new Telerik.Reporting.Drawing.StyleRule[] {
styleRule1,
styleRule2,
styleRule3,
styleRule4});
this.Width = Telerik.Reporting.Drawing.Unit.Inch(6.5D);
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
#endregion
private ObjectDataSource objectDataSource1;
private GroupHeaderSection labelsGroupHeader;
private GroupFooterSection labelsGroupFooter;
private Group labelsGroup;
private PageHeaderSection pageHeader;
private PageFooterSection pageFooter;
private Telerik.Reporting.TextBox currentTimeTextBox;
private Telerik.Reporting.TextBox pageInfoTextBox;
private ReportHeaderSection reportHeader;
private DetailSection detail;
private Telerik.Reporting.TextBox departmentDataTextBox;
private Telerik.Reporting.TextBox unitDataTextBox;
private Telerik.Reporting.TextBox dateDataTextBox;
private Telerik.Reporting.TextBox timeDataTextBox;
private Telerik.Reporting.TextBox locationDataTextBox;
private Telerik.Reporting.TextBox speedDataTextBox;
public Telerik.Reporting.TextBox titleTextBox;
public Telerik.Reporting.TextBox departmentCaptionTextBox;
public Telerik.Reporting.TextBox unitCaptionTextBox;
public Telerik.Reporting.TextBox dateCaptionTextBox;
public Telerik.Reporting.TextBox timeCaptionTextBox;
public Telerik.Reporting.TextBox locationCaptionTextBox;
public Telerik.Reporting.TextBox speedCaptionTextBox;
public Telerik.Reporting.TextBox periodTextBox;
public Graph graph1;
private PolarCoordinateSystem polarCoordinateSystem1;
private GraphAxis graphAxis1;
private GraphAxis graphAxis2;
private BarSeries barSeries1;
public ReportFooterSection reportFooterSection1;
}
}

View File

@ -1,27 +0,0 @@
namespace ReportsLibrary
{
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;
/// <summary>
/// Summary description for BatchHistoryReport.
/// </summary>
public partial class BatchHistoryReport : Telerik.Reporting.Report
{
public BatchHistoryReport()
{
/// <summary>
/// Required for telerik Reporting designer support
/// </summary>
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -180,10 +180,9 @@ namespace ReportsLibrary
tmpData = new EndOfDayData(); tmpData = new EndOfDayData();
RowNumber++; RowNumber++;
tmpData.Trip = Convert.ToString(RowNumber); tmpData.Trip = Convert.ToString(RowNumber);
//tmpData.StartTime = (new ConvertDT().GetDTLocalFromSeconds(obj3.stop)).ToString();
string dateTimeFormat = StaticMembers.is24hours ? "MM/dd/yyyy HH:mm:ss" : "MM/dd/yyyy hh:mm:ss tt"; if (StaticMembers.is24hours) tmpData.StartTime = ((obj3.stop).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy HH:mm:ss");
tmpData.StartTime = ((obj3.stop).GetDTLocalFromSeconds()).ToString(dateTimeFormat); else tmpData.StartTime = ((obj3.stop).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy hh:mm:ss tt");
timeforStartCalc = obj3.stop; timeforStartCalc = obj3.stop;
if (!StaticMembers.LATLNGforDinamicReports) if (!StaticMembers.LATLNGforDinamicReports)
@ -214,10 +213,10 @@ namespace ReportsLibrary
tmpData = new EndOfDayData(); tmpData = new EndOfDayData();
RowNumber++; RowNumber++;
tmpData.Trip = Convert.ToString(RowNumber); tmpData.Trip = Convert.ToString(RowNumber);
//tmpData.StartTime = (new ConvertDT().GetDTLocalFromSeconds(lastStopTimeStop)).ToString();
string dateTimeFormat = StaticMembers.is24hours ? "MM/dd/yyyy HH:mm:ss" : "MM/dd/yyyy hh:mm:ss tt"; if (StaticMembers.is24hours) tmpData.StartTime = ((lastStopTimeStop).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy HH:mm:ss");
tmpData.StartTime = ((lastStopTimeStop).GetDTLocalFromSeconds()).ToString(dateTimeFormat); else tmpData.StartTime = ((lastStopTimeStop).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy hh:mm:ss tt");
timeforStartCalc = lastStopTimeStop; timeforStartCalc = lastStopTimeStop;
tmpData.StartAddress = lastStopNameStop; tmpData.StartAddress = lastStopNameStop;
@ -227,35 +226,26 @@ namespace ReportsLibrary
{ {
totaltime += (obj3.start - timeforStartCalc); totaltime += (obj3.start - timeforStartCalc);
tmpData.StopTime = ((obj3.start).GetDTLocalFromSeconds()).ToString(); tmpData.StopTime = ((obj3.start).GetDTLocalFromSeconds()).ToString();
if (!StaticMembers.LATLNGforDinamicReports) if (!StaticMembers.LATLNGforDinamicReports)
{ {
if ((StaticMembers.MapType == MapTYPE.Google) || (StaticMembers.MapType == MapTYPE.ArcGis)) if ((StaticMembers.MapType == MapTYPE.Google) || (StaticMembers.MapType == MapTYPE.ArcGis))
tmpData.StopAddress = StaticMembers.IdReportHS[obj3.name].ToString(); tmpData.StopAddress = StaticMembers.IdReportHS[obj3.name].ToString();
} }
else else tmpData.StopAddress = "LAT:" + Math.Round(obj3.lat, 5).ToString() + " , LNG:" + Math.Round(obj3.lng, 5).ToString();
tmpData.StopAddress = "LAT:" + Math.Round(obj3.lat, 5).ToString() + " , LNG:" + Math.Round(obj3.lng, 5).ToString();
difidx = (Double)DriveList[count3]; difidx = (Double)DriveList[count3];
total += difidx; total += difidx;
if (StaticMembers.isInMile) if (StaticMembers.isInMile) tmpData.Distance = (Math.Round(((difidx * 0.621371192) * 1000)) / 1000).ToString();
tmpData.Distance = (Math.Round(((difidx * 0.621371192) * 1000)) / 1000).ToString(); else tmpData.Distance = difidx.ToString();
else if (tmpData != null) Ret.Add(tmpData);
tmpData.Distance = difidx.ToString();
if (tmpData != null)
Ret.Add(tmpData);
} }
lastStopIsStop = true; lastStopIsStop = true;
lastStopTimeStop = obj3.stop; lastStopTimeStop = obj3.stop;
if (!StaticMembers.LATLNGforDinamicReports) if (!StaticMembers.LATLNGforDinamicReports)
{ {
if ((StaticMembers.MapType == MapTYPE.Google) || (StaticMembers.MapType == MapTYPE.ArcGis)) if ((StaticMembers.MapType == MapTYPE.Google) || (StaticMembers.MapType == MapTYPE.ArcGis))
lastStopNameStop = StaticMembers.IdReportHS[obj3.name].ToString(); lastStopNameStop = StaticMembers.IdReportHS[obj3.name].ToString();
} }
else else lastStopNameStop = "LAT:" + Math.Round(obj3.lat, 5).ToString() + " , LNG:" + Math.Round(obj3.lng, 5).ToString();
lastStopNameStop = "LAT:" + Math.Round(obj3.lat, 5).ToString() + " , LNG:" + Math.Round(obj3.lng, 5).ToString();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -274,12 +264,8 @@ namespace ReportsLibrary
tmpData.StartAddress = String.Format("{0:00}", (int)(totaltime / 3600)) + ":" + String.Format("{0:00}", ((int)(((int)(totaltime % 3600)) / 60))) + ":" + String.Format("{0:00}", ((int)(totaltime % 60))); tmpData.StartAddress = String.Format("{0:00}", (int)(totaltime / 3600)) + ":" + String.Format("{0:00}", ((int)(((int)(totaltime % 3600)) / 60))) + ":" + String.Format("{0:00}", ((int)(totaltime % 60)));
tmpData.StopTime = ""; tmpData.StopTime = "";
tmpData.StopAddress = "Total distance:"; tmpData.StopAddress = "Total distance:";
if (StaticMembers.isInMile) tmpData.Distance = (Math.Round(((total * 0.621371192) * 1000)) / 1000).ToString();
if (StaticMembers.isInMile) else tmpData.Distance = total.ToString();
tmpData.Distance = (Math.Round(((total * 0.621371192) * 1000)) / 1000).ToString();
else
tmpData.Distance = total.ToString();
Ret.Add(tmpData); Ret.Add(tmpData);
} }
@ -303,181 +289,149 @@ namespace ReportsLibrary
[DataObjectMethod(DataObjectMethodType.Select)] [DataObjectMethod(DataObjectMethodType.Select)]
public List<StopData> GetALL() public List<StopData> GetALL()
{ {
if (!StaticMembers.IsHistroyNotStop) // aici prelucrez date cand e raport de stop sau IDLE
if (StaticMembers.IsHistroyNotStop)
return StaticMembers.HistDataReport;
//if (!StaticMembers.IsHistroyNotStop) // aici prelucrez date cand e raport de stop sau IDLE
CalcStops calcStop = new CalcStops(true);//mapControl
calcStop.get_position(StaticMembers.PositionList);
try
{
if (!StaticMembers.IsIdle)
{
calcStop.calculate_zone();
calcStop.calc_zone_with_delta2();
calcStop.create_stop_list();
}
else
{
calcStop.create_stop_list_EON(StaticMembers.IDLETime);
}
}
catch (Exception ex)
{
SM.Debug("Database connection failed:" + ex.ToString());
}
if (StaticMembers.StartStop)
{
calcStop.StartStopCalc();
calcStop.StartStopCalcPosition();
}
ArrayList numbers = new ArrayList();
ReverseGeocoding volltmpGo = new ReverseGeocoding(ReverseGeoOSM);
//calcul addressa Google
if (!StaticMembers.LATLNGforDinamicReports)
{ {
CalcStops calcStop = new CalcStops(true);//mapControl
calcStop.get_position(StaticMembers.PositionList);
try try
{ {
if ((StaticMembers.MapType == MapTYPE.ArcGis) || (StaticMembers.MapType == MapTYPE.Google)) if (!StaticMembers.IsIdle)
{ {
foreach (Stops obj3 in calcStop.StopsList) calcStop.calculate_zone();
{ calcStop.calc_zone_with_delta2();
StaticMembers.AddrGISQueue.Enqueue(new AddrAndID(Convert.ToInt32(obj3.name), obj3.lat, obj3.lng)); calcStop.create_stop_list();
if (StaticMembers.ShowCoordinates) }
StaticMembers.IdReportHS.Add(obj3.name, "LAT:" + Math.Round(obj3.lat, 5).ToString() + " , LNG:" + Math.Round(obj3.lng, 5).ToString()); else
else {
StaticMembers.IdReportHS.Add(obj3.name, obj3.address != "" ? obj3.address : volltmpGo.getAddressLATLNG(obj3.lat, obj3.lng)); calcStop.create_stop_list_EON(StaticMembers.IDLETime);
}
if (!StaticMembers.ShowCoordinates)
{
bool retrynew = true;
int cntmax = 0;
foreach (String obj in StaticMembers.IdReportHS.Keys)
numbers.Add(obj);
while (retrynew)
{
cntmax++;
retrynew = false;
foreach (String obj in numbers)
{
if ((String)StaticMembers.IdReportHS[obj] == "no address")
{
SM.Debug("Sta 180 msec");
Thread.Sleep(180);
retrynew = true;
}
}
if (cntmax > 10)
retrynew = false;
}
}
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
SM.Debug("Erorr on compute adress for report:" + ex.ToString()); SM.Debug("Database connection failed:" + ex.ToString());
} }
}
int countStops = -1; if (StaticMembers.StartStop)
long stoptime, starttime; {
StopData tmpData = null; calcStop.StartStopCalc();
Int32 RowNumber = 0; calcStop.StartStopCalcPosition();
}
var list = new List<StopData>(); ArrayList numbers = new ArrayList();
ReverseGeocoding volltmpGo = new ReverseGeocoding(ReverseGeoOSM);
foreach (Stops obj3 in calcStop.StopsList) //calcul addressa Google
{ if (!StaticMembers.LATLNGforDinamicReports)
countStops++;
if (obj3.type == car_state_e.CAR_STOP)
{ {
// Populate StopData object
tmpData = new StopData();
try try
{ {
RowNumber++; if ((StaticMembers.MapType == MapTYPE.ArcGis) || (StaticMembers.MapType == MapTYPE.Google))
tmpData.Data = ((obj3.start).GetDTLocalFromSeconds()).Date.ToShortDateString();
tmpData.Time = ((Int32)obj3.start).TimeOfDayHHMMLocal(!StaticMembers.is24hours);
// get location
if (!StaticMembers.LATLNGforDinamicReports)
{ {
if ((StaticMembers.MapType == MapTYPE.Google) || (StaticMembers.MapType == MapTYPE.ArcGis)) foreach (Stops obj3 in calcStop.StopsList)
tmpData.Location = StaticMembers.IdReportHS[obj3.name].ToString(); {
StaticMembers.AddrGISQueue.Enqueue(new AddrAndID(Convert.ToInt32(obj3.name), obj3.lat, obj3.lng));
if (StaticMembers.ShowCoordinates)
StaticMembers.IdReportHS.Add(obj3.name, "LAT:" + Math.Round(obj3.lat, 5).ToString() + " , LNG:" + Math.Round(obj3.lng, 5).ToString());
else
StaticMembers.IdReportHS.Add(obj3.name, obj3.address != "" ? obj3.address : volltmpGo.getAddressLATLNG(obj3.lat, obj3.lng));
}
if (!StaticMembers.ShowCoordinates)
{
bool retrynew = true;
int cntmax = 0;
foreach (String obj in StaticMembers.IdReportHS.Keys)
numbers.Add(obj);
while (retrynew)
{
cntmax++;
retrynew = false;
foreach (String obj in numbers)
{
if ((String)StaticMembers.IdReportHS[obj] == "no address")
{
SM.Debug("Sta 180 msec");
Thread.Sleep(180);
retrynew = true;
}
}
if (cntmax > 10) retrynew = false;
}
}
} }
else
tmpData.Location = "LAT:" + Math.Round(obj3.lat, 5).ToString() + " , LNG:" + Math.Round(obj3.lng, 5).ToString();
// calculate duration
stoptime = obj3.stop;
starttime = obj3.start;
if (countStops < (calcStop.StopsList.Count - 1))
{
if (((Stops)(calcStop.StopsList[countStops + 1])).type == car_state_e.CAR_START)
stoptime = ((Stops)(calcStop.StopsList[countStops + 1])).stop;
}
tmpData.Duration = FormatDuration(starttime, stoptime);
} }
catch (Exception ex) catch (Exception ex)
{ {
SM.Debug("EX:" + ex.ToString()); SM.Debug("Erorr on compute adress for report:" + ex.ToString());
} }
// add to list
list.Add(tmpData);
} }
}
//de la google address int countStops = -1;
if ((StaticMembers.MapType == MapTYPE.Google) || (StaticMembers.MapType == MapTYPE.ArcGis)) long stoptime, starttime;
StopData tmpData = null;
Int32 RowNumber = 0;
var Ret = new List<StopData>();
Int64 diffTime;
foreach (Stops obj3 in calcStop.StopsList)
{
countStops++;
if (obj3.type == car_state_e.CAR_STOP)
{
tmpData = new StopData();
try
{
RowNumber++;
tmpData.Data = ((obj3.start).GetDTLocalFromSeconds()).Date.ToShortDateString();
tmpData.Time = ((Int32)obj3.start).TimeOfDayHHMMLocal(!StaticMembers.is24hours);
if (!StaticMembers.LATLNGforDinamicReports)
{
if ((StaticMembers.MapType == MapTYPE.Google) || (StaticMembers.MapType == MapTYPE.ArcGis))
tmpData.Location = StaticMembers.IdReportHS[obj3.name].ToString();
}
else tmpData.Location = "LAT:" + Math.Round(obj3.lat, 5).ToString() + " , LNG:" + Math.Round(obj3.lng, 5).ToString();
stoptime = obj3.stop;
starttime = obj3.start;
if (countStops < (calcStop.StopsList.Count - 1))
{
if (((Stops)(calcStop.StopsList[countStops + 1])).type == car_state_e.CAR_START)
stoptime = ((Stops)(calcStop.StopsList[countStops + 1])).stop;
}
diffTime = stoptime - starttime;
Int32 Hour = (Int32)(diffTime / 3600);
Int32 Minute = (Int32)((diffTime - Hour * 3600) / 60);
String toReturn = "";
if (Hour >= 10)
toReturn = toReturn + Hour.ToString() + ":";
else
toReturn = toReturn + "0" + Hour.ToString() + ":";
if (Minute >= 10)
toReturn = toReturn + Minute.ToString();
else
toReturn = toReturn + "0" + Minute.ToString();
tmpData.Duration = toReturn;
}
catch (Exception ex)
{
SM.Debug("EX:" + ex.ToString());
}
Ret.Add(tmpData);
}
}
//de la google address
if ((StaticMembers.MapType == MapTYPE.Google) || (StaticMembers.MapType == MapTYPE.ArcGis))
{
foreach (String obj in numbers)
StaticMembers.IdReportHS.Remove(obj);
numbers.Clear();
}
return Ret;
}
else // aici prelucrez date cand e raport de history
{ {
foreach (String obj in numbers) return StaticMembers.HistDataReport;
StaticMembers.IdReportHS.Remove(obj);
numbers.Clear();
} }
return list;
} }
private string FormatDuration(long starttime, long stoptime)
{
Int64 diffTime = stoptime - starttime;
Int32 Hour = (Int32)(diffTime / 3600);
Int32 Minute = (Int32)((diffTime - Hour * 3600) / 60);
return Hour.ToString("D2") + ":" + Minute.ToString("D2");
}
}
[DataObject]
public class BatchHistoryDataObj
{
[DataObjectMethod(DataObjectMethodType.Select)]
public List<BatchHistoryData> GetALL()
{
return StaticMembers.BatchHistoryReport;
}
} }
[DataObject] [DataObject]
@ -486,7 +440,9 @@ namespace ReportsLibrary
[DataObjectMethod(DataObjectMethodType.Select)] [DataObjectMethod(DataObjectMethodType.Select)]
public List<FleetData> GetALL() public List<FleetData> GetALL()
{ {
var fleetDataList = new List<FleetData>(); Double distance = .001f;
Double AllDistance = .001f;
var Ret = new List<FleetData>();
if (!StaticMembers.IsSMSLocationNotFleet) if (!StaticMembers.IsSMSLocationNotFleet)
{ {
@ -512,112 +468,91 @@ namespace ReportsLibrary
calcStop.StartStopCalcPosition(); calcStop.StartStopCalcPosition();
} }
//distance
// populate FleetData AllDistance = 0;
Boolean first = true;
distance = 0;
Int32 timeStart = 0, timeStop = 0, oldStop = 0;
if (calcStop.StopsList.Count > 1)
{
Stops prevObj = null;
foreach (Stops obj in calcStop.StopsList)
{
if (prevObj != null)
{
if (!((prevObj.type == car_state_e.CAR_STOP) && (obj.type == car_state_e.CAR_START)))
{
AllDistance += distance;
if (first)
{
timeStart = prevObj.stop;
first = false;
}
else timeStart = oldStop;
timeStop = obj.start;
oldStop = obj.stop;
AllDistance += calcStop.calcDistance(timeStart, timeStop);
//DriveList.Add(distance);
}
else { first = true; }
}
prevObj = obj;
}
}
int startnr = 0;
Stops prevStopObj = null;
foreach (Stops obj in calcStop.StopsList)
{
if (obj.type == car_state_e.CAR_START)
startnr++;
if (prevStopObj != null)
if ((prevStopObj.type == car_state_e.CAR_STOP) && (obj.type == car_state_e.CAR_STOP))
startnr++;
prevStopObj = obj;
}
FleetData tmpData = new FleetData(); FleetData tmpData = new FleetData();
tmpData.Name = veh.Name; tmpData.Name = veh.Name;
tmpData.Distance = calculatetDistance(calcStop); if (StaticMembers.isInMile) tmpData.Distance = (Math.Round(((AllDistance * 0.621371192) * 1000)) / 1000).ToString();
else tmpData.Distance = AllDistance.ToString();
tmpData.Trips = "0"; if ((calcStop.StopsList.Count == 0) || (calcStop.StopsList.Count == 1)) tmpData.Trips = "0";
if (calcStop.StopsList.Count > 1) else tmpData.Trips = startnr.ToString();
tmpData.Trips = calculateTrips(calcStop);
tmpData.Start = ""; tmpData.Start = "";
tmpData.Stop = ""; tmpData.Stop = "";
if ((calcStop.StopsList.Count != 0) && (calcStop.StopsList.Count != 1)) if ((calcStop.StopsList.Count != 0) && (calcStop.StopsList.Count != 1))
{ {
string formatDate = StaticMembers.is24hours ? "MM/dd/yyyy HH:mm:ss" : "MM/dd/yyyy HH:mm:ss tt"; if (StaticMembers.is24hours)
tmpData.Start = ((((Stops)(calcStop.StopsList[0])).stop).GetDTLocalFromSeconds()).ToString(formatDate); {
tmpData.Stop = ((((Stops)(calcStop.StopsList[calcStop.StopsList.Count - 1])).start).GetDTLocalFromSeconds()).ToString(formatDate); tmpData.Start = ((((Stops)(calcStop.StopsList[0])).stop).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy HH:mm:ss");
tmpData.Stop = ((((Stops)(calcStop.StopsList[calcStop.StopsList.Count - 1])).start).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy HH:mm:ss");
}
else
{
tmpData.Start = ((((Stops)(calcStop.StopsList[0])).stop).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy hh:mm:ss tt");
tmpData.Stop = ((((Stops)(calcStop.StopsList[calcStop.StopsList.Count - 1])).start).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy hh:mm:ss tt");
}
} }
Ret.Add(tmpData);
// add to list
fleetDataList.Add(tmpData);
} }
} }
else else
{ {
foreach (SMS_Location sms_obj in StaticMembers.SMSLocList) foreach (SMS_Location sms_obj in StaticMembers.SMSLocList)
{ {
FleetData tmpData = new FleetData();
fleetDataList.Add( new FleetData() tmpData.Name = sms_obj.Name;
{ tmpData.Start = sms_obj.Data;
Name = sms_obj.Name, tmpData.Stop = sms_obj.Address;
Start = sms_obj.Data, tmpData.Trips = sms_obj.Time;
Stop = sms_obj.Address, tmpData.Distance = sms_obj.Text_mess;
Trips = sms_obj.Time, Ret.Add(tmpData);
Distance = sms_obj.Text_mess
});
} }
} }
return fleetDataList; return Ret;
}
private string calculateTrips(CalcStops calcStop)
{
int startnr = 0;
Stops prevStopObj = null;
foreach (Stops obj in calcStop.StopsList)
{
if (obj.type == car_state_e.CAR_START)
startnr++;
if (prevStopObj != null)
if ((prevStopObj.type == car_state_e.CAR_STOP) && (obj.type == car_state_e.CAR_STOP))
startnr++;
prevStopObj = obj;
}
return startnr.ToString();
}
private string calculatetDistance(CalcStops calcStop)
{
Double AllDistance = 0;
Boolean first = true;
Double distance = 0;
Int32 timeStart = 0, timeStop = 0, oldStop = 0;
if (calcStop.StopsList.Count > 1)
{
Stops prevObj = null;
foreach (Stops obj in calcStop.StopsList)
{
if (prevObj != null)
{
if (!((prevObj.type == car_state_e.CAR_STOP) && (obj.type == car_state_e.CAR_START)))
{
AllDistance += distance;
if (first)
{
timeStart = prevObj.stop;
first = false;
}
else
timeStart = oldStop;
timeStop = obj.start;
oldStop = obj.stop;
AllDistance += calcStop.calcDistance(timeStart, timeStop);
//DriveList.Add(distance);
}
else { first = true; }
}
prevObj = obj;
}
}
if (StaticMembers.isInMile)
return (Math.Round(((AllDistance * 0.621371192) * 1000)) / 1000).ToString();
return AllDistance.ToString();
} }
} }
@ -634,8 +569,9 @@ namespace ReportsLibrary
if (StaticMembers.ReportType == rep_type.SPEED) if (StaticMembers.ReportType == rep_type.SPEED)
{ {
int[,] array2D = new int[,] { { 20, 50 }, { 50, 70 }, { 70, 90 }, { 90, 400 } }; int[,] array2D = new int[,] { { 20, 50 }, { 50, 70 }, { 70, 90 }, { 90, 400 } };
var list = StaticMembers.SpeedingList.Select(x => x.Speed); var list = new List<string>();
foreach (SpeedData sd in StaticMembers.SpeedingList)
list.Add(sd.Speed);
for (int i = 0; i < array2D.GetLength(0); i++) for (int i = 0; i < array2D.GetLength(0); i++)
{ {
var result = list.Select(int.Parse).Count(r => r >= array2D[i, 0] && r < array2D[i, 1]); var result = list.Select(int.Parse).Count(r => r >= array2D[i, 0] && r < array2D[i, 1]);
@ -646,7 +582,6 @@ namespace ReportsLibrary
} }
} }
} }
if (StaticMembers.ReportType == rep_type.JOB_TICKETING) if (StaticMembers.ReportType == rep_type.JOB_TICKETING)
{ {
var query = StaticMembers.SpeedingList.GroupBy(n => n.Time, var query = StaticMembers.SpeedingList.GroupBy(n => n.Time,
@ -661,7 +596,6 @@ namespace ReportsLibrary
} }
} }
} }
return ChartDataList; return ChartDataList;
} }
@ -683,12 +617,12 @@ namespace ReportsLibrary
ChartDataList.Add(cd); ChartDataList.Add(cd);
} }
} }
if (StaticMembers.ReportType == rep_type.HIST) if (StaticMembers.ReportType == rep_type.HIST)
{ {
int[,] array2D = new int[,] { { 0, 40 }, { 40, 70 }, { 70, 90 }, { 90, 400 } }; int[,] array2D = new int[,] { { 0, 40 }, { 40, 70 }, { 70, 90 }, { 90, 400 } };
var list = StaticMembers.HistDataReport.Select(x => x.Duration); var list = new List<string>();
foreach (StopData sd in StaticMembers.HistDataReport)
list.Add(sd.Duration);
for (int i = 0; i < array2D.GetLength(0); i++) for (int i = 0; i < array2D.GetLength(0); i++)
{ {
var result = list.Select(int.Parse).Count(r => r >= array2D[i, 0] && r < array2D[i, 1]); var result = list.Select(int.Parse).Count(r => r >= array2D[i, 0] && r < array2D[i, 1]);

View File

@ -77,12 +77,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Reports\BatchHistoryReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Reports\BatchHistoryReport.Designer.cs">
<DependentUpon>BatchHistoryReport.cs</DependentUpon>
</Compile>
<Compile Include="Reports\CalcStops.cs" /> <Compile Include="Reports\CalcStops.cs" />
<Compile Include="Reports\ClassForReports.cs" /> <Compile Include="Reports\ClassForReports.cs" />
<Compile Include="Reports\EndOfDay.cs"> <Compile Include="Reports\EndOfDay.cs">
@ -1150,9 +1144,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Properties\licenses.licx" /> <EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Reports\BatchHistoryReport.resx">
<DependentUpon>BatchHistoryReport.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Reports\EndOfDay.resx"> <EmbeddedResource Include="Reports\EndOfDay.resx">
<DependentUpon>EndOfDay.cs</DependentUpon> <DependentUpon>EndOfDay.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>

View File

@ -28,7 +28,7 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = "SELECT COUNT(value) FROM \"userSettings\" WHERE key=\'radiotype\'"; string command = "select count(value) from \"userSettings\" where key=\'radiotype\'";
object result = null; object result = null;
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
@ -82,7 +82,13 @@ namespace SafeMobileLib
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
resp = cmd.ExecuteScalar().ToString(); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
resp = reader.GetValue(0).ToString();
}
}
} }
} }
} }

View File

@ -1,5 +1,4 @@
using System; using System;
using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using Npgsql; using Npgsql;
@ -19,9 +18,9 @@ namespace SafeMobileLib
public List<StopData> get_ALLAlarm(String glwhere, Boolean is24hours, Boolean isInMile, Boolean DayFirst, Hashtable VehIDHash, Hashtable ZoneIDHash, Hashtable LandIDHash, Hashtable vehicleHT, string milesh, string kmh) public List<StopData> get_ALLAlarm(String glwhere, Boolean is24hours, Boolean isInMile, Boolean DayFirst, Hashtable VehIDHash, Hashtable ZoneIDHash, Hashtable LandIDHash, Hashtable vehicleHT, string milesh, string kmh)
{ {
int sc_id = 0, timeGMT = 0, zone_id = 0, speed = 0, telemetry_id = 0, action = 0, type = 0;
String tmpglwhere = glwhere;
String tmpglwhere = glwhere;
String TimeVal = "";
List<StopData> HistDataReport = new List<StopData>(); List<StopData> HistDataReport = new List<StopData>();
try try
@ -40,25 +39,21 @@ namespace SafeMobileLib
{ {
using (NpgsqlDataReader dr = cmd.ExecuteReader()) using (NpgsqlDataReader dr = cmd.ExecuteReader())
{ {
while (dr.Read()) while (dr.Read())
{ {
TimeVal = dr.GetInt32(1).GetRegionalFormat(is24hours, DayFirst);
sc_id = Convert.ToInt32(dr["sc_id"]); var tmp = new StopData
{
Location = TimeVal,
Duration = "",
Time = "Emergency",
Data = (VehIDHash[dr.GetInt32(0)] != null) ? (String)VehIDHash[dr.GetInt32(0)] : "",
timeGMT = dr.GetInt32(1)
};
if (VehIDHash.ContainsKey(sc_id) && (String)VehIDHash[sc_id] != "") if (tmp.Data != "")
{ HistDataReport.Add(tmp);
timeGMT = Convert.ToInt32(dr["timeGMT"]);
HistDataReport.Add(new StopData
{
Location = timeGMT.GetRegionalFormat(is24hours, DayFirst),
Duration = "",
Time = "Emergency",
Data = (String)VehIDHash[sc_id],
timeGMT = timeGMT
});
}
} }
} }
} }
@ -73,41 +68,32 @@ namespace SafeMobileLib
{ {
while (dr.Read()) while (dr.Read())
{ {
string descStr = ((uint)dr.GetInt32(2) == 1) ? "OUT " : "IN ";
sc_id = Convert.ToInt32(dr["sc_id"]);
if (VehIDHash.ContainsKey(sc_id) && (String)VehIDHash[sc_id] != "") if (dr.GetInt32(4) == 1)
{ {
timeGMT = Convert.ToInt32(dr["timeGMT"]); if (ZoneIDHash[dr.GetInt32(1)] != null)
zone_id = Convert.ToInt32(dr["zone_id"]); descStr = descStr + ((ZoneClass)ZoneIDHash[dr.GetInt32(1)]).Name;
action = Convert.ToInt32(dr["action"]);
type = Convert.ToInt32(dr["type"]);
string descStr = ((uint)action == 1) ? "OUT " : "IN ";
if (type == 1)
{
if (ZoneIDHash[zone_id] != null)
descStr = descStr + ((ZoneClass)ZoneIDHash[zone_id]).Name;
}
else
{
if (LandIDHash[zone_id] != null)
descStr = descStr + ((String)LandIDHash[zone_id]);
}
HistDataReport.Add(new StopData
{
Location = timeGMT.GetRegionalFormat(is24hours, DayFirst),
Duration = descStr,
Time = "Geo-Fence",
Data = (String)VehIDHash[sc_id],
timeGMT = timeGMT
});
} }
else
{
if (LandIDHash[dr.GetInt32(1)] != null)
descStr = descStr + ((String)LandIDHash[dr.GetInt32(1)]);
}
TimeVal = dr.GetInt32(3).GetRegionalFormat(is24hours, DayFirst);
var tmp = new StopData
{
Location = TimeVal,
Duration = descStr,
Time = "Geo-Fence",
Data = (VehIDHash[dr.GetInt32(0)] != null) ? (String)VehIDHash[dr.GetInt32(0)] : "",
timeGMT = dr.GetInt32(3)
};
if (tmp.Data != "")
HistDataReport.Add(tmp);
} }
} }
} }
@ -120,24 +106,17 @@ namespace SafeMobileLib
{ {
while (dr.Read()) while (dr.Read())
{ {
sc_id = Convert.ToInt32(dr["sc_id"]); TimeVal = dr.GetInt32(0).GetRegionalFormat(is24hours, DayFirst);
var tmp = new StopData
if (VehIDHash.ContainsKey(sc_id) && (String)VehIDHash[sc_id] != "")
{ {
timeGMT = Convert.ToInt32(dr["timeGMT"]); Location = TimeVal,
speed = Convert.ToInt32(dr["speed"]); Duration = (isInMile) ? ((int)(dr.GetInt32(2) * 0.621371192)).ToString() + " " + milesh : dr.GetInt32(2).ToString() + " " + kmh,
Time = "Speeding",
Data = (VehIDHash[dr.GetInt32(1)] != null) ? (String)VehIDHash[dr.GetInt32(1)] : "",
HistDataReport.Add(new StopData timeGMT = dr.GetInt32(0)
{ };
Location = timeGMT.GetRegionalFormat(is24hours, DayFirst), if (tmp.Data != "")
Duration = (isInMile) ? ((int)(speed * 0.621371192)).ToString() + " " + milesh : speed.ToString() + " " + kmh, HistDataReport.Add(tmp);
Time = "Speeding",
Data = (String)VehIDHash[sc_id],
timeGMT = timeGMT
});
}
} }
} }
} }
@ -151,31 +130,29 @@ namespace SafeMobileLib
{ {
using (NpgsqlDataReader dr = cmd.ExecuteReader()) using (NpgsqlDataReader dr = cmd.ExecuteReader())
{ {
while (dr.Read()) while (dr.Read())
{ {
String actionName = "";
sc_id = Convert.ToInt32(dr["sc_id"]); if (VehIDHash[dr.GetInt32(0)] != null)
if (VehIDHash.ContainsKey(sc_id) && (String)VehIDHash[sc_id] != "")
{ {
foreach (TelemetryObj obj in ((VehicleForReports)vehicleHT[(String)VehIDHash[dr.GetInt32(0)]]).telemList)
telemetry_id = Convert.ToInt32(dr["telemetry_id"]); if (obj.Id == dr.GetInt32(2)) { actionName = obj.Name; break; }
timeGMT = Convert.ToInt32(dr["timeGMT"]);
// get action name
var list = ((VehicleForReports)vehicleHT[(String)VehIDHash[sc_id]]).telemList;
string actionName = list.Where(x => x.Id == telemetry_id).Select(x => x.Name).FirstOrDefault();
HistDataReport.Add(new StopData
{
Location = timeGMT.GetRegionalFormat(is24hours, DayFirst),
Duration = actionName,
Time = "Telemetry",
Data = (String)VehIDHash[sc_id],
timeGMT = timeGMT
});
} }
TimeVal = dr.GetInt32(1).GetRegionalFormat(is24hours, DayFirst);
var tmp = new StopData
{
Location = TimeVal,
Duration = actionName,
Time = "Telemetry",
Data = (VehIDHash[dr.GetInt32(0)] != null) ? (String)VehIDHash[dr.GetInt32(0)] : "",
timeGMT = dr.GetInt32(1)
};
if (tmp.Data != "")
HistDataReport.Add(tmp);
} }
} }
} }
@ -199,7 +176,6 @@ namespace SafeMobileLib
{ {
List<SpeedData> SpeedingList = new List<SpeedData>(); List<SpeedData> SpeedingList = new List<SpeedData>();
Int32 count50000 = 0; Int32 count50000 = 0;
Int32 sc_id = 0;
try try
{ {
@ -219,27 +195,23 @@ namespace SafeMobileLib
{ {
count50000++; count50000++;
sc_id = Convert.ToInt32(dr["sc_id"]); var tmp = new SpeedData
if (VehIDHash.ContainsKey(sc_id) && (String)VehIDHash[sc_id] != "")
{ {
Name = (VehIDHash[dr.GetInt32(1)] != null) ? (String)VehIDHash[dr.GetInt32(1)] : "",
SpeedingList.Add(new SpeedData Speed = (isInMile) ? ((int)(dr.GetInt32(2) * 0.621371192)).ToString() : dr.GetInt32(2).ToString(),
{ Time = dr.GetInt32(0).TimeOfDayHHMMLocal(!is24hours),
Name = (String)VehIDHash[sc_id], Data = dr.GetInt32(0).GetDTLocalFromSeconds().Date.ToShortDateString(),
Speed = (isInMile) ? ((int)(dr.GetInt32(2) * 0.621371192)).ToString() : dr.GetInt32(2).ToString(), Address = dr.GetString(3),
Time = dr.GetInt32(0).TimeOfDayHHMMLocal(!is24hours), sc_id = dr.GetInt32(1),
Data = dr.GetInt32(0).GetDTLocalFromSeconds().Date.ToShortDateString(), timeGMT = dr.GetInt32(0),
Address = dr.GetString(3), lat = (dr.IsDBNull(4) ? 0 : dr.GetDouble(4)),
sc_id = sc_id, lng = (dr.IsDBNull(5) ? 0 : dr.GetDouble(5))
timeGMT = dr.GetInt32(0), };
lat = (dr.IsDBNull(4) ? 0 : dr.GetDouble(4)),
lng = (dr.IsDBNull(5) ? 0 : dr.GetDouble(5))
});
if (count50000 > 50000) if (tmp.Name != "")
break; SpeedingList.Add(tmp);
}
if (count50000 > 50000) break;
} }
} }
} }
@ -259,13 +231,11 @@ namespace SafeMobileLib
List<LandData> LandList = new List<LandData>(); List<LandData> LandList = new List<LandData>();
String newglwhere = glwhere; String newglwhere = glwhere;
String ToAdd = " type=2 "; String ToAdd = " type=2 ";
if (typ == rep_type.GEOFENC) ToAdd = " type=1 "; if (typ == rep_type.GEOFENC) ToAdd = " type=1 ";
if (newglwhere.Length > 1) if (newglwhere.Length > 1)
newglwhere = newglwhere + " and " + ToAdd; newglwhere = newglwhere + " and " + ToAdd;
else else newglwhere = " where " + ToAdd;
newglwhere = " where " + ToAdd;
try try
{ {
@ -279,41 +249,34 @@ namespace SafeMobileLib
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
int sc_id = 0, zone_id = 0;
using (NpgsqlDataReader dr = cmd.ExecuteReader()) using (NpgsqlDataReader dr = cmd.ExecuteReader())
{ {
while (dr.Read()) while (dr.Read())
{ {
LandData tmp = new LandData();
sc_id = Convert.ToInt32(dr["sc_id"]); if (VehIDHash[dr.GetInt32(0)] != null)
zone_id = Convert.ToInt32(dr["zone_id"]); tmp.Name = (String)VehIDHash[dr.GetInt32(0)];
else tmp.Name = "";
tmp.LandType = ((uint)dr.GetInt32(2) == 1) ? "OUT" : "IN";
if (VehIDHash.ContainsKey(sc_id) && (String)VehIDHash[sc_id] != "") tmp.Time = dr.GetInt32(3).GetRegionalFormat(is24hours, DayFirst);
tmp.LandName = dr.GetInt32(0).TimeOfDayHHMMLocal();
if (typ == rep_type.GEOFENC)
{ {
if (ZoneIDHash[dr.GetInt32(1)] != null)
LandData tmp = new LandData(); tmp.LandName = ((ZoneClass)ZoneIDHash[dr.GetInt32(1)]).Name;
tmp.Name = (String)VehIDHash[sc_id];
tmp.LandType = Convert.ToInt32(dr["action"]) == 1 ? "OUT" : "IN";
tmp.Time = Convert.ToInt32(dr["timeGMT"]).GetRegionalFormat(is24hours, DayFirst);
tmp.LandName = sc_id.TimeOfDayHHMMLocal();
if (typ == rep_type.GEOFENC)
{
if (ZoneIDHash[zone_id] != null)
tmp.LandName = ((ZoneClass)ZoneIDHash[zone_id]).Name;
}
else
{
if (LandIDHash[zone_id] != null)
tmp.LandName = (String)LandIDHash[zone_id];
}
LandList.Add(tmp);
} }
else
{
SM.Debug("LandID" + dr.GetInt32(1));
if (LandIDHash[dr.GetInt32(1)] != null)
tmp.LandName = (String)LandIDHash[dr.GetInt32(1)];
}
if (tmp.Name != "")
LandList.Add(tmp);
} }
} }
} }
@ -330,9 +293,8 @@ namespace SafeMobileLib
public List<ONOFFData> get_log_view_all(String glwhere, Boolean is24hours, Boolean DayFirst, Hashtable VehIMEIHash) public List<ONOFFData> get_log_view_all(String glwhere, Boolean is24hours, Boolean DayFirst, Hashtable VehIMEIHash)
{ {
String tmpname = ""; String tmpname = "";
String TimeVal = "";
string Stat = ""; string Stat = "";
string imei = "";
int timeGMT = 0;
List<ONOFFData> ONOFFList = new List<ONOFFData>(); List<ONOFFData> ONOFFList = new List<ONOFFData>();
try try
@ -350,31 +312,35 @@ namespace SafeMobileLib
NpgsqlDataReader dr = cmd.ExecuteReader(); NpgsqlDataReader dr = cmd.ExecuteReader();
while (dr.Read()) while (dr.Read())
{ {
if (VehIMEIHash[dr.GetString(0)] != null) tmpname = (VehIMEIHash[dr.GetString(0)] as String);
imei = dr["imei"].ToString(); else tmpname = "";
timeGMT = Convert.ToInt32(dr["timeGMT"]);
tmpname = "";
if (VehIMEIHash[imei] != null)
tmpname = (VehIMEIHash[imei] as String);
if (tmpname != "") if (tmpname != "")
{ {
TimeVal = dr.GetInt32(1).GetRegionalFormat(is24hours, DayFirst);
switch (dr.GetInt32(2)) switch (dr.GetInt32(2))
{ {
case 0: Stat = "OFF"; break; case 0:
case 1: Stat = "ON"; break; Stat = "OFF";
case 9: Stat = "MADE OFF"; break; break;
case 10: Stat = "MADE ON"; break; case 1:
Stat = "ON";
break;
case 9:
Stat = "MADE OFF";
break;
case 10:
Stat = "MADE ON";
break;
} }
var tmp = new ONOFFData
ONOFFList.Add( new ONOFFData {
{ Name = tmpname,
Name = tmpname, Time = TimeVal,
Time = timeGMT.GetRegionalFormat(is24hours, DayFirst), Status = Stat
Status = Stat };
}); ONOFFList.Add(tmp);
} }
} }
} }
@ -391,8 +357,6 @@ namespace SafeMobileLib
public List<ONOFFData> get_EMERG(String glwhere, Boolean is24hours, Hashtable VehIDHash) public List<ONOFFData> get_EMERG(String glwhere, Boolean is24hours, Hashtable VehIDHash)
{ {
List<ONOFFData> ONOFFList = new List<ONOFFData>(); List<ONOFFData> ONOFFList = new List<ONOFFData>();
int timeGMT = 0, sc_id = 0;
try try
{ {
using (NpgsqlConnection connection = new NpgsqlConnection()) using (NpgsqlConnection connection = new NpgsqlConnection())
@ -406,30 +370,21 @@ namespace SafeMobileLib
{ {
using (NpgsqlDataReader dr = cmd.ExecuteReader()) using (NpgsqlDataReader dr = cmd.ExecuteReader())
{ {
string formatDateTime = is24hours ? "MM/dd/yyyy HH:mm:ss" : "MM/dd/yyyy hh:mm:ss tt";
while (dr.Read()) while (dr.Read())
{ {
sc_id = Convert.ToInt32(dr["sc_id"]); var tmp = new ONOFFData
if (VehIDHash.ContainsKey(sc_id) && (String)VehIDHash[sc_id] != "")
{ {
Name = (VehIDHash[dr.GetInt32(1)] != null) ? (String)VehIDHash[dr.GetInt32(1)] : "",
Time = (is24hours) ? (dr.GetInt32(0).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy HH:mm:ss") : (dr.GetInt32(0).GetDTLocalFromSeconds()).ToString("MM/dd/yyyy hh:mm:ss tt"),
Status = dr.GetString(2),
sc_id = dr.GetInt32(1),
lat = dr.GetDouble(3),
lng = dr.GetDouble(4),
timeGMT = dr.GetInt32(0)
};
timeGMT = Convert.ToInt32(dr["timegmt"]); if (tmp.Name != "")
ONOFFList.Add(tmp);
ONOFFList.Add( new ONOFFData
{
Name = (String)VehIDHash[sc_id],
Time = timeGMT.GetDTLocalFromSeconds().ToString(formatDateTime),
Status = dr["address"].ToString(),
sc_id = sc_id,
lat = Convert.ToDouble(dr["lat"]),
lng = Convert.ToDouble(dr["lng"]),
timeGMT = timeGMT
});
}
} }
} }
} }
@ -443,179 +398,6 @@ namespace SafeMobileLib
return ONOFFList; return ONOFFList;
} }
private BatchHistoryData GetData(NpgsqlDataReader dr, bool isInMile, bool is24hours, bool getAddress = false)
{
int timegmt = 0;
double lat = 0, lng = 0;
BatchHistoryData batchHistObj = null;
try
{
lat = Convert.ToDouble(dr["lat"]);
lng = Convert.ToDouble(dr["lng"]);
timegmt = Convert.ToInt32(dr["timegmt"]);
batchHistObj = new BatchHistoryData
{
Department = dr["department"].ToString(),
Unit = dr["unit"].ToString(),
Location = ((getAddress && dr["address"] != DBNull.Value) ? dr["address"].ToString() : "LAT:" + Math.Round(lat, 5).ToString() + " , LNG:" + Math.Round(lat, 5).ToString()),
Speed = (isInMile) ? ((int)(Convert.ToInt32(dr["speed"]) * 0.621371192)).ToString() : Convert.ToInt32(dr["speed"]).ToString(),
Lat = lat,
Lng = lng,
Address = dr["address"].ToString(),
Time = timegmt.TimeOfDayHHMMSSLocal(!is24hours),
Date = timegmt.GetDTLocalFromSeconds().Date.ToShortDateString()
};
}
catch (Exception ex)
{
Console.WriteLine(ex.Message, ConsoleColor.Red);
}
return batchHistObj;
}
private string FormatCommandBatchHistory(string sc_ids, int startdate, int enddate, bool isInMile, bool is24hours, int limit = Int32.MaxValue, bool getAddress = false, bool getOnlyValidPositions = false)
{
string address = "";
string join_getiing_address = "";
string onlyValidPositions = "";
if (getAddress)
{
address = ",a.address";
join_getiing_address = "LEFT JOIN address a ON a.lat = ROUND(z.lat::numeric, 4) AND a.lng = ROUND(z.lng::numeric, 4) ";
}
if (getOnlyValidPositions)
{
onlyValidPositions = " AND m.lat <> 0.0 AND m.lng <> 0.0 ";
}
string command = $" SELECT x.grp_name as department, x.veh_name as unit, z.lat, z.lng, z.timegmt, z.speed {address} " +
" FROM " +
" (SELECT m.sc_id, m.timegmt, m.lat, m.lng, m.speed " +
" FROM messages m " +
$" WHERE m.timegmt BETWEEN {startdate} AND {enddate} " +
$" {onlyValidPositions}" +
$" AND m.sc_id IN ({sc_ids}) { (limit != Int32.MaxValue ? $"LIMIT {limit}" : "")} " +
" )z " +
" INNER JOIN " +
" ( " +
" SELECT sh.sc_id, v.name as veh_name, g.name as grp_name " +
$" FROM (SELECT * FROM subscriber_history WHERE sc_id IN ({sc_ids})) sh " +
" INNER JOIN vehicle v ON v.id = sh.veh_id " +
" INNER JOIN vehicle_group vg ON sh.sc_id = vg.sc_id " +
" INNER JOIN groups g ON vg.grp_ip = g.id " +
" ) x ON z.sc_id = x.sc_id " +
$"{join_getiing_address}" +
" ORDER BY x.grp_name, x.veh_name, z.timegmt ";
return command;
}
public List<BatchHistoryData> getBatchHistory(string sc_ids, int startdate, int enddate , bool isInMile, bool is24hours, int limit = Int32.MaxValue, bool getAddress = false, bool getOnlyValidPositions = false)
{
var list = new List<BatchHistoryData>();
using (NpgsqlConnection connection = new NpgsqlConnection())
{
connection.ConnectionString = getConnectionString();
connection.Open();
string command = FormatCommandBatchHistory(sc_ids, startdate, enddate, isInMile, is24hours, limit, getAddress, getOnlyValidPositions);
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{
cmd.CommandTimeout = 1200;
using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
BatchHistoryData data = GetData(dr, isInMile, is24hours, getAddress);
list.Add(data);
}
}
}
}
return list;
}
public void saveBatchHistoryToCsv(string filePath, List<string> excludeColumns, string sc_ids, int startdate, int enddate, bool isInMile, bool is24hours, int limit = Int32.MaxValue, bool getAddress = false, bool getOnlyValidPositions = false)
{
using (NpgsqlConnection connection = new NpgsqlConnection())
{
connection.ConnectionString = getConnectionString();
connection.Open();
string command = FormatCommandBatchHistory(sc_ids, startdate, enddate, isInMile, is24hours, limit, getAddress, getOnlyValidPositions);
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{
cmd.CommandTimeout = 1200;
using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
// Being a huge report we get record by record and save them into file (without keep them).
using (System.IO.StreamWriter sw = new System.IO.StreamWriter(filePath, false))
{
//================
// write header
//================
Utils.HeaderToCsv<BatchHistoryData>(sw, excludeColumns);
while (dr.Read())
{
//================
// write rows
//================
BatchHistoryData data = GetData(dr, isInMile, is24hours, getAddress);
Utils.RowToCsv<BatchHistoryData>(sw, data, excludeColumns);
}
}
}
}
}
}
public List<StopData> get_History(String glwhere, Boolean compAddress, Boolean forceLATLNG, Boolean is24hours, Boolean isInMile, ref int cntaddr, ref Queue AddrGISQueue, ref Hashtable IdReportHS) public List<StopData> get_History(String glwhere, Boolean compAddress, Boolean forceLATLNG, Boolean is24hours, Boolean isInMile, ref int cntaddr, ref Queue AddrGISQueue, ref Hashtable IdReportHS)
{ {
List<StopData> HistDataReport = new List<StopData>(); List<StopData> HistDataReport = new List<StopData>();
@ -624,33 +406,25 @@ namespace SafeMobileLib
{ {
using (NpgsqlConnection connection = new NpgsqlConnection()) using (NpgsqlConnection connection = new NpgsqlConnection())
{ {
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = "SELECT timeGMT,address,speed,lat,lng,scevtime, sc_id, W.name, W.driver_id FROM messages " + string command = "SELECT timeGMT,address,speed,lat,lng,scevtime, sc_id, W.name, W.driver_id FROM messages " +
$" INNER JOIN vehicle W on sc_id = W.id {glwhere} ORDER BY timeGMT DESC"; $" INNER JOIN vehicle W on sc_id = W.id {glwhere} ORDER BY timeGMT DESC";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
cmd.CommandTimeout = 1200;
using (NpgsqlDataReader dr = cmd.ExecuteReader()) using (NpgsqlDataReader dr = cmd.ExecuteReader())
{ {
while (dr.Read()) while (dr.Read())
{ {
double lat = Convert.ToDouble(dr["lat"]);
double lng = Convert.ToDouble(dr["lng"]);
String Address = ""; String Address = "";
latlng = "LAT:" + Math.Round(lat, 5).ToString() + " , LNG:" + Math.Round(lat, 5).ToString(); latlng = "LAT:" + Math.Round(dr.GetDouble(3), 5).ToString() + " , LNG:" + Math.Round(dr.GetDouble(4), 5).ToString();
if (!forceLATLNG) if (!forceLATLNG)
{ {
if (!dr.IsDBNull(1)) if (!dr.IsDBNull(1)) Address = dr.GetString(1);
Address = dr["address"].ToString(); if ((dr.GetDouble(3) == 0) || (dr.GetDouble(4) == 0)) Address = "NO GPS FIX";
if ((lat == 0.0) || (lng == 0.0))
Address = "NO GPS FIX";
else if ((Address == "") || (Address == " ")) else if ((Address == "") || (Address == " "))
{ {
@ -658,26 +432,24 @@ namespace SafeMobileLib
{ {
cntaddr++; cntaddr++;
IdReportHS[cntaddr.ToString()] = string.Format("no address ({0})", latlng); IdReportHS[cntaddr.ToString()] = string.Format("no address ({0})", latlng);
AddrGISQueue.Enqueue(new AddrAndID(cntaddr, lat, lng)); AddrGISQueue.Enqueue(new AddrAndID(cntaddr, dr.GetDouble(3), dr.GetDouble(4)));
Address = cntaddr.ToString(); Address = cntaddr.ToString();
} }
else Address = latlng; else Address = latlng;
} }
} }
else else Address = "LAT:" + Math.Round(dr.GetDouble(3), 5).ToString() + " , LNG:" + Math.Round(dr.GetDouble(4), 5).ToString();
Address = latlng; var tmp = new StopData
{
Location = Address,
HistDataReport.Add(new StopData Duration = (isInMile) ? ((int)(dr.GetInt32(2) * 0.621371192)).ToString() : dr.GetInt32(2).ToString(),
{ Time = dr.GetInt32(0).TimeOfDayHHMMSSLocal(!is24hours),
Location = Address, Data = (dr.GetInt32(0).GetDTLocalFromSeconds()).Date.ToShortDateString(),
Duration = (isInMile) ? ((int)(Convert.ToInt32(dr["speed"]) * 0.621371192)).ToString() : Convert.ToInt32(dr["speed"]).ToString(), unit_sc_id = dr.GetInt32(6),
Time = Convert.ToInt32(dr["timeGMT"]).TimeOfDayHHMMSSLocal(!is24hours), unit_name = dr.GetString(7),
Data = (Convert.ToInt32(dr["timeGMT"]).GetDTLocalFromSeconds()).Date.ToShortDateString(), unique_id = dr.GetDouble(5)
unit_sc_id = Convert.ToInt32(dr["sc_id"]), };
unit_name = dr["name"].ToString(), HistDataReport.Add(tmp);
unique_id = Convert.ToDouble(dr["scevtime"])
});
} }
} }
} }
@ -692,7 +464,6 @@ namespace SafeMobileLib
return HistDataReport; return HistDataReport;
} }
public List<SpeedData> get_TelemHist_alarm_event(String glwhere, Hashtable VehIDHash, Hashtable vehicleHT) public List<SpeedData> get_TelemHist_alarm_event(String glwhere, Hashtable VehIDHash, Hashtable vehicleHT)
{ {
List<SpeedData> SpeedingList = new List<SpeedData>(); List<SpeedData> SpeedingList = new List<SpeedData>();
@ -710,38 +481,33 @@ namespace SafeMobileLib
{ {
using (NpgsqlDataReader dr = cmd.ExecuteReader()) using (NpgsqlDataReader dr = cmd.ExecuteReader())
{ {
int timeGMT = 0, sc_id = 0, telemetry_id = 0;
while (dr.Read()) while (dr.Read())
{ {
String actionName = "";
sc_id = Convert.ToInt32(dr["sc_id"]); if (VehIDHash[dr.GetInt32(1)] != null)
if (VehIDHash.ContainsKey(sc_id) && (String)VehIDHash[sc_id] != "")
{ {
foreach (TelemetryObj obj in ((VehicleForReports)vehicleHT[(String)VehIDHash[dr.GetInt32(1)]]).telemList)
timeGMT = Convert.ToInt32(dr["timegmt"]); if (obj.Id == dr.GetInt32(2))
telemetry_id = Convert.ToInt32(dr["telemetry_id"]); {
actionName = obj.Name;
// get action name break;
var list = ((VehicleForReports)vehicleHT[(String)VehIDHash[sc_id]]).telemList; }
string actionName = list.Where(x => x.Id == telemetry_id).Select(x => x.Name).FirstOrDefault();
SpeedingList.Add(new SpeedData
{
Name = (String)VehIDHash[sc_id],
Speed = actionName,
Time = timeGMT.TimeOfDayHHMMSSLocal(false),
Data = (timeGMT.GetDTLocalFromSeconds()).Date.ToShortDateString(),
Address = dr["address"].ToString(),
sc_id = sc_id,
timeGMT = timeGMT,
lat = Convert.ToDouble(dr["lat"]),
lng = Convert.ToDouble(dr["lng"])
});
} }
var tmp = new SpeedData
{
Name = (VehIDHash[dr.GetInt32(1)] != null) ? (String)VehIDHash[dr.GetInt32(1)] : "",
Speed = actionName,
Time = dr.GetInt32(0).TimeOfDayHHMMSSLocal(false),
Data = (dr.GetInt32(0).GetDTLocalFromSeconds()).Date.ToShortDateString(),
Address = dr.GetString(3),
sc_id = dr.GetInt32(1),
timeGMT = dr.GetInt32(0),
lat = dr.GetDouble(4),
lng = dr.GetDouble(5)
};
if (tmp.Name != "")
SpeedingList.Add(tmp);
} }
} }
} }
@ -773,32 +539,22 @@ namespace SafeMobileLib
{ {
using (NpgsqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)) using (NpgsqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection))
{ {
int sc_id = 0, timeGMT = 0;
while (dr.Read()) while (dr.Read())
{ {
sc_id = Convert.ToInt32(dr["sc_id_sour"]); var tmp = new SMS_Location
if (VehIDHash.ContainsKey(sc_id) && (String)VehIDHash[sc_id] != "")
{ {
Name = (VehIDHash[dr.GetInt32(1)] != null) ? (String)VehIDHash[dr.GetInt32(1)] : "",
timeGMT = Convert.ToInt32(dr["timeGMT"]); Text_mess = dr.GetString(2),
Time = dr.GetInt32(0).TimeOfDayHHMMLocal(!is24hours),
SMSLocList.Add(new SMS_Location Data = (dr.GetInt32(0).GetDTLocalFromSeconds()).Date.ToShortDateString(),
{ Address = dr.GetString(3),
Name = (String)VehIDHash[sc_id], sc_id = dr.GetInt32(1),
Text_mess = dr["mess"].ToString(), timeGMT = dr.GetInt32(0),
Time = timeGMT.TimeOfDayHHMMLocal(!is24hours), lat = dr.GetDouble(4),
Data = (timeGMT.GetDTLocalFromSeconds()).Date.ToShortDateString(), lng = dr.GetDouble(5)
Address = dr["address"].ToString(), };
sc_id = sc_id, if (tmp.Name != "")
timeGMT = timeGMT, SMSLocList.Add(tmp);
lat = Convert.ToDouble(dr["lat"]),
lng = Convert.ToDouble(dr["lng"])
});
}
} }
} }
} }
@ -847,13 +603,12 @@ namespace SafeMobileLib
{ {
var tmp = new SpeedData var tmp = new SpeedData
{ {
Name = dr["name"].ToString(), Name = dr.GetString(0),
Speed = dr["ticket_id"].ToString(), Speed = dr.GetInt32(1).ToString(),
Time = dr["status"].ToString(), Time = dr.GetString(2),
Data = (dr["start_time"].ToString() == "") ? "" : Convert.ToInt32(dr["start_time"]).GetDTLocalFromSeconds().Date.ToShortDateString(), Data = (dr.GetValue(3).ToString() == "") ? "" : dr.GetInt32(3).GetDTLocalFromSeconds().Date.ToShortDateString(),
Address = (dr["end_time"].ToString() == "") ? "" : Convert.ToInt32(dr["end_time"]).GetDTLocalFromSeconds().Date.ToShortDateString(), Address = (dr.GetValue(4).ToString() == "") ? "" : dr.GetInt32(4).GetDTLocalFromSeconds().Date.ToShortDateString(),
}; };
if (tmp.Name != "") if (tmp.Name != "")
SpeedingList.Add(tmp); SpeedingList.Add(tmp);
} }
@ -895,19 +650,18 @@ namespace SafeMobileLib
while (dr.Read()) while (dr.Read())
{ {
int seconds = 0; int seconds = 0;
string value = dr["value"].ToString(); string value = dr.GetString(1);
Int32.TryParse(value, out seconds); Int32.TryParse(value, out seconds);
DateTime DT = DateTime.Today.AddSeconds(seconds); DateTime DT = DateTime.Today.AddSeconds(seconds);
var tmp = new UserReportTime
{
UserReportTimeList.Add(new UserReportTime UserID = dr.GetInt32(0),
{ UserName = dr.GetString(2),
UserID = Convert.ToInt32(dr["user_id"]), HH = DT.Hour,
UserName = dr["login"].ToString(), MM = DT.Minute,
HH = DT.Hour, ReportExecuted = false
MM = DT.Minute, };
ReportExecuted = false UserReportTimeList.Add(tmp);
});
} }
} }
} }
@ -946,15 +700,10 @@ namespace SafeMobileLib
{ {
while (dr.Read()) while (dr.Read())
{ {
string address = dr.IsDBNull(1) ? "" : dr.GetString(1);
double lat = Convert.ToDouble(dr["lat"]); if ((dr.GetDouble(2) != 0) && (dr.GetDouble(3) != 0))
double lng = Convert.ToDouble(dr["lng"]); ret.Add(new PositionData(dr.GetDouble(2), dr.GetDouble(3), address, dr.GetInt32(0), car_state_e.CAR_RUNNING, dr.GetInt32(5)));
string address = dr.IsDBNull(1) ? "" : dr["address"].ToString();
int speed = Convert.ToInt32(dr["speed"]);
int timeGMT = Convert.ToInt32(dr["timeGMT"]);
if (lat != 0 && lng != 0)
ret.Add(new PositionData(lat, lng, address, timeGMT, car_state_e.CAR_RUNNING, speed));
} }
} }
} }

View File

@ -35,8 +35,14 @@ namespace SafeMobileLib
string command = "SELECT value FROM sequences where name = 'jobticketing'"; string command = "SELECT value FROM sequences where name = 'jobticketing'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
using (NpgsqlDataReader Reader = cmd.ExecuteReader())
{
while (Reader.Read())
{
ticket_id = Convert.ToInt32(cmd.ExecuteScalar()); ticket_id = Convert.ToInt32(Reader.GetValue(0).ToString());
}
}
} }
if (ticket_id == -1) if (ticket_id == -1)
@ -94,13 +100,26 @@ namespace SafeMobileLib
string command = $"SELECT sc_id FROM subscriber WHERE imei='{imei}'"; string command = $"SELECT sc_id FROM subscriber WHERE imei='{imei}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
sc_id = dr.GetInt32(0);
}
}
} }
command = "SELECT status_id from jobticketstatusesset where is_first_state = 1"; command = "SELECT status_id from jobticketstatusesset where is_first_state = 1";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
job_status = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
job_status = dr.GetInt32(0);
}
}
} }
@ -191,7 +210,7 @@ namespace SafeMobileLib
public sqlResponse insert_ticket_response(String imei, string mess) public sqlResponse insert_ticket_response(String imei, string mess)
{ {
sqlResponse resp = sqlResponse.SQLerror; sqlResponse resp = sqlResponse.SQLerror;
//InitConnection(); InitConnection();
Int32 status_id = 0; Int32 status_id = 0;
Int32 sc_id = 0; Int32 sc_id = 0;
@ -207,9 +226,15 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
using (NpgsqlCommand cmd = new NpgsqlCommand($"SELECT sc_id from subscriber where imei='{imei}' LIMIT 1", connection)) using (NpgsqlCommand cmd = new NpgsqlCommand($"SELECT sc_id from subscriber where imei='{imei}'", connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
sc_id = dr.GetInt32(0);
}
}
} }
@ -1024,7 +1049,7 @@ namespace SafeMobileLib
public TicketResponse deleteTicketingStatus(string ticketStatus) public TicketResponse deleteTicketingStatus(string ticketStatus)
{ {
//TODO before delete ticket status check job ticketing transactions //TODO before delete ticket status check job ticketing transactions
//InitConnection(); InitConnection();
TicketResponse resp; TicketResponse resp;
Int32 status_id = -1; Int32 status_id = -1;
@ -1041,9 +1066,14 @@ namespace SafeMobileLib
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
status_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader Reader = cmd.ExecuteReader())
{
while (Reader.Read())
{
status_id = Reader.GetInt32(0);
}
}
} }
if (status_id > -1) if (status_id > -1)
{ {
command = "SELECT COUNT(job_status) FROM jobtickets WHERE job_status =\'" + status_id + "\'"; command = "SELECT COUNT(job_status) FROM jobtickets WHERE job_status =\'" + status_id + "\'";
@ -1146,7 +1176,13 @@ namespace SafeMobileLib
string command = "SELECT status_id FROM jobticketstatusesset WHERE status=\'" + ticketStatus + "\'"; string command = "SELECT status_id FROM jobticketstatusesset WHERE status=\'" + ticketStatus + "\'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
status_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader Reader = cmd.ExecuteReader())
{
while (Reader.Read())
{
status_id = Convert.ToInt32(Reader.GetValue(0).ToString());
}
}
} }
} }
} }

View File

@ -33,7 +33,14 @@ namespace SafeMobileLib
string command = "SELECT sc_id from subscriber where imei='" + radioID.ToString() + "'"; string command = "SELECT sc_id from subscriber where imei='" + radioID.ToString() + "'";
using (cmd = new NpgsqlCommand(command, connection)) using (cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
sc_id = dr.GetInt32(0);
}
dr.Close();
}
} }
command = " SELECT id, emergency, landmark, \"zone\" ,loneworker,speed,email,empopup,emsound,geopopup,geosound,speedpopup,speedsound,telempopup,telemsound FROM subscriber_alarm " + command = " SELECT id, emergency, landmark, \"zone\" ,loneworker,speed,email,empopup,emsound,geopopup,geosound,speedpopup,speedsound,telempopup,telemsound FROM subscriber_alarm " +
@ -46,6 +53,7 @@ namespace SafeMobileLib
{ {
alarmRet = new Alarm(Reader.GetInt32(0), sc_id, Reader.GetString(1), Reader.GetString(2), Reader.GetString(3), Reader.GetString(4), Reader.GetString(5), Reader.GetString(6), Reader.GetBoolean(7), Reader.GetBoolean(8), Reader.GetBoolean(9), Reader.GetBoolean(10), Reader.GetBoolean(11), Reader.GetBoolean(12), Reader.GetBoolean(13), Reader.GetBoolean(14)); alarmRet = new Alarm(Reader.GetInt32(0), sc_id, Reader.GetString(1), Reader.GetString(2), Reader.GetString(3), Reader.GetString(4), Reader.GetString(5), Reader.GetString(6), Reader.GetBoolean(7), Reader.GetBoolean(8), Reader.GetBoolean(9), Reader.GetBoolean(10), Reader.GetBoolean(11), Reader.GetBoolean(12), Reader.GetBoolean(13), Reader.GetBoolean(14));
} }
Reader.Close();
} }
} }
} }
@ -73,18 +81,24 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
using (NpgsqlCommand cmd = new NpgsqlCommand("SELECT imei,status FROM lastpos", connection)) string command = "SELECT imei,status FROM lastpos";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
using (NpgsqlDataReader reader = cmd.ExecuteReader()) using (NpgsqlDataReader reader = cmd.ExecuteReader())
{ {
while (reader.Read()) while (reader.Read())
{ {
try
string imei = (reader["imei"] != DBNull.Value) ? reader["imei"].ToString() : ""; {
if (imei != "" && ret.ContainsKey(imei)) ret.Add(reader.GetString(0), reader.GetInt32(1));
ret.Add(imei, reader.GetInt32(1)); }
catch (Exception ex)
{
Console.WriteLine("Error on add to hash SystemPosition:" + ex.ToString());
}
} }
reader.Close();
} }
} }
} }
@ -123,6 +137,7 @@ namespace SafeMobileLib
{ {
alarmRet = new Alarm(Reader.GetInt32(0), sc_id, Reader.GetString(1), Reader.GetString(2), Reader.GetString(3), Reader.GetString(4), Reader.GetString(5), Reader.GetString(6), Reader.GetBoolean(7), Reader.GetBoolean(8), Reader.GetBoolean(9), Reader.GetBoolean(10), Reader.GetBoolean(11), Reader.GetBoolean(12), Reader.GetBoolean(13), Reader.GetBoolean(14)); alarmRet = new Alarm(Reader.GetInt32(0), sc_id, Reader.GetString(1), Reader.GetString(2), Reader.GetString(3), Reader.GetString(4), Reader.GetString(5), Reader.GetString(6), Reader.GetBoolean(7), Reader.GetBoolean(8), Reader.GetBoolean(9), Reader.GetBoolean(10), Reader.GetBoolean(11), Reader.GetBoolean(12), Reader.GetBoolean(13), Reader.GetBoolean(14));
} }
Reader.Close();
} }
} }
} }
@ -193,10 +208,17 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = $"SELECT sc_id FROM subscriber where imei='{radioID}' LIMIT 1"; string command = $"SELECT sc_id from subscriber where imei='{radioID}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
sc_id = reader.GetInt32(0);
}
reader.Close();
}
} }
@ -236,10 +258,17 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = $"SELECT sc_id from subscriber where imei='{radioID}' LIMIT 1"; string command = $"SELECT sc_id from subscriber where imei='{radioID}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
sc_id = reader.GetInt32(0);
}
reader.Close();
}
} }
int i = 0; int i = 0;
@ -281,30 +310,56 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = $"SELECT sc_id FROM subscriber WHERE imei='{radioID}' LIMIT 1"; string command = $"SELECT sc_id from subscriber where imei='{radioID}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
sc_id = reader.GetInt32(0);
}
reader.Close();
}
} }
command = "SELECT idx FROM place WHERE name='Landmark1'"; command = "SELECT idx from place where name='Landmark1'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
idxL1 = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
idxL1 = reader.GetInt32(0);
}
reader.Close();
}
} }
command = "SELECT idx FROM place WHERE name='Landmark2'"; command = "SELECT idx from place where name='Landmark2'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
idxL2 = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
idxL2 = reader.GetInt32(0);
}
reader.Close();
}
} }
command = "SELECT idx FROM zonename WHERE name='testZone1'"; command = "SELECT idx from zonename where name='testZone1'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
using (NpgsqlDataReader reader = cmd.ExecuteReader())
idxGeo = Convert.ToInt32(cmd.ExecuteScalar()); {
while (reader.Read())
{
idxGeo = reader.GetInt32(0);
}
reader.Close();
}
} }
// get ID for landmark1,2 and zone1 // get ID for landmark1,2 and zone1
@ -479,11 +534,18 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = $"SELECT sc_id FROM subscriber WHERE imei='{radioID}' LIMIT 1"; string command = $"SELECT sc_id FROM subscriber WHERE imei='{radioID}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
sc_id = reader.GetInt32(0);
}
reader.Close();
}
} }
command = $"DELETE FROM \"subscriber_alarm\" WHERE sc_id = {sc_id} "; command = $"DELETE FROM \"subscriber_alarm\" WHERE sc_id = {sc_id} ";
@ -559,10 +621,17 @@ namespace SafeMobileLib
connection.Open(); connection.Open();
//get sc_id from imei/radioID //get sc_id from imei/radioID
string command = $"SELECT sc_id FROM subscriber WHERE imei='{radioID}' LIMIT 1"; string command = $"SELECT sc_id FROM subscriber WHERE imei='{radioID}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
p_sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
p_sc_id = reader.GetInt32(0);
}
reader.Close();
}
} }
string emergTime = DateTime.Now.ToUniversalTime().DateTo70Format() + ""; string emergTime = DateTime.Now.ToUniversalTime().DateTo70Format() + "";
@ -613,7 +682,14 @@ namespace SafeMobileLib
string command = $"SELECT sc_id FROM subscriber WHERE imei='{radioID}'"; string command = $"SELECT sc_id FROM subscriber WHERE imei='{radioID}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, conn)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, conn))
{ {
p_sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
p_sc_id = dr.GetInt32(0);
}
dr.Close();
}
} }
command = "INSERT INTO speedalarm (sc_id,timeGMT,speed,preview,address,lat,lng) " + command = "INSERT INTO speedalarm (sc_id,timeGMT,speed,preview,address,lat,lng) " +
@ -636,7 +712,7 @@ namespace SafeMobileLib
{ {
Utils.WriteLine(o.ToString(), ConsoleColor.Red); Utils.WriteLine(o.ToString(), ConsoleColor.Red);
} }
conn.Close();
} }
} }
catch (Exception ex) catch (Exception ex)
@ -677,7 +753,7 @@ namespace SafeMobileLib
} }
resp = sqlResponse.done; resp = sqlResponse.done;
conn.Close();
} }
} }
catch (Exception ex) catch (Exception ex)
@ -708,7 +784,7 @@ namespace SafeMobileLib
} }
String idx = string.Empty; String idx = string.Empty;
query = "SELECT MAX(idx) FROM zonename"; query = "SELECT max(idx) from zonename";
using (NpgsqlCommand cmd = new NpgsqlCommand(query, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(query, connection))
{ {
idx = ((Int32)cmd.ExecuteScalar()).ToString(); idx = ((Int32)cmd.ExecuteScalar()).ToString();
@ -757,10 +833,17 @@ namespace SafeMobileLib
connection.Open(); connection.Open();
string command = $"SELECT sc_id FROM subscriber where imei='{imei}' LIMIT 1"; string command = $"select sc_id from subscriber where imei='{imei}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
sc_id = dr.GetInt32(0);
}
dr.Close();
}
} }
@ -923,7 +1006,7 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = "SELECT name,lat,lng,idx, useridx, callout, callout_severity FROM place ORDER BY name"; string command = "SELECT name,lat,lng,idx, useridx, callout, callout_severity from PLACE ORDER BY name";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
@ -964,7 +1047,7 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = $"SELECT COUNT(sc_id) FROM emergalarm WHERE preview = 0 and sc_id = {sc_id} "; string command = $"SELECT count(sc_id) FROM emergalarm WHERE preview = 0 and sc_id = {sc_id} ";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {

View File

@ -143,7 +143,25 @@ namespace SafeMobileLib
} }
public void InitConnectionHistoryReport()
{
cn = new NpgsqlConnection();
cn.ConnectionString = getConnectionString();
try
{
if (cn != null && cn.State == System.Data.ConnectionState.Closed)
cn.Open();
}
catch (Exception o)
{
if (cn != null)
{
cn.Close();
}
throw new ArgumentException(o.Message.ToString());
}
}
public void CloseConnection() public void CloseConnection()
{ {

View File

@ -92,10 +92,30 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
String query = "UPDATE registration SET has_gps = false, has_sms = false, has_ticketing = false, has_reports = false, has_voice = false, has_recordings = false, has_zones = false, has_telemetry = false "; String query = "UPDATE registration SET has_gps = false WHERE true";
cmd = new NpgsqlCommand(query, connection);
cmd.ExecuteNonQuery();
query = "UPDATE registration SET has_sms = false WHERE true";
cmd = new NpgsqlCommand(query, connection);
cmd.ExecuteNonQuery();
query = "UPDATE registration SET has_ticketing = false WHERE true";
cmd = new NpgsqlCommand(query, connection);
cmd.ExecuteNonQuery();
query = "UPDATE registration SET has_reports = false WHERE true";
cmd = new NpgsqlCommand(query, connection);
cmd.ExecuteNonQuery();
query = "UPDATE registration SET has_voice = false WHERE true";
cmd = new NpgsqlCommand(query, connection);
cmd.ExecuteNonQuery();
query = "UPDATE registration SET has_recordings = false WHERE true";
cmd = new NpgsqlCommand(query, connection);
cmd.ExecuteNonQuery();
query = "UPDATE registration SET has_zones = false WHERE true";
cmd = new NpgsqlCommand(query, connection);
cmd.ExecuteNonQuery();
query = "UPDATE registration SET has_telemetry = false WHERE true";
cmd = new NpgsqlCommand(query, connection); cmd = new NpgsqlCommand(query, connection);
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
} }
catch (Exception e) catch (Exception e)
@ -177,25 +197,25 @@ namespace SafeMobileLib
public uint getReportsCount() public uint getReportsCount()
{ {
string command = "SELECT count (has_reports) FROM registration WHERE has_reports = true"; string command = "SELECT count (has_reports) FROM registration WHERE has_reports=true";
return (uint)GetInt32Result(command); return (uint)GetInt32Result(command);
} }
public uint getVoiceCount() public uint getVoiceCount()
{ {
string command = "SELECT COUNT (has_voice) FROM registration WHERE has_voice = true"; string command = "SELECT COUNT (has_voice) FROM registration WHERE has_voice=true";
return (uint)GetInt32Result(command); return (uint)GetInt32Result(command);
} }
public uint getZonesCount() public uint getZonesCount()
{ {
string command = "SELECT COUNT (has_zones) FROM registration WHERE has_zones = true"; string command = "SELECT COUNT (has_zones) FROM registration WHERE has_zones=true";
return (uint)GetInt32Result(command); return (uint)GetInt32Result(command);
} }
public uint getTelemetryCount() public uint getTelemetryCount()
{ {
string command = "SELECT COUNT (has_telemetry) FROM registration WHERE has_telemetry = true"; string command = "SELECT COUNT (has_telemetry) FROM registration WHERE has_telemetry=true";
return (uint)GetInt32Result(command); return (uint)GetInt32Result(command);
} }
@ -248,19 +268,19 @@ namespace SafeMobileLib
while (reader.Read()) while (reader.Read())
{ {
SDRegistration reg = new SDRegistration(); SDRegistration reg = new SDRegistration();
reg.ip = reader["ip"].ToString(); reg.ip = reader.GetValue(0).ToString();
reg.gps = Convert.ToBoolean(reader["has_gps"]); reg.gps = (Boolean)reader.GetValue(1);
reg.sms = Convert.ToBoolean(reader["has_sms"]); reg.sms = (Boolean)reader.GetValue(2);
reg.ticketing = Convert.ToBoolean(reader["has_ticketing"]); reg.ticketing = (Boolean)reader.GetValue(3);
reg.reports = Convert.ToBoolean(reader["has_reports"]); reg.reports = (Boolean)reader.GetValue(4);
reg.voice = Convert.ToBoolean(reader["has_voice"]); reg.voice = (Boolean)reader.GetValue(5);
reg.recordings = Convert.ToBoolean(reader["has_recordings"]); reg.recordings = (Boolean)reader.GetValue(6);
reg.zones = Convert.ToBoolean(reader["has_zones"]); reg.zones = (Boolean)reader.GetValue(7);
reg.telemetry = Convert.ToBoolean(reader["has_telemetry"]); reg.telemetry = (Boolean)reader.GetValue(8);
reg.map_type = Convert.ToInt16(reader["map_type"]); Int16 mType = Int16.Parse(reader.GetValue(9).ToString());
reg.map_type = mType;
reg.MapTypeS = "None"; reg.MapTypeS = "None";
switch (reg.map_type) switch (mType)
{ {
case 1: case 1:
reg.MapTypeS = "Google"; reg.MapTypeS = "Google";
@ -275,7 +295,6 @@ namespace SafeMobileLib
reg.MapTypeS = "ArcGIS"; reg.MapTypeS = "ArcGIS";
break; break;
} }
safeDispatches.Add(reg); safeDispatches.Add(reg);
} }
} }

View File

@ -206,9 +206,7 @@ namespace SafeMobileLib
{ {
string key = Reader.GetValue(0).ToString(); string key = Reader.GetValue(0).ToString();
string value = Reader.GetValue(1).ToString(); string value = Reader.GetValue(1).ToString();
resp.Add(key, value);
if (!resp.ContainsKey(key))
resp.Add(key, value);
} }
} }
} }

View File

@ -32,7 +32,13 @@ namespace SafeMobileLib
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
sc_id = reader.GetInt32(0);
}
}
} }
@ -68,10 +74,16 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = $"SELECT sc_id from subscriber where imei='{imei}'"; string command = "SELECT sc_id from subscriber where imei='" + imei + "'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
sc_id = dr.GetInt32(0);
}
}
} }
command = "INSERT INTO sms (timeGMT,sc_id_sour,sc_id_dest,mess,status, email, seq_id) " + command = "INSERT INTO sms (timeGMT,sc_id_sour,sc_id_dest,mess,status, email, seq_id) " +
@ -123,7 +135,13 @@ namespace SafeMobileLib
string command = $"SELECT sc_id from subscriber where imei = '{imei}'"; string command = $"SELECT sc_id from subscriber where imei = '{imei}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
sc_id = dr.GetInt32(0);
}
}
} }
@ -450,7 +468,14 @@ namespace SafeMobileLib
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
status = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
status = reader.GetInt32(0);
}
}
} }
return (status == 2); return (status == 2);

View File

@ -54,7 +54,7 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
command = String.Format("UPDATE lastpos SET status = {0} where imei = '{1}'", status, p_IMEI); command = String.Format("UPDATE lastpos SET status ={0} where imei='{1}'", status, p_IMEI);
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
@ -239,7 +239,13 @@ namespace SafeMobileLib
//get sc_id from imei/radioID //get sc_id from imei/radioID
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
sc_id = dr.GetInt32(0);
}
}
} }
} }
@ -254,8 +260,14 @@ namespace SafeMobileLib
string command = $"SELECT status from subscriber_stun where sc_id={sc_id}"; string command = $"SELECT status from subscriber_stun where sc_id={sc_id}";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
respStatus = dr.GetInt32(0);
}
}
respStatus = Convert.ToInt32(cmd.ExecuteScalar());
} }
} }
@ -309,11 +321,17 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = $"SELECT sc_id from subscriber where imei = '{radioID}'"; string command = $"SELECT sc_id from subscriber where imei='{radioID}'";
//get sc_id from imei/radioID //get sc_id from imei/radioID
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
sc_id = dr.GetInt32(0);
}
}
} }

View File

@ -550,7 +550,13 @@ namespace SafeMobileLib
using (NpgsqlCommand cmd = new NpgsqlCommand("SELECT sc_id FROM subscriber where imei='" + radioID + "'", connection)) using (NpgsqlCommand cmd = new NpgsqlCommand("SELECT sc_id FROM subscriber where imei='" + radioID + "'", connection))
{ {
sc_id = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader Reader = cmd.ExecuteReader())
{
while (Reader.Read())
{
sc_id = Reader.GetInt32(0);
}
}
} }
} }
} }

View File

@ -140,7 +140,7 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
using (NpgsqlCommand cmd = new NpgsqlCommand($"SELECT COUNT(*) FROM zonename WHERE useridx = {userID}", connection)) using (NpgsqlCommand cmd = new NpgsqlCommand("SELECT COUNT(*) FROM zonename WHERE useridx=" + userID, connection))
{ {
resp = Convert.ToInt32((object)cmd.ExecuteScalar()); resp = Convert.ToInt32((object)cmd.ExecuteScalar());
} }
@ -167,7 +167,7 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
using (NpgsqlCommand cmd = new NpgsqlCommand($"SELECT COUNT(*) FROM place WHERE useridx = {userID}", connection)) using (NpgsqlCommand cmd = new NpgsqlCommand("SELECT COUNT(*) FROM place WHERE useridx=" + userID, connection))
{ {
resp = Convert.ToInt32((object)cmd.ExecuteScalar()); resp = Convert.ToInt32((object)cmd.ExecuteScalar());
} }
@ -195,12 +195,12 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
using (NpgsqlCommand cmd = new NpgsqlCommand($"UPDATE zonename SET useridx = {newUserID} WHERE useridx = {userID}", connection)) using (NpgsqlCommand cmd = new NpgsqlCommand($"UPDATE zonename SET useridx={newUserID} WHERE useridx=" + userID, connection))
{ {
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
using (NpgsqlCommand cmd = new NpgsqlCommand($"UPDATE place SET useridx = {newUserID} WHERE useridx = {userID}", connection)) using (NpgsqlCommand cmd = new NpgsqlCommand($"UPDATE place SET useridx={newUserID} WHERE useridx=" + userID, connection))
{ {
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
@ -284,8 +284,8 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = " SELECT firstName, lastName, login, password, userId, user_type, backup_user_id " + string command = "SELECT firstName, lastName, login, password, userId, user_type, backup_user_id " +
" FROM users where userid <> 0 ORDER BY login"; " FROM users where userid <> 0 ORDER by login";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
using (NpgsqlDataReader Reader = cmd.ExecuteReader()) using (NpgsqlDataReader Reader = cmd.ExecuteReader())
@ -309,7 +309,6 @@ namespace SafeMobileLib
{ {
uType = USERTYPE.LiteDispatcher; uType = USERTYPE.LiteDispatcher;
} }
User usr = new User() User usr = new User()
{ {
UType = uType, UType = uType,
@ -320,7 +319,6 @@ namespace SafeMobileLib
Id = Convert.ToInt32(Reader.GetValue(4)), Id = Convert.ToInt32(Reader.GetValue(4)),
BackupUserId = Convert.ToInt32(Reader.GetValue(6)) BackupUserId = Convert.ToInt32(Reader.GetValue(6))
}; };
userList.Add(usr); userList.Add(usr);
} }
} }
@ -353,7 +351,7 @@ namespace SafeMobileLib
connection.Open(); connection.Open();
string command = "SELECT u.userid, us.value FROM users u join \"userSettings\" us on us.user_id = u.userid " + string command = "SELECT u.userid, us.value FROM users u join \"userSettings\" us on us.user_id = u.userid " +
" WHERE key = 'startUnits'"; " WHERE key = 'startUnits'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
@ -392,7 +390,7 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = "SELECT login FROM users where userid <> 0 ORDER by user_type"; string command = "SELECT login FROM users where userid <> 0 ORDER by user_type";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
using (NpgsqlDataReader reader = cmd.ExecuteReader()) using (NpgsqlDataReader reader = cmd.ExecuteReader())
@ -479,7 +477,7 @@ namespace SafeMobileLib
connection.Open(); connection.Open();
string command = $"SELECT firstName, lastName, login, password, userId, user_type" string command = $"SELECT firstName, lastName, login, password, userId, user_type"
+ $" FROM users u where user_type != 1 and login = '{userName}' and password='{password}'"; + $" FROM users u where user_type != 1 and login = '{userName}' and password='{password}'";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
@ -621,7 +619,13 @@ namespace SafeMobileLib
using (NpgsqlCommand cmd = new NpgsqlCommand($"SELECT userid FROM users WHERE \"login\"='{userLoginName}'", connection)) using (NpgsqlCommand cmd = new NpgsqlCommand($"SELECT userid FROM users WHERE \"login\"='{userLoginName}'", connection))
{ {
userid = Convert.ToInt32(cmd.ExecuteScalar()); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
userid = reader.GetInt32(0);
}
}
} }
} }
@ -651,7 +655,13 @@ namespace SafeMobileLib
using (NpgsqlCommand cmd = new NpgsqlCommand("SELECT \"password\" FROM users WHERE \"login\"='administrator'", connection)) using (NpgsqlCommand cmd = new NpgsqlCommand("SELECT \"password\" FROM users WHERE \"login\"='administrator'", connection))
{ {
pass = cmd.ExecuteScalar().ToString(); using (NpgsqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
pass = reader.GetString(0);
}
}
} }
} }
} }
@ -746,7 +756,7 @@ namespace SafeMobileLib
connection.Open(); connection.Open();
Int32 temp = 0; Int32 temp = 0;
using (NpgsqlCommand cmd = new NpgsqlCommand($"SELECT ison FROM users WHERE userid = {UserIdx}", connection)) using (NpgsqlCommand cmd = new NpgsqlCommand($"SELECT ison FROM users WHERE userid={UserIdx}", connection))
{ {
temp = Convert.ToInt32((object)cmd.ExecuteScalar()); temp = Convert.ToInt32((object)cmd.ExecuteScalar());
} }
@ -773,8 +783,8 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = $"UPDATE users SET ison={(state == true ? 1 : 0)} " + string command = $"update users set ison={(state == true ? 1 : 0)} " +
" WHERE userid = (SELECT id FROM sip_manager WHERE sip_id = {sipID} AND type = 0) "; " where userid=(select id from sip_manager where sip_id = {sipID} and type = 0) ";
NpgsqlCommand cmd = new NpgsqlCommand(command, connection); NpgsqlCommand cmd = new NpgsqlCommand(command, connection);
{ {
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
@ -799,7 +809,7 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
NpgsqlCommand cmd = new NpgsqlCommand($"UPDATE users SET ison = {(state == true ? 1 : 0)} WHERE userid={UserIdx}", connection); NpgsqlCommand cmd = new NpgsqlCommand($"update users set ison={(state == true ? 1 : 0)} where userid={UserIdx}", connection);
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
} }

View File

@ -1201,8 +1201,17 @@ namespace SafeMobileLib
{ {
ArrayList toreturn = new ArrayList(); ArrayList toreturn = new ArrayList();
string buffer = string.Join(",", hash.Keys); StringBuilder buffer = new StringBuilder(4096);
foreach (Int32 obj in hash.Keys)
{
buffer.AppendFormat("'{0}',", obj);
}
if (buffer.Length > 0)
buffer = buffer.Replace(",", "", buffer.Length - 1, 1);
try try
{ {
@ -1212,7 +1221,7 @@ namespace SafeMobileLib
connection.ConnectionString = getConnectionString(); connection.ConnectionString = getConnectionString();
connection.Open(); connection.Open();
string command = $"SELECT sc_id FROM subscriber WHERE imei in ( {buffer} )"; string command = $"SELECT sc_id FROM subscriber WHERE imei in ( {buffer.ToString() } )";
using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection)) using (NpgsqlCommand cmd = new NpgsqlCommand(command, connection))
{ {
@ -2130,8 +2139,7 @@ namespace SafeMobileLib
int gateway_id = Convert.ToInt32(reader["gateway_id"]); int gateway_id = Convert.ToInt32(reader["gateway_id"]);
int radio_gw_id = Convert.ToInt32(reader["radio_gw_id"]); int radio_gw_id = Convert.ToInt32(reader["radio_gw_id"]);
if(!ret.ContainsKey(sc_id)) ret.Add(sc_id, new UnitSysPosition(gateway_id, radio_gw_id));
ret.Add(sc_id, new UnitSysPosition(gateway_id, radio_gw_id));
} }
reader.Close(); reader.Close();
@ -2322,7 +2330,6 @@ namespace SafeMobileLib
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
result = totalUnits; result = totalUnits;
} }
cmd = new NpgsqlCommand("SELECT COUNT(id) FROM vehicle v WHERE is_deleted = FALSE", connection); cmd = new NpgsqlCommand("SELECT COUNT(id) FROM vehicle v WHERE is_deleted = FALSE", connection);
int.TryParse(cmd.ExecuteScalar().ToString(), out totaldbunits); int.TryParse(cmd.ExecuteScalar().ToString(), out totaldbunits);

View File

@ -8,14 +8,6 @@ using System.Text;
namespace SafeMobileLib namespace SafeMobileLib
{ {
public interface ILocationAddress
{
Double Lat { get; set; }
Double Lng { get; set; }
String Address { get; set; }
}
public enum MapTYPE public enum MapTYPE
{ {
Google = 1, Google = 1,
@ -61,8 +53,7 @@ namespace SafeMobileLib
HIST, HIST,
ALLALARM, ALLALARM,
SMS_LOCATION, SMS_LOCATION,
JOB_TICKETING, JOB_TICKETING
BATCH_HIST
}; };
public enum car_state_e public enum car_state_e
@ -73,7 +64,7 @@ namespace SafeMobileLib
CAR_HW CAR_HW
}; };
public class PositionData : ILocationAddress public class PositionData
{ {
public Int32 ReportingInterval { get; set; } public Int32 ReportingInterval { get; set; }
public Double Lat { get; set; } public Double Lat { get; set; }
@ -159,20 +150,7 @@ namespace SafeMobileLib
public String Stop { get; set; } public String Stop { get; set; }
} }
public class BatchHistoryData : ILocationAddress public class ChartData
{
public String Department { get; set; }
public String Unit { get; set; }
public String Date { get; set; }
public String Time { get; set; }
public String Location { get; set; }
public String Address { get; set; }
public Double Lat { get; set; }
public Double Lng { get; set; }
public String Speed { get; set; }
}
public class ChartData
{ {
public String Type { get; set; } public String Type { get; set; }
public int Value { get; set; } public int Value { get; set; }

View File

@ -27,7 +27,6 @@ namespace SafeMobileLib
public static List<SpeedData> SpeedingList; public static List<SpeedData> SpeedingList;
public static List<LandData> LandList; public static List<LandData> LandList;
public static List<StopData> HistDataReport; public static List<StopData> HistDataReport;
public static List<BatchHistoryData> BatchHistoryReport;
public static List<User> UsersList; public static List<User> UsersList;
public static List<SMS_Location> SMSLocList; public static List<SMS_Location> SMSLocList;
public static Boolean IsIdle = false; public static Boolean IsIdle = false;

View File

@ -18,9 +18,6 @@ using System.Net.Sockets;
using System.Management.Automation.Runspaces; using System.Management.Automation.Runspaces;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Management.Automation; using System.Management.Automation;
using System.Data;
using System.ComponentModel;
using System.IO;
namespace SafeMobileLib namespace SafeMobileLib
{ {
@ -1253,129 +1250,6 @@ namespace SafeMobileLib
string Text = Convert.ToInt32(e).ToString(); string Text = Convert.ToInt32(e).ToString();
return Text; return Text;
} }
public static DataTable ToEmptyDataTable<T>()
{
DataTable table = new DataTable();
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(T));
for (int i = 0; i < props.Count; i++)
{
PropertyDescriptor prop = props[i];
table.Columns.Add(prop.Name, prop.PropertyType);
}
return table;
}
public static void HeaderToCsv<T>(StreamWriter sw, List<string> excludeColumns)
{
char separator = ',';
char replacer = ';';
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(T));
for (int i = 0; i < props.Count; i++)
{
if (excludeColumns.Contains(props[i].Name))
continue;
PropertyDescriptor prop = props[i];
sw.Write(prop.Name.Replace(separator, replacer));
if (i < props.Count - 1)
sw.Write(separator);
}
sw.Write(Environment.NewLine);
}
public static void RowToCsv<T>(StreamWriter sw, T obj, List<string> excludeColumns)
{
char separator = ',';
char replacer = ';';
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(T));
for (int i = 0; i < props.Count; i++)
{
if (excludeColumns.Contains(props[i].Name))
continue;
String value = props[i].GetValue(obj).ToString();
sw.Write(value.Replace(separator, replacer));
if (i < props.Count - 1)
sw.Write(separator);
}
sw.Write(Environment.NewLine);
}
public static void DataTable_HeaderToCsvFile(System.IO.StreamWriter sw, DataTable dt)
{
char separator = ',';
char replacer = ';';
int columnCount = dt.Columns.Count;
for (int i = 0; i < columnCount; i++)
{
sw.Write(dt.Columns[i].ToString().Replace(separator, replacer));
if (i < columnCount - 1)
sw.Write(separator);
}
sw.Write(Environment.NewLine);
}
public static void DataTable_RowToCsvFile(System.IO.StreamWriter sw, DataRow dr)
{
char separator = ',';
char replacer = ';';
int columnCount = dr.Table.Columns.Count;
for (int i = 0; i < columnCount; i++)
{
if (!Convert.IsDBNull(dr[i]))
sw.Write(dr[i].ToString().Replace(separator, replacer));
if (i < columnCount - 1)
sw.Write(separator);
}
sw.Write(Environment.NewLine);
}
public static void DataTableToCsvFile(DataTable dataTable, string filePath, bool includeHeaders = true)
{
using (System.IO.StreamWriter sw = new System.IO.StreamWriter(filePath, false))
{
//================
// write header
//================
if (includeHeaders)
{
DataTable_HeaderToCsvFile(sw, dataTable);
}
//================
// write rows
//================
foreach (DataRow dr in dataTable.Rows)
{
DataTable_RowToCsvFile(sw, dr);
}
}
}
} }
public class Hyt_cmdMsg public class Hyt_cmdMsg

View File

@ -126,8 +126,7 @@ namespace Safedispatch_4_0
REPORTS, REPORTS,
SYSTEM, SYSTEM,
HELP, HELP,
RADIO, RADIO
BATCH_HIST
}; };
//public enum StartItems //public enum StartItems
@ -210,7 +209,6 @@ namespace Safedispatch_4_0
public static readonly Tabs SYSTEM = new Tabs(9, "SYSTEM"); public static readonly Tabs SYSTEM = new Tabs(9, "SYSTEM");
public static readonly Tabs ALERTS = new Tabs(10, "ALERTS"); public static readonly Tabs ALERTS = new Tabs(10, "ALERTS");
public static readonly Tabs RADIO = new Tabs(11, "RADIO"); public static readonly Tabs RADIO = new Tabs(11, "RADIO");
public static readonly Tabs BATCH_HISTORY = new Tabs(12, "BATCH HISTORY");
private Tabs(int value, String name) private Tabs(int value, String name)
{ {
@ -1029,7 +1027,6 @@ namespace Safedispatch_4_0
{ {
public ToolWindow toolwind; public ToolWindow toolwind;
public HistoryTab histtab = null; public HistoryTab histtab = null;
public HistTabWind(ToolWindow _toolwind, HistoryTab _livetab) public HistTabWind(ToolWindow _toolwind, HistoryTab _livetab)
{ {
@ -1039,7 +1036,6 @@ namespace Safedispatch_4_0
} }
public class Commands public class Commands
{ {
public Commands(Int32 _type, String _imei, Int32 _time, Double _lat, Double _lng, Int32 _speed, Int32 _di, Double _alt) public Commands(Int32 _type, String _imei, Int32 _time, Double _lat, Double _lng, Int32 _speed, Int32 _di, Double _alt)

View File

@ -438,15 +438,6 @@ namespace Dispatcher.Language {
} }
} }
/// <summary>
/// Looks up a localized string similar to Batch History Report.
/// </summary>
internal static string BatchHistoryRep {
get {
return ResourceManager.GetString("BatchHistoryRep", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Border color. /// Looks up a localized string similar to Border color.
/// </summary> /// </summary>
@ -510,15 +501,6 @@ namespace Dispatcher.Language {
} }
} }
/// <summary>
/// Looks up a localized string similar to Generate Report In Csv.
/// </summary>
internal static string btShowReportInCsv {
get {
return ResourceManager.GetString("btShowReportInCsv", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Busy. /// Looks up a localized string similar to Busy.
/// </summary> /// </summary>
@ -1032,15 +1014,6 @@ namespace Dispatcher.Language {
} }
} }
/// <summary>
/// Looks up a localized string similar to Date.
/// </summary>
internal static string Date {
get {
return ResourceManager.GetString("Date", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Stop Date. /// Looks up a localized string similar to Stop Date.
/// </summary> /// </summary>
@ -1140,15 +1113,6 @@ namespace Dispatcher.Language {
} }
} }
/// <summary>
/// Looks up a localized string similar to Department.
/// </summary>
internal static string Department {
get {
return ResourceManager.GetString("Department", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Details. /// Looks up a localized string similar to Details.
/// </summary> /// </summary>
@ -3048,15 +3012,6 @@ namespace Dispatcher.Language {
} }
} }
/// <summary>
/// Looks up a localized string similar to In Progress.
/// </summary>
internal static string InProgress {
get {
return ResourceManager.GetString("InProgress", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to InterConnected Subscribers. /// Looks up a localized string similar to InterConnected Subscribers.
/// </summary> /// </summary>
@ -5169,15 +5124,6 @@ namespace Dispatcher.Language {
} }
} }
/// <summary>
/// Looks up a localized string similar to Batch History Report.
/// </summary>
internal static string r_BatchHistoryReport {
get {
return ResourceManager.GetString("r_BatchHistoryReport", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Emergency Alarm Report. /// Looks up a localized string similar to Emergency Alarm Report.
/// </summary> /// </summary>
@ -6735,15 +6681,6 @@ namespace Dispatcher.Language {
} }
} }
/// <summary>
/// Looks up a localized string similar to Speed.
/// </summary>
internal static string Speed {
get {
return ResourceManager.GetString("Speed", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Speed Alarm Report. /// Looks up a localized string similar to Speed Alarm Report.
/// </summary> /// </summary>
@ -7087,15 +7024,6 @@ namespace Dispatcher.Language {
} }
} }
/// <summary>
/// Looks up a localized string similar to Batch history.
/// </summary>
internal static string tabBatchHist {
get {
return ResourceManager.GetString("tabBatchHist", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Geo-Fences. /// Looks up a localized string similar to Geo-Fences.
/// </summary> /// </summary>
@ -7501,15 +7429,6 @@ namespace Dispatcher.Language {
} }
} }
/// <summary>
/// Looks up a localized string similar to Time.
/// </summary>
internal static string Time {
get {
return ResourceManager.GetString("Time", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Time filter. /// Looks up a localized string similar to Time filter.
/// </summary> /// </summary>

View File

@ -2995,31 +2995,4 @@ Does not apply to the below send message and email options.</value>
<value>Successfully SDR service test</value> <value>Successfully SDR service test</value>
<comment>Failover service</comment> <comment>Failover service</comment>
</data> </data>
<data name="tabBatchHist" xml:space="preserve">
<value>Batch history</value>
</data>
<data name="r_BatchHistoryReport" xml:space="preserve">
<value>Batch History Report</value>
</data>
<data name="BatchHistoryRep" xml:space="preserve">
<value>Batch History Report</value>
</data>
<data name="Date" xml:space="preserve">
<value>Date</value>
</data>
<data name="Department" xml:space="preserve">
<value>Department</value>
</data>
<data name="Speed" xml:space="preserve">
<value>Speed</value>
</data>
<data name="Time" xml:space="preserve">
<value>Time</value>
</data>
<data name="btShowReportInCsv" xml:space="preserve">
<value>Generate Report In Csv</value>
</data>
<data name="InProgress" xml:space="preserve">
<value>In Progress</value>
</data>
</root> </root>

View File

@ -441,17 +441,13 @@ namespace Safedispatch_4_0
client = new TcpClient(); client = new TcpClient();
IPEndPoint serverEndPoint = new IPEndPoint(IPAddress.Parse(MainForm2.cfg.APPLICATION_SERVER_IP), MainForm2.cfg.RegsPort); IPEndPoint serverEndPoint = new IPEndPoint(IPAddress.Parse(MainForm2.cfg.APPLICATION_SERVER_IP), MainForm2.cfg.RegsPort);
client.Connect(serverEndPoint); client.Connect(serverEndPoint);
YourIPaddress = (client.Client.LocalEndPoint.ToString().Split(':'))[0];
YourIPaddress = (client.Client.LocalEndPoint.ToString().Split(":".ToCharArray()))[0];
IPaddress = MainForm2.cfg.LocalIP.Length > 3 ? MainForm2.cfg.LocalIP : YourIPaddress; IPaddress = MainForm2.cfg.LocalIP.Length > 3 ? MainForm2.cfg.LocalIP : YourIPaddress;
NetworkStream clientStream = client.GetStream(); NetworkStream clientStream = client.GetStream();
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
UTF8Encoding encoding = new UTF8Encoding();
byte[] buffer = encoding.GetBytes("100"); byte[] buffer = encoding.GetBytes("100");
clientStream.Write(buffer, 0, buffer.Length); clientStream.Write(buffer, 0, buffer.Length);
SM.Debug("Sent registration request to server, waiting..."); SM.Debug("Sent registration request to server, waiting...");
byte[] message = new byte[256]; byte[] message = new byte[256];
clientStream.ReadTimeout = 7000; clientStream.ReadTimeout = 7000;
int result = clientStream.Read(message, 0, message.Length); int result = clientStream.Read(message, 0, message.Length);
@ -461,11 +457,9 @@ namespace Safedispatch_4_0
{ {
client.Close(); client.Close();
Thread.Sleep(100); Thread.Sleep(100);
client = new TcpClient(); client = new TcpClient();
client.Connect(serverEndPoint); client.Connect(serverEndPoint);
buffer = encoding.GetBytes("1000#" + MainForm2.uniqueID + "#"); buffer = encoding.GetBytes("1000#" + MainForm2.uniqueID + "#");
NetworkStream clientStream2 = client.GetStream(); NetworkStream clientStream2 = client.GetStream();
clientStream2.Write(buffer, 0, buffer.Length); clientStream2.Write(buffer, 0, buffer.Length);
byte[] message2 = new byte[256]; byte[] message2 = new byte[256];

View File

@ -187,7 +187,7 @@ namespace Safedispatch_4_0
// //
// radDock1 // radDock1
// //
this.radDock1.ActiveWindow = this.tabGeo; this.radDock1.ActiveWindow = this.tabSystem;
this.radDock1.BackColor = System.Drawing.Color.Transparent; this.radDock1.BackColor = System.Drawing.Color.Transparent;
this.radDock1.CausesValidation = false; this.radDock1.CausesValidation = false;
this.radDock1.Controls.Add(this.documentContainer1); this.radDock1.Controls.Add(this.documentContainer1);
@ -521,7 +521,7 @@ namespace Safedispatch_4_0
this.rcbDropDropDownUnitEvent.Location = new System.Drawing.Point(13, 157); this.rcbDropDropDownUnitEvent.Location = new System.Drawing.Point(13, 157);
this.rcbDropDropDownUnitEvent.Name = "rcbDropDropDownUnitEvent"; this.rcbDropDropDownUnitEvent.Name = "rcbDropDropDownUnitEvent";
this.rcbDropDropDownUnitEvent.NullText = "Display all"; this.rcbDropDropDownUnitEvent.NullText = "Display all";
this.rcbDropDropDownUnitEvent.Size = new System.Drawing.Size(260, 21); this.rcbDropDropDownUnitEvent.Size = new System.Drawing.Size(260, 20);
this.rcbDropDropDownUnitEvent.TabIndex = 66; this.rcbDropDropDownUnitEvent.TabIndex = 66;
this.rcbDropDropDownUnitEvent.ThemeName = "Office2013Light"; this.rcbDropDropDownUnitEvent.ThemeName = "Office2013Light";
this.rcbDropDropDownUnitEvent.ItemCheckedChanged += new Telerik.WinControls.UI.RadCheckedListDataItemEventHandler(this.rcbDropDropDownUnitEvent_ItemCheckedChanged); this.rcbDropDropDownUnitEvent.ItemCheckedChanged += new Telerik.WinControls.UI.RadCheckedListDataItemEventHandler(this.rcbDropDropDownUnitEvent_ItemCheckedChanged);
@ -545,7 +545,7 @@ namespace Safedispatch_4_0
this.rdpEndTime.MaxDate = new System.DateTime(2030, 12, 31, 0, 0, 0, 0); this.rdpEndTime.MaxDate = new System.DateTime(2030, 12, 31, 0, 0, 0, 0);
this.rdpEndTime.Name = "rdpEndTime"; this.rdpEndTime.Name = "rdpEndTime";
this.rdpEndTime.NullText = "Display all"; this.rdpEndTime.NullText = "Display all";
this.rdpEndTime.Size = new System.Drawing.Size(232, 21); this.rdpEndTime.Size = new System.Drawing.Size(232, 20);
this.rdpEndTime.TabIndex = 65; this.rdpEndTime.TabIndex = 65;
this.rdpEndTime.TabStop = false; this.rdpEndTime.TabStop = false;
this.rdpEndTime.ThemeName = "Office2013Light"; this.rdpEndTime.ThemeName = "Office2013Light";
@ -561,7 +561,7 @@ namespace Safedispatch_4_0
this.rdpStartTime.MinDate = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); this.rdpStartTime.MinDate = new System.DateTime(2015, 1, 1, 0, 0, 0, 0);
this.rdpStartTime.Name = "rdpStartTime"; this.rdpStartTime.Name = "rdpStartTime";
this.rdpStartTime.NullText = "Display all"; this.rdpStartTime.NullText = "Display all";
this.rdpStartTime.Size = new System.Drawing.Size(233, 21); this.rdpStartTime.Size = new System.Drawing.Size(233, 20);
this.rdpStartTime.TabIndex = 64; this.rdpStartTime.TabIndex = 64;
this.rdpStartTime.TabStop = false; this.rdpStartTime.TabStop = false;
this.rdpStartTime.Text = "Thu, 01/01/2015, 00:00"; this.rdpStartTime.Text = "Thu, 01/01/2015, 00:00";
@ -604,7 +604,7 @@ namespace Safedispatch_4_0
this.rcbDropDownEventType.Location = new System.Drawing.Point(13, 15); this.rcbDropDownEventType.Location = new System.Drawing.Point(13, 15);
this.rcbDropDownEventType.Name = "rcbDropDownEventType"; this.rcbDropDownEventType.Name = "rcbDropDownEventType";
this.rcbDropDownEventType.NullText = "Display all"; this.rcbDropDownEventType.NullText = "Display all";
this.rcbDropDownEventType.Size = new System.Drawing.Size(260, 21); this.rcbDropDownEventType.Size = new System.Drawing.Size(260, 20);
this.rcbDropDownEventType.TabIndex = 60; this.rcbDropDownEventType.TabIndex = 60;
this.rcbDropDownEventType.ThemeName = "Office2013Light"; this.rcbDropDownEventType.ThemeName = "Office2013Light";
this.rcbDropDownEventType.ItemCheckedChanged += new Telerik.WinControls.UI.RadCheckedListDataItemEventHandler(this.rcbDropDownEventType_ItemCheckedChanged); this.rcbDropDownEventType.ItemCheckedChanged += new Telerik.WinControls.UI.RadCheckedListDataItemEventHandler(this.rcbDropDownEventType_ItemCheckedChanged);
@ -752,7 +752,7 @@ namespace Safedispatch_4_0
this.pbFilterDirection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pbFilterDirection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pbFilterDirection.Cursor = System.Windows.Forms.Cursors.Hand; this.pbFilterDirection.Cursor = System.Windows.Forms.Cursors.Hand;
this.pbFilterDirection.Image = global::Dispatcher.Properties.Resources.s_filter_direction_grey; this.pbFilterDirection.Image = global::Dispatcher.Properties.Resources.s_filter_direction_grey;
this.pbFilterDirection.Location = new System.Drawing.Point(557, -1); this.pbFilterDirection.Location = new System.Drawing.Point(565, -1);
this.pbFilterDirection.Name = "pbFilterDirection"; this.pbFilterDirection.Name = "pbFilterDirection";
this.pbFilterDirection.Size = new System.Drawing.Size(24, 24); this.pbFilterDirection.Size = new System.Drawing.Size(24, 24);
this.pbFilterDirection.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pbFilterDirection.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@ -768,7 +768,7 @@ namespace Safedispatch_4_0
this.pbFilterType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pbFilterType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pbFilterType.Cursor = System.Windows.Forms.Cursors.Hand; this.pbFilterType.Cursor = System.Windows.Forms.Cursors.Hand;
this.pbFilterType.Image = global::Dispatcher.Properties.Resources.s_filter_type_grey; this.pbFilterType.Image = global::Dispatcher.Properties.Resources.s_filter_type_grey;
this.pbFilterType.Location = new System.Drawing.Point(587, -1); this.pbFilterType.Location = new System.Drawing.Point(595, -1);
this.pbFilterType.Name = "pbFilterType"; this.pbFilterType.Name = "pbFilterType";
this.pbFilterType.Size = new System.Drawing.Size(24, 24); this.pbFilterType.Size = new System.Drawing.Size(24, 24);
this.pbFilterType.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pbFilterType.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@ -784,7 +784,7 @@ namespace Safedispatch_4_0
this.pbFilterUnit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pbFilterUnit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pbFilterUnit.Cursor = System.Windows.Forms.Cursors.Hand; this.pbFilterUnit.Cursor = System.Windows.Forms.Cursors.Hand;
this.pbFilterUnit.Image = global::Dispatcher.Properties.Resources.s_filter_user_grey; this.pbFilterUnit.Image = global::Dispatcher.Properties.Resources.s_filter_user_grey;
this.pbFilterUnit.Location = new System.Drawing.Point(616, -1); this.pbFilterUnit.Location = new System.Drawing.Point(624, -1);
this.pbFilterUnit.Name = "pbFilterUnit"; this.pbFilterUnit.Name = "pbFilterUnit";
this.pbFilterUnit.Size = new System.Drawing.Size(24, 24); this.pbFilterUnit.Size = new System.Drawing.Size(24, 24);
this.pbFilterUnit.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pbFilterUnit.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@ -1023,7 +1023,7 @@ namespace Safedispatch_4_0
// //
// //
this.documentTabStrip1.RootElement.MinSize = new System.Drawing.Size(0, 0); this.documentTabStrip1.RootElement.MinSize = new System.Drawing.Size(0, 0);
this.documentTabStrip1.SelectedIndex = 1; this.documentTabStrip1.SelectedIndex = 9;
this.documentTabStrip1.Size = new System.Drawing.Size(1017, 581); this.documentTabStrip1.Size = new System.Drawing.Size(1017, 581);
this.documentTabStrip1.TabIndex = 0; this.documentTabStrip1.TabIndex = 0;
this.documentTabStrip1.TabStop = false; this.documentTabStrip1.TabStop = false;
@ -1057,10 +1057,10 @@ namespace Safedispatch_4_0
// //
this.tabGeo.Caption = null; this.tabGeo.Caption = null;
this.tabGeo.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.tabGeo.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
this.tabGeo.Location = new System.Drawing.Point(5, 32); this.tabGeo.Location = new System.Drawing.Point(5, 33);
this.tabGeo.Name = "tabGeo"; this.tabGeo.Name = "tabGeo";
this.tabGeo.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked; this.tabGeo.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.tabGeo.Size = new System.Drawing.Size(1007, 544); this.tabGeo.Size = new System.Drawing.Size(1007, 543);
this.tabGeo.Tag = "GEOFENCE"; this.tabGeo.Tag = "GEOFENCE";
this.tabGeo.Text = "Geo-Fences and Landmarks"; this.tabGeo.Text = "Geo-Fences and Landmarks";
this.tabGeo.ToolTipText = "Geofence"; this.tabGeo.ToolTipText = "Geofence";
@ -1071,15 +1071,14 @@ namespace Safedispatch_4_0
// //
this.tabHistory.Caption = null; this.tabHistory.Caption = null;
this.tabHistory.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.tabHistory.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
this.tabHistory.Location = new System.Drawing.Point(5, 32); this.tabHistory.Location = new System.Drawing.Point(5, 33);
this.tabHistory.Name = "tabHistory"; this.tabHistory.Name = "tabHistory";
this.tabHistory.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked; this.tabHistory.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.tabHistory.Size = new System.Drawing.Size(1007, 544); this.tabHistory.Size = new System.Drawing.Size(1007, 543);
this.tabHistory.Tag = "HISTORY"; this.tabHistory.Tag = "HISTORY";
this.tabHistory.Text = "History"; this.tabHistory.Text = "History";
this.tabHistory.Enter += new System.EventHandler(this.tabHistory_Enter); this.tabHistory.Enter += new System.EventHandler(this.tabHistory_Enter);
this.tabHistory.Leave += new System.EventHandler(this.tabHistory_Leave); this.tabHistory.Leave += new System.EventHandler(this.tabHistory_Leave);
// //
// tabSMS // tabSMS
// //
@ -1101,10 +1100,10 @@ namespace Safedispatch_4_0
// //
this.tabTicketing.Caption = null; this.tabTicketing.Caption = null;
this.tabTicketing.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.tabTicketing.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
this.tabTicketing.Location = new System.Drawing.Point(5, 32); this.tabTicketing.Location = new System.Drawing.Point(5, 33);
this.tabTicketing.Name = "tabTicketing"; this.tabTicketing.Name = "tabTicketing";
this.tabTicketing.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.TabbedDocument; this.tabTicketing.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.TabbedDocument;
this.tabTicketing.Size = new System.Drawing.Size(1007, 544); this.tabTicketing.Size = new System.Drawing.Size(1007, 543);
this.tabTicketing.Tag = "TICKETING"; this.tabTicketing.Tag = "TICKETING";
this.tabTicketing.Text = "Job Ticketing"; this.tabTicketing.Text = "Job Ticketing";
this.tabTicketing.Enter += new System.EventHandler(this.tabTicketing_Enter); this.tabTicketing.Enter += new System.EventHandler(this.tabTicketing_Enter);
@ -1115,10 +1114,10 @@ namespace Safedispatch_4_0
this.tabReport.Caption = null; this.tabReport.Caption = null;
this.tabReport.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold); this.tabReport.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold);
this.tabReport.ForeColor = System.Drawing.Color.Black; this.tabReport.ForeColor = System.Drawing.Color.Black;
this.tabReport.Location = new System.Drawing.Point(5, 32); this.tabReport.Location = new System.Drawing.Point(5, 33);
this.tabReport.Name = "tabReport"; this.tabReport.Name = "tabReport";
this.tabReport.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked; this.tabReport.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.tabReport.Size = new System.Drawing.Size(1007, 544); this.tabReport.Size = new System.Drawing.Size(1007, 543);
this.tabReport.Tag = "REPORTS"; this.tabReport.Tag = "REPORTS";
this.tabReport.Text = "Reports"; this.tabReport.Text = "Reports";
this.tabReport.Enter += new System.EventHandler(this.tabReport_Enter); this.tabReport.Enter += new System.EventHandler(this.tabReport_Enter);
@ -1140,11 +1139,11 @@ namespace Safedispatch_4_0
// //
this.tabNewRadio.Caption = null; this.tabNewRadio.Caption = null;
this.tabNewRadio.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.tabNewRadio.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
this.tabNewRadio.Location = new System.Drawing.Point(5, 32); this.tabNewRadio.Location = new System.Drawing.Point(5, 33);
this.tabNewRadio.Margin = new System.Windows.Forms.Padding(0); this.tabNewRadio.Margin = new System.Windows.Forms.Padding(0);
this.tabNewRadio.Name = "tabNewRadio"; this.tabNewRadio.Name = "tabNewRadio";
this.tabNewRadio.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Floating; this.tabNewRadio.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Floating;
this.tabNewRadio.Size = new System.Drawing.Size(1007, 544); this.tabNewRadio.Size = new System.Drawing.Size(1007, 543);
this.tabNewRadio.Tag = "RADIO"; this.tabNewRadio.Tag = "RADIO";
this.tabNewRadio.Text = "Radio"; this.tabNewRadio.Text = "Radio";
this.tabNewRadio.Enter += new System.EventHandler(this.tabNewRadio_Enter); this.tabNewRadio.Enter += new System.EventHandler(this.tabNewRadio_Enter);

File diff suppressed because it is too large Load Diff

View File

@ -11,17 +11,13 @@ namespace Dispatcher
public class ReverseGeocodingModule public class ReverseGeocodingModule
{ {
public static String osnServer = "192.168.65.130"; public static String osnServer = "192.168.65.130";
public static List<String> CalculateAddressForPositions<T>(List<T> positions)
public static List<String> CalculateAddressForPositions(List<PositionData> positions)
{ {
List<String> results = new List<string>(); List<String> results = new List<string>();
foreach(ILocationAddress pos in positions) foreach(PositionData pos in positions)
{ {
if (pos.Lat == 0.0 && pos.Lng == 0.0)
continue;
String address = GetAddressFromOSM(pos.Lat, pos.Lng); String address = GetAddressFromOSM(pos.Lat, pos.Lng);
if (address == null) if (address == null)
address = GetAddressFromGoogle(pos.Lat, pos.Lng); address = GetAddressFromGoogle(pos.Lat, pos.Lng);
@ -43,11 +39,8 @@ namespace Dispatcher
await Task.Factory.StartNew(() => await Task.Factory.StartNew(() =>
{ {
foreach (ILocationAddress pos in positions) foreach (PositionData pos in positions)
{ {
if (pos.Lat == 0.0 && pos.Lng == 0.0)
continue;
String address = GetAddressFromOSM(pos.Lat, pos.Lng); String address = GetAddressFromOSM(pos.Lat, pos.Lng);
if (address == null) if (address == null)
address = GetAddressFromGoogle(pos.Lat, pos.Lng); address = GetAddressFromGoogle(pos.Lat, pos.Lng);

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
[Server] [Server]
IP = 10.120.1.149 IP = 127.0.0.1
;localIP= ;localIP=
[Google] [Google]

View File

@ -16,7 +16,6 @@ using SafeMobileLib;
using System.IO; using System.IO;
using Dispatcher.maptab.UIClasses; using Dispatcher.maptab.UIClasses;
using Dispatcher.maptab; using Dispatcher.maptab;
using System.Linq;
namespace Safedispatch_4_0 namespace Safedispatch_4_0
{ {
@ -65,13 +64,20 @@ namespace Safedispatch_4_0
//rdpEndTime.Culture = MainForm2.culture; //rdpEndTime.Culture = MainForm2.culture;
//rdpStartTime.Culture = MainForm2.culture; //rdpStartTime.Culture = MainForm2.culture;
string startTimeCustomFormat = MainForm2.DayFirst ? "dd/MM/yyyy hh:mm tt" : "MM/dd/yyyy hh:mm tt";
if (MainForm2.is24hours) if (MainForm2.is24hours)
startTimeCustomFormat = MainForm2.DayFirst ? "dd/MM/yyyy HH:mm" : "MM/dd/yyyy HH:mm"; {
if (MainForm2.DayFirst)
rdpStartTime.CustomFormat = startTimeCustomFormat; rdpStartTime.CustomFormat = "dd/MM/yyyy HH:mm";
else
rdpStartTime.CustomFormat = "MM/dd/yyyy HH:mm";
}
else
{
if (MainForm2.DayFirst)
rdpStartTime.CustomFormat = "dd/MM/yyyy hh:mm tt";
else
rdpStartTime.CustomFormat = "MM/dd/yyyy hh:mm tt";
}
// copy format to the end date picker // copy format to the end date picker
rdpEndTime.CustomFormat = rdpStartTime.CustomFormat; rdpEndTime.CustomFormat = rdpStartTime.CustomFormat;
@ -235,12 +241,20 @@ namespace Safedispatch_4_0
// rcbComputeAddress.Checked = true; // rcbComputeAddress.Checked = true;
//else rcbComputeAddress.Checked = false; //else rcbComputeAddress.Checked = false;
string startTimeCustomFormat = MainForm2.DayFirst ? "dd/MM/yyyy hh:mm tt" : "MM/dd/yyyy hh:mm tt";
if (MainForm2.is24hours) if (MainForm2.is24hours)
startTimeCustomFormat = MainForm2.DayFirst ? "dd/MM/yyyy HH:mm" : "MM/dd/yyyy HH:mm"; {
if (MainForm2.DayFirst)
rdpStartTime.CustomFormat = startTimeCustomFormat; rdpStartTime.CustomFormat = "dd/MM/yyyy HH:mm";
else
rdpStartTime.CustomFormat = "MM/dd/yyyy HH:mm";
}
else
{
if (MainForm2.DayFirst)
rdpStartTime.CustomFormat = "dd/MM/yyyy hh:mm tt";
else
rdpStartTime.CustomFormat = "MM/dd/yyyy hh:mm tt";
}
rdpEndTime.CustomFormat = rdpStartTime.CustomFormat; rdpEndTime.CustomFormat = rdpStartTime.CustomFormat;
// set history time format // set history time format
HistoryGridCellElement.timeFormat = rdpStartTime.CustomFormat; HistoryGridCellElement.timeFormat = rdpStartTime.CustomFormat;
@ -419,12 +433,12 @@ namespace Safedispatch_4_0
for (int i = 0; i < e.MenuItems.Count; i++) for (int i = 0; i < e.MenuItems.Count; i++)
{ {
RadMenuItemBase menuItem = e.MenuItems[i]; RadMenuItemBase menuItem = e.MenuItems[i];
if (menuItem.Name.Equals("CloseWindow") || if (menuItem.Name == "CloseWindow" ||
menuItem.Name.Equals("CloseAllButThis") || menuItem.Name == "CloseAllButThis" ||
menuItem.Name.Equals("CloseAll") || menuItem.Name == "CloseAll" ||
menuItem.Name.Equals("Floating") || menuItem.Name == "Floating" ||
menuItem.Name.Equals("Docked") || menuItem.Name == "Docked" ||
menuItem.Name.Equals("Hidden") || menuItem.Name == "Hidden" ||
menuItem is RadMenuSeparatorItem) menuItem is RadMenuSeparatorItem)
{ {
menuItem.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; menuItem.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
@ -1193,23 +1207,52 @@ namespace Safedispatch_4_0
FirstGoogle = true; FirstGoogle = true;
SMposition tmpos = (SMposition)Point_for_play[0]; SMposition tmpos = (SMposition)Point_for_play[0];
if (MainForm2.isInMile) volSpeedString = Convert.ToString((int)Math.Round(tmpos.m_speed * 0.621371192));
else volSpeedString = Convert.ToString((int)(tmpos.m_speed));
worker.ReportProgress(3); worker.ReportProgress(3);
updatecomand = FormatUpdateCommand(tmpos, FirstGoogle); vehSelect = tmpos.m_vehName
+ "_" + tmpos.m_posID;
latitude = tmpos.m_lat; if (FirstGoogle)
longitude = tmpos.m_lng; {
updatecomand = "setDataset,heading_positions," + MainForm2.FixDoubleLAT(tmpos.m_lat.ToString())
+ "," + MainForm2.FixDoubleLNG(tmpos.m_lng.ToString())
+ "," + (tmpos.m_time).ConvertGMTToLocal().GetDTFromSeconds().ToString("yyyy-MM-dd HH:mm:ss")
+ "," + tmpos.m_vehName + "_" + tmpos.m_posID
+ "," + volSpeedString + (MainForm2.isInMile ? "mph" : "kph")
+ "," + tmpos.m_alt
+ "," + MainForm2.FixComma(tmpos.m_address) + ","
+ "history/" + GetSymbName(busSymb.GetSymbolFromOrientation(tmpos.m_heading)) + ","
+ "false" + "," + "false" + "," + "false";
latitude = tmpos.m_lat;
longitude = tmpos.m_lng;
if (FirstGoogle)
{
Thread.Sleep(2000);
FirstGoogle = false; FirstGoogle = false;
} worker.ReportProgress(1,tmpos.m_evnt_id);
Thread.Sleep(2000);
}
else
{
updatecomand = "updateDataset,heading_positions,"
+ MainForm2.FixDoubleLAT(tmpos.m_lat.ToString())
+ "," + MainForm2.FixDoubleLNG(tmpos.m_lng.ToString())
+ "," + (tmpos.m_time).ConvertGMTToLocal().GetDTFromSeconds().ToString("yyyy-MM-dd HH:mm:ss")
+ "," + tmpos.m_vehName + "_" + tmpos.m_posID
+ "," + volSpeedString + (MainForm2.isInMile ? "mph" : "kph")
+ "," + tmpos.m_alt
+ "," + MainForm2.FixComma(tmpos.m_address) + ","
+ "history/" + GetSymbName(busSymb.GetSymbolFromOrientation(tmpos.m_heading)) + ","
+ "false" + "," + "false" + "," + "false";
worker.ReportProgress(1, tmpos.m_evnt_id); latitude = tmpos.m_lat;
longitude = tmpos.m_lng;
worker.ReportProgress(1,tmpos.m_evnt_id);
}
Index_to_play++; Index_to_play++;
}// end if prev state is STOP }// end if prev state is STOP
try try
@ -1217,27 +1260,37 @@ namespace Safedispatch_4_0
while ((Index_to_play < Point_for_play.Count) && (ePlayStatus == PS.PLAY)) while ((Index_to_play < Point_for_play.Count) && (ePlayStatus == PS.PLAY))
{ {
tempPos = ((SMposition)Point_for_play[Index_to_play]); tempPos = ((SMposition)Point_for_play[Index_to_play]);
if (MainForm2.isInMile) volSpeedString = Convert.ToString((int)Math.Round(tempPos.m_speed * 0.621371192));
// convert to km else volSpeedString = Convert.ToString((int)(tempPos.m_speed));
volSpeedString = ConvertToKm(tempPos);
Index_to_play++; Index_to_play++;
if (ePlayStatus == PS.PLAY) if (ePlayStatus == PS.PLAY)
{ {
vehSelect = tempPos.m_vehName + "_" + tempPos.m_posID;
updatecomand = FormatUpdateCommand(tempPos, FirstGoogle); if (FirstGoogle)
FirstGoogle = false; {
updatecomand = "setDataset,heading_positions";
FirstGoogle = false;
}
else updatecomand = "updateDataset,heading_positions";
//updatecomand = updatecomand + "," + MainForm2.FixDoubleLAT(tempPos.m_lat.ToString()) + "," + MainForm2.FixDoubleLNG(tempPos.m_lng.ToString()) + "," + vehSelect + "," + note + "," + GetSymbName(busSymb.GetSymbolFromOrientation(tempPos.m_heading));
latitude = tempPos.m_lat; latitude = tempPos.m_lat;
longitude = tempPos.m_lng; longitude = tempPos.m_lng;
updatecomand = updatecomand + "," + MainForm2.FixDoubleLAT(tempPos.m_lat.ToString())
+ "," + MainForm2.FixDoubleLNG(tempPos.m_lng.ToString())
+ "," + (tempPos.m_time).ConvertGMTToLocal().GetDTFromSeconds().ToString("yyyy-MM-dd HH:mm:ss")
+ "," + tempPos.m_vehName + "_" + tempPos.m_posID
+ "," + volSpeedString + (MainForm2.isInMile ? "mph" : "kph")
+ "," + tempPos.m_alt
+ "," + MainForm2.FixComma(tempPos.m_address) + ","
+ "history/" + GetSymbName(busSymb.GetSymbolFromOrientation(tempPos.m_heading)) + ","
+ "false" + "," + "false" + "," + "false";
worker.ReportProgress(1,tempPos.m_evnt_id); worker.ReportProgress(1,tempPos.m_evnt_id);
} }
else else
break; break;
Thread.Sleep(10); Thread.Sleep(10);
if ((parent.isCanceled[tabName] != null && (bool)parent.isCanceled[tabName]) if ((parent.isCanceled[tabName] != null && (bool)parent.isCanceled[tabName])
@ -1322,13 +1375,25 @@ namespace Safedispatch_4_0
} }
tempPos = (SMposition)Point_for_play[Index_to_play]; tempPos = (SMposition)Point_for_play[Index_to_play];
if (MainForm2.isInMile) volSpeedString = Convert.ToString((int)Math.Round(tempPos.m_speed * 0.621371192));
else volSpeedString = Convert.ToString((int)(tempPos.m_speed));
vehSelect = tempPos.m_vehName + "_" + tempPos.m_posID.ToString();
if (onthelimit) if (onthelimit)
worker.ReportProgress(2, tempPos.m_evnt_id); worker.ReportProgress(2, tempPos.m_evnt_id);
else else
{ {
//String note = createnote(tempPos);
updatecomand = FormatUpdateCommand(tempPos, false); //updatecomand = "updateDataset,heading_positions," + MainForm2.FixDoubleLAT(tempPos.m_lat.ToString()) + "," + MainForm2.FixDoubleLNG(tempPos.m_lng.ToString()) + "," + vehSelect + "," + note + "," + GetSymbName(busSymb.GetSymbolFromOrientation(tempPos.m_heading));
updatecomand = "updateDataset,heading_positions," + MainForm2.FixDoubleLAT(tempPos.m_lat.ToString())
+ "," + MainForm2.FixDoubleLNG(tempPos.m_lng.ToString())
+ "," + (tempPos.m_time).ConvertGMTToLocal().GetDTFromSeconds().ToString("yyyy-MM-dd HH:mm:ss")
+ "," + tempPos.m_vehName + "_" + tempPos.m_posID
+ "," + volSpeedString + (MainForm2.isInMile ? "mph" : "kph")
+ "," + tempPos.m_alt
+ "," + MainForm2.FixComma(tempPos.m_address) + ","
+ "history/" + GetSymbName(busSymb.GetSymbolFromOrientation(tempPos.m_heading)) + ","
+ "false" + "," + "false" + "," + "false";
worker.ReportProgress(1, tempPos.m_evnt_id); worker.ReportProgress(1, tempPos.m_evnt_id);
} }
} }
@ -1350,41 +1415,6 @@ namespace Safedispatch_4_0
return 0; return 0;
} }
private string FormatUpdateCommand(SMposition tempPos, bool firstGoogle)
{
// Convert To Km
string volSpeedString = ConvertToKm(tempPos);
string vehSelect = $"{tempPos.m_vehName}_{tempPos.m_posID}";
string command = firstGoogle ? "setDataset" : "updateDataset";
string updateComand = $"{command},heading_positions"
+ "," + MainForm2.FixDoubleLAT(tempPos.m_lat.ToString())
+ "," + MainForm2.FixDoubleLNG(tempPos.m_lng.ToString())
+ "," + (tempPos.m_time).ConvertGMTToLocal().GetDTFromSeconds().ToString("yyyy-MM-dd HH:mm:ss")
+ "," + tempPos.m_vehName + "_" + tempPos.m_posID
+ "," + volSpeedString + (MainForm2.isInMile ? "mph" : "kph")
+ "," + tempPos.m_alt
+ "," + MainForm2.FixComma(tempPos.m_address) + ","
+ "history/" + GetSymbName(busSymb.GetSymbolFromOrientation(tempPos.m_heading)) + ","
+ "false" + "," + "false" + "," + "false";
return updateComand;
}
private string ConvertToKm(SMposition obj)
{
if (MainForm2.isInMile)
return Convert.ToString((int)Math.Round(obj.m_speed * 0.621371192));
return Convert.ToString((int)(obj.m_speed));
}
// Mihai // Mihai
private bool changeTrackbarValueFromCode = false; private bool changeTrackbarValueFromCode = false;
/// <summary> /// <summary>
@ -1438,14 +1468,12 @@ namespace Safedispatch_4_0
{ {
hitLimit = false; hitLimit = false;
string proc1 = MainForm2.returnLNGString("Update"), string proc1 = MainForm2.returnLNGString("Update"),
proc2 = MainForm2.returnLNGString("Retriev"), proc2 = MainForm2.returnLNGString("Retriev"),
proc3 = MainForm2.returnLNGString("Computing"), proc3 = MainForm2.returnLNGString("Computing"),
proc4 = MainForm2.returnLNGString("DelOld"); proc4 = MainForm2.returnLNGString("DelOld");
txProgStatus.Invoke(new UpdateStatusBarCallBack(this.UpdateStatusBar),proc4); txProgStatus.Invoke(new UpdateStatusBarCallBack(this.UpdateStatusBar),proc4);
Thread.Sleep(5000); Thread.Sleep(5000);
Pushpinx pp1 = null; Pushpinx pp1 = null;
Locationx[] posTemp = null; Locationx[] posTemp = null;
Shapex shp = null; Shapex shp = null;
@ -1455,7 +1483,6 @@ namespace Safedispatch_4_0
String SpeedData = "mile"; String SpeedData = "mile";
String AddressData = ""; String AddressData = "";
IdReportHS.Clear(); IdReportHS.Clear();
if (closeTabThread) if (closeTabThread)
{ {
e.Cancel = true; e.Cancel = true;
@ -1543,7 +1570,6 @@ namespace Safedispatch_4_0
List_of_Name_for_History.Add(unit.Text); List_of_Name_for_History.Add(unit.Text);
int contRoute = -1; int contRoute = -1;
Int32 number = 0; Int32 number = 0;
ArrayList POSList = new ArrayList(); ArrayList POSList = new ArrayList();
SM.Debug("value for name:" + unit.Text); SM.Debug("value for name:" + unit.Text);
if (DataPos[unit.Text] != null) if (DataPos[unit.Text] != null)
@ -1602,7 +1628,6 @@ namespace Safedispatch_4_0
//note //note
if (MainForm2.isInMile) SpeedData = " ;" + MainForm2.langSpeed + " " + Convert.ToString((int)Math.Round(obj3.m_speed * 0.621371192)) + MainForm2.milesh; if (MainForm2.isInMile) SpeedData = " ;" + MainForm2.langSpeed + " " + Convert.ToString((int)Math.Round(obj3.m_speed * 0.621371192)) + MainForm2.milesh;
else SpeedData = " ;" + MainForm2.langSpeed + " " + Convert.ToString(obj3.m_speed) + MainForm2.kmh; else SpeedData = " ;" + MainForm2.langSpeed + " " + Convert.ToString(obj3.m_speed) + MainForm2.kmh;
if ((obj3.m_address != "") && (obj3.m_address != " ")) if ((obj3.m_address != "") && (obj3.m_address != " "))
{ {
try try
@ -1616,7 +1641,6 @@ namespace Safedispatch_4_0
} }
} }
else AddressData = ""; else AddressData = "";
pp1.Note = MainForm2.langTime + " " + obj3.m_time.DateTimeOfDayHHMMLocal() + SpeedData + AddressData; pp1.Note = MainForm2.langTime + " " + obj3.m_time.DateTimeOfDayHHMMLocal() + SpeedData + AddressData;
pp1.BalloonState = GeoBalloonStatex.geoDisplayNone; pp1.BalloonState = GeoBalloonStatex.geoDisplayNone;
if (closeTabThread) if (closeTabThread)
@ -1624,13 +1648,11 @@ namespace Safedispatch_4_0
e.Cancel = true; e.Cancel = true;
return 1; return 1;
} }
// pp1.MoveTo(vehiclesDataSet2); // pp1.MoveTo(vehiclesDataSet2);
progStep++; progStep++;
if (minTime > obj3.m_time) if (minTime > obj3.m_time)
minTime = obj3.m_time; minTime = obj3.m_time;
if (maxTime < obj3.m_time) if (maxTime < obj3.m_time)
maxTime = obj3.m_time; maxTime = obj3.m_time;
} }
@ -1646,7 +1668,6 @@ namespace Safedispatch_4_0
latlnt.Add(pos[k].Latitude); latlnt.Add(pos[k].Latitude);
latlnt.Add(pos[k].Longitude); latlnt.Add(pos[k].Longitude);
} }
if (posTemp.Length > 1) if (posTemp.Length > 1)
{ {
if (closeTabThread) return 1; if (closeTabThread) return 1;
@ -1723,19 +1744,14 @@ namespace Safedispatch_4_0
foreach (SMposition obj in selectedPositions) foreach (SMposition obj in selectedPositions)
{ {
contx++; contx++;
// convert to km if (MainForm2.isInMile) volSpeedString = Convert.ToString((int)Math.Round(obj.m_speed * 0.621371192));
volSpeedString = ConvertToKm(obj); else volSpeedString = Convert.ToString((int)(obj.m_speed));
volAddress = obj.m_address; volAddress = obj.m_address;
if ((volAddress == "") || (volAddress == " ")) if ((volAddress == "") || (volAddress == " ")) volAddress = "LAT:" + Math.Round(obj.m_lat, 5).ToString() + " , LNG:" + Math.Round(obj.m_lng, 5).ToString();
volAddress = "LAT:" + Math.Round(obj.m_lat, 5).ToString() + " , LNG:" + Math.Round(obj.m_lng, 5).ToString();
ListforGrid.Add(new DataforGRID(contx.ToString(), obj.m_vehName, (obj.m_time).ConvertGMTToLocal().GetDTFromSeconds(), volAddress, volSpeedString, "", "", ListforGrid.Add(new DataforGRID(contx.ToString(), obj.m_vehName, (obj.m_time).ConvertGMTToLocal().GetDTFromSeconds(), volAddress, volSpeedString, "", "",
Math.Round(obj.m_lat, 5).ToString(), Math.Round(obj.m_lng, 5).ToString(), Math.Round(obj.m_alt, 5).ToString(),obj.m_heading)); Math.Round(obj.m_lat, 5).ToString(), Math.Round(obj.m_lng, 5).ToString(), Math.Round(obj.m_alt, 5).ToString(),obj.m_heading));
obj.m_evnt_id = contx; obj.m_evnt_id = contx;
SliderPosition.Add(SliderCount); SliderPosition.Add(SliderCount);
if ((obj.m_lat != 0) && (obj.m_lng != 0)) if ((obj.m_lat != 0) && (obj.m_lng != 0))
{ {
Point_for_play.Add(obj); Point_for_play.Add(obj);
@ -1781,8 +1797,8 @@ namespace Safedispatch_4_0
{ {
if (docLoad) if (docLoad)
{ {
ExecuteScript(obj); mapGoogles.ExecuteScript("window.GWTcallback('" + obj + "');");
ExecuteScript($"removelabels,{((String [])obj.Split(",".ToCharArray()))[4]}"); mapGoogles.ExecuteScript("window.GWTcallback('removelabels," + ((String [])obj.Split(','))[4] + "');");
} }
} }
//end history //end history
@ -1802,10 +1818,9 @@ namespace Safedispatch_4_0
+ DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ",,,,,,false,false,false"; + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ",,,,,,false,false,false";
ExecuteScript(corner); mapGoogles.ExecuteScript("window.GWTcallback('" + corner + "');");
ExecuteScript("putOnMap,once,corner_positions"); mapGoogles.ExecuteScript("window.GWTcallback('" + "putOnMap,once,corner_positions" + "');");
ExecuteScript("removelabels,corner_positions"); mapGoogles.ExecuteScript("window.GWTcallback('" + "removelabels,corner_positions" + "');");
/* SM.Debug("Face ZOOM pe un dataset"); /* SM.Debug("Face ZOOM pe un dataset");
if (vehiclesDataSet2.RecordCount > 0) if (vehiclesDataSet2.RecordCount > 0)
vehiclesDataSet2.ZoomTo();*/ vehiclesDataSet2.ZoomTo();*/
@ -1867,9 +1882,7 @@ namespace Safedispatch_4_0
} }
if (MainForm2.Connfailed) if (MainForm2.Connfailed)
{ {
if ((MainForm2.radioType == RADIOTYPE.HARRIS)||(MainForm2.radioType == RADIOTYPE.ATLAS)) if ((MainForm2.radioType == RADIOTYPE.HARRIS)||(MainForm2.radioType == RADIOTYPE.ATLAS)) ((RadLabel)RadMessageBox.Instance.Controls[1]).LabelElement.ForeColor = MainForm2.HarTextColor;
((RadLabel)RadMessageBox.Instance.Controls[1]).LabelElement.ForeColor = MainForm2.HarTextColor;
RadMessageBox.Show(MainForm2.returnLNGString("database"), MainForm2.returnLNGString("war"), MessageBoxButtons.OK, RadMessageIcon.Exclamation); RadMessageBox.Show(MainForm2.returnLNGString("database"), MainForm2.returnLNGString("war"), MessageBoxButtons.OK, RadMessageIcon.Exclamation);
MainForm2.Connfailed = false; MainForm2.Connfailed = false;
} }
@ -1879,8 +1892,6 @@ namespace Safedispatch_4_0
{ {
backgroundWorker1.RunWorkerAsync(); backgroundWorker1.RunWorkerAsync();
VisualSettings.loadUserVisualSettings(this.Name, this.toolWindow4, MainForm2.HashVal); VisualSettings.loadUserVisualSettings(this.Name, this.toolWindow4, MainForm2.HashVal);
// convert in km
if (MainForm2.isInMile) if (MainForm2.isInMile)
{ {
rseSpeedLower.Value = (int)Math.Round(Convert.ToInt32(rseSpeedLower.Value) * 0.621371192); rseSpeedLower.Value = (int)Math.Round(Convert.ToInt32(rseSpeedLower.Value) * 0.621371192);
@ -1911,7 +1922,7 @@ namespace Safedispatch_4_0
try try
{ {
if (e.ProgressPercentage == 3) if (e.ProgressPercentage == 3)
ExecuteScript("removeDataset,heading_positions"); mapGoogles.ExecuteScript("window.GWTcallback('" + "removeDataset,heading_positions" + "');");
else else
{ {
Int32 index = (Int32)e.UserState; Int32 index = (Int32)e.UserState;
@ -1925,21 +1936,18 @@ namespace Safedispatch_4_0
} }
if (e.ProgressPercentage == 1) if (e.ProgressPercentage == 1)
{ {
//Utils.WriteLine("Yellow: " + updatecomand, ConsoleColor.Yellow);
ExecuteScript(updatecomand); mapGoogles.ExecuteScript("window.GWTcallback('" + updatecomand + "');");
if (updatecomand.StartsWith("setDataset,heading_positions")) if (updatecomand.StartsWith("setDataset,heading_positions"))
{ {
if (rcbShowLabels.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On) if (rcbShowLabels.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On)
ExecuteScript("putlabels,heading_positions"); mapGoogles.ExecuteScript("window.GWTcallback('" + "putlabels,heading_positions" + "');");
else else mapControl.mapGoogles.ExecuteScript("window.GWTcallback('" + "removelabels,heading_positions" + "');");
mapControl.mapGoogles.ExecuteScript("window.GWTcallback('" + "removelabels,heading_positions" + "');");
} }
ExecuteScript("putOnMap,none,heading_positions"); mapGoogles.ExecuteScript("window.GWTcallback('" + "putOnMap,none,heading_positions" + "');");
} }
mapGoogles.ExecuteScript("window.GWTcallback('" + "openInfo," + vehSelect + "');");
ExecuteScript($"openInfo,{vehSelect}"); mapGoogles?.ExecuteScript($"window.GWTcallback('centerzoom,{latitude},{longitude},-1');");
ExecuteScript($"centerzoom,{latitude},{longitude},-1");
} }
} }
catch (Exception ex) catch (Exception ex)
@ -1950,10 +1958,7 @@ namespace Safedispatch_4_0
} }
private void ExecuteScript(string command)
{
mapGoogles?.ExecuteScript($"window.GWTcallback('{command}');");
}
@ -2082,9 +2087,7 @@ namespace Safedispatch_4_0
{ {
if (FirstGoogle) if (FirstGoogle)
{ {
mapGoogles.ExecuteScript("window.GWTcallback('removeDataset,heading_positions');");
ExecuteScript("removeDataset,heading_positions");
updatecomand = "setDataset,heading_positions,"; updatecomand = "setDataset,heading_positions,";
FirstGoogle = false; FirstGoogle = false;
@ -2103,15 +2106,11 @@ namespace Safedispatch_4_0
Utils.WriteLine(updatecomand,ConsoleColor.Blue); Utils.WriteLine(updatecomand,ConsoleColor.Blue);
if (docLoad) if (docLoad)
{ {
mapGoogles.ExecuteScript("window.GWTcallback('" + updatecomand + "');");
ExecuteScript(updatecomand);
if (PutonMap) if (PutonMap)
ExecuteScript("putOnMap,none,heading_positions"); mapGoogles.ExecuteScript("window.GWTcallback('" + "putOnMap,none,heading_positions" + "');");
mapGoogles.ExecuteScript("window.GWTcallback('" + "openInfo," + gridData.VehName + "_" + gridData.Id + "');");
ExecuteScript($"openInfo,{gridData.VehName}_{gridData.Id}"); mapGoogles?.ExecuteScript($"window.GWTcallback('centerzoom,{gridData.Lat},{gridData.Lng},-1');");
ExecuteScript($"centerzoom,{gridData.Lat},{gridData.Lng},-1");
} }
} }
@ -2126,7 +2125,7 @@ namespace Safedispatch_4_0
{ {
if (docLoad) if (docLoad)
{ {
ExecuteScript($"openInfo,{pp.Name}"); mapGoogles.ExecuteScript("window.GWTcallback('" + "openInfo," + pp.Name + "');");
} }
} }
@ -2164,7 +2163,6 @@ namespace Safedispatch_4_0
{ {
tmpAddrAndID.LNG = Math.Round(tmpAddrAndID.LNG, 4); tmpAddrAndID.LNG = Math.Round(tmpAddrAndID.LNG, 4);
tmpAddrAndID.LAT = Math.Round(tmpAddrAndID.LAT, 4); tmpAddrAndID.LAT = Math.Round(tmpAddrAndID.LAT, 4);
valHash = tmpAddrAndID.LNG + tmpAddrAndID.LAT * 0.000001; valHash = tmpAddrAndID.LNG + tmpAddrAndID.LAT * 0.000001;
if (MainForm2.AddrHass[valHash] != null) if (MainForm2.AddrHass[valHash] != null)
{ {
@ -2186,7 +2184,6 @@ namespace Safedispatch_4_0
{ {
Utils.WriteLine(ex.ToString(), ConsoleColor.Red); Utils.WriteLine(ex.ToString(), ConsoleColor.Red);
} }
if (!findaddress) if (!findaddress)
{ {
tmpAddrAndID.Address = volltmpGo2.getAddressLATLNG(tmpAddrAndID.LAT, tmpAddrAndID.LNG); tmpAddrAndID.Address = volltmpGo2.getAddressLATLNG(tmpAddrAndID.LAT, tmpAddrAndID.LNG);
@ -2214,43 +2211,41 @@ namespace Safedispatch_4_0
IdReportHS[tmpAddrAndID.ID.ToString()] = tmpAddrAndID.Address; IdReportHS[tmpAddrAndID.ID.ToString()] = tmpAddrAndID.Address;
if (inwhile) if (inwhile)
HistroyProgBar.Invoke(new UpdateProgressBarCallBack(this.UpdateProgressBar), -1); HistroyProgBar.Invoke(new UpdateProgressBarCallBack(this.UpdateProgressBar), -1);
SM.Debug("Baga google in hash ID:" + tmpAddrAndID.ID.ToString() + "Addr:" + tmpAddrAndID.Address); SM.Debug("Baga google in hash ID:" + tmpAddrAndID.ID.ToString() + "Addr:" + tmpAddrAndID.Address);
} }
//else else
//{ {
// //dau in open street maps si apoi ies prin prin cene //dau in open street maps si apoi ies prin prin cene
// Thread.Sleep(1100); Thread.Sleep(1100);
// tmpAddrAndID.Address = volltmpGo2.getAddressLATLNG2(tmpAddrAndID.LAT, tmpAddrAndID.LNG); tmpAddrAndID.Address = volltmpGo2.getAddressLATLNG2(tmpAddrAndID.LAT, tmpAddrAndID.LNG);
// if ((tmpAddrAndID.Address != "") && (tmpAddrAndID.Address != " ")) if ((tmpAddrAndID.Address != "") && (tmpAddrAndID.Address != " "))
// { {
// if (!findaddress) if (!findaddress)
// { {
// try try
// { {
// if (tmpAddrAndID.Address != "N/A") if (tmpAddrAndID.Address != "N/A")
// { {
// valHash = tmpAddrAndID.LNG + tmpAddrAndID.LAT * 0.000001; valHash = tmpAddrAndID.LNG + tmpAddrAndID.LAT * 0.000001;
// MainForm2.AddrHass.Add(valHash, tmpAddrAndID.Address); MainForm2.AddrHass.Add(valHash, tmpAddrAndID.Address);
// AddrtmpX = smdbObj.get_address(tmpAddrAndID.LAT, tmpAddrAndID.LNG); //just for avoid Error from Event Viewer AddrtmpX = smdbObj.get_address(tmpAddrAndID.LAT, tmpAddrAndID.LNG); //just for avoid Error from Event Viewer
// if (AddrtmpX == "") smdbObj.Insert_Address(tmpAddrAndID.Address, tmpAddrAndID.LAT, tmpAddrAndID.LNG); if (AddrtmpX == "") smdbObj.Insert_Address(tmpAddrAndID.Address, tmpAddrAndID.LAT, tmpAddrAndID.LNG);
// } }
// } }
// catch (Exception ex) catch (Exception ex)
// { {
// SM.Debug("Error: " + ex.ToString()); SM.Debug("Error: " + ex.ToString());
// } }
// } }
IdReportHS[tmpAddrAndID.ID.ToString()] = tmpAddrAndID.Address;
// IdReportHS[tmpAddrAndID.ID.ToString()] = tmpAddrAndID.Address; if (inwhile) HistroyProgBar.Invoke(new UpdateProgressBarCallBack(this.UpdateProgressBar), -1);
// if (inwhile) HistroyProgBar.Invoke(new UpdateProgressBarCallBack(this.UpdateProgressBar), -1); SM.Debug("Baga open street maps in hash ID:"+tmpAddrAndID.ID.ToString() + "Addr:" + tmpAddrAndID.Address);
// SM.Debug("Baga open street maps in hash ID:"+tmpAddrAndID.ID.ToString() + "Addr:" + tmpAddrAndID.Address); }
// } else
// else {
// { SM.Debug("Iese prin Cene cu nimic");
// SM.Debug("Iese prin Cene cu nimic"); }
// } }
//}
} }
} }
catch (Exception ex) catch (Exception ex)
@ -2337,10 +2332,10 @@ namespace Safedispatch_4_0
{ {
try try
{ {
int cont = 0;
if (docLoad) if (docLoad)
{ {
mapGoogles.ExecuteScript("window.GWTcallback('" + "deletePolygon,ALL');");
ExecuteScript("deletePolygon,ALL");
nrNavigatecnt++; nrNavigatecnt++;
} }
@ -2392,8 +2387,7 @@ namespace Safedispatch_4_0
{ {
if (docLoad) if (docLoad)
{ {
mapGoogles.ExecuteScript("window.GWTcallback('" + "deletePolygon,ALL');");
ExecuteScript("deletePolygon,ALL");
nrNavigatecnt++; nrNavigatecnt++;
} }
} }
@ -2479,7 +2473,6 @@ namespace Safedispatch_4_0
/// </summary> /// </summary>
private void speedLimit_CheckStateChanged(object sender, EventArgs e) private void speedLimit_CheckStateChanged(object sender, EventArgs e)
{ {
if ((RadCheckBox)sender == rcbSpeedLower) if ((RadCheckBox)sender == rcbSpeedLower)
rseSpeedLower.Enabled = ((RadCheckBox)sender).Checked; rseSpeedLower.Enabled = ((RadCheckBox)sender).Checked;
else if ((RadCheckBox)sender == rcbSpeedUpper) else if ((RadCheckBox)sender == rcbSpeedUpper)
@ -2707,22 +2700,26 @@ namespace Safedispatch_4_0
private void timeTrackBar_ValueChanged(object sender, EventArgs e) private void timeTrackBar_ValueChanged(object sender, EventArgs e)
{ {
Utils.WriteLine(timeTrackBar.Value.ToString(), ConsoleColor.Yellow); Utils.WriteLine(timeTrackBar.Value.ToString(), ConsoleColor.Yellow);
if (changeTrackbarValueFromCode) if (changeTrackbarValueFromCode)
{ {
changeTrackbarValueFromCode = false; changeTrackbarValueFromCode = false;
return; return;
} }
try try
{ {
SMposition tmpos = (SMposition)Point_for_play[(Int32)timeTrackBar.Value]; SMposition tmpos = (SMposition)Point_for_play[(Int32)timeTrackBar.Value];
if (MainForm2.isInMile) volSpeedString = Convert.ToString((int)Math.Round(tmpos.m_speed * 0.621371192));
else volSpeedString = Convert.ToString((int)(tmpos.m_speed));
Index_to_play = (Int32)timeTrackBar.Value; Index_to_play = (Int32)timeTrackBar.Value;
vehSelect = tmpos.m_vehName + "_" + tmpos.m_posID;
updatecomand = FormatUpdateCommand(tmpos, FirstGoogle);
if (FirstGoogle) if (FirstGoogle)
{
mapGoogles.ExecuteScript("window.GWTcallback('removeDataset,heading_positions');");
updatecomand = "setDataset,heading_positions";
FirstGoogle = false; FirstGoogle = false;
}
else updatecomand = "updateDataset,heading_positions";
Int32 index = tmpos.m_evnt_id; Int32 index = tmpos.m_evnt_id;
if ((index >= 0) && (index < gridHistoryPoints.RowCount)) if ((index >= 0) && (index < gridHistoryPoints.RowCount))
@ -2731,15 +2728,21 @@ namespace Safedispatch_4_0
gridHistoryPoints.Rows[index].IsSelected = true; gridHistoryPoints.Rows[index].IsSelected = true;
gridHistoryPoints.Rows[index].IsCurrent = true; gridHistoryPoints.Rows[index].IsCurrent = true;
} }
updatecomand = updatecomand + ","
+ MainForm2.FixDoubleLAT(tmpos.m_lat.ToString()) + ","
updatecomand = FormatUpdateCommand(tmpos, FirstGoogle); + MainForm2.FixDoubleLNG(tmpos.m_lng.ToString()) + ","
+ (tmpos.m_time).ConvertGMTToLocal().GetDTFromSeconds().ToString("yyyy-MM-dd HH:mm:ss") + ","
ExecuteScript(updatecomand); + vehSelect + ","
ExecuteScript("putOnMap,none,heading_positions"); + volSpeedString + (MainForm2.isInMile ? "mph" : "kph") + "," +
ExecuteScript($"openInfo,{vehSelect}"); + tmpos.m_alt + ","
ExecuteScript($"centerzoom,{tmpos.m_lat},{tmpos.m_lng},-1"); + MainForm2.FixComma(tmpos.m_address) + ","
+ "history/" + GetSymbName(busSymb.GetSymbolFromOrientation(tmpos.m_heading)) + ","
+ "false" + "," + "false" + "," + "false";
//Utils.WriteLine("Green: "+updatecomand,ConsoleColor.Green);
mapGoogles.ExecuteScript("window.GWTcallback('" + updatecomand + "');");
mapGoogles.ExecuteScript("window.GWTcallback('" + "putOnMap,none,heading_positions" + "');");
mapGoogles.ExecuteScript("window.GWTcallback('" + "openInfo," + vehSelect + "');");
mapGoogles?.ExecuteScript($"window.GWTcallback('centerzoom,{tmpos.m_lat},{tmpos.m_lng},-1');");
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -2757,7 +2760,7 @@ namespace Safedispatch_4_0
// remove old dataset points // remove old dataset points
if (docLoad) if (docLoad)
{ {
ExecuteScript("reset"); mapGoogles.ExecuteScript("window.GWTcallback('" + "reset" + "');");
} }
MaxLAT = -90; MaxLAT = -90;
@ -2767,10 +2770,11 @@ namespace Safedispatch_4_0
Index_to_play = 0; Index_to_play = 0;
FirstGoogle = true; FirstGoogle = true;
selectedPositions.Clear(); selectedPositions.Clear();
if (gridHistoryPoints.Rows.Count > 0) if (gridHistoryPoints.Rows.Count > 0)
{
gridHistoryPoints.Rows.Clear(); gridHistoryPoints.Rows.Clear();
}
gridHistoryPoints.DataSource = null; gridHistoryPoints.DataSource = null;
@ -2778,8 +2782,6 @@ namespace Safedispatch_4_0
foreach (RadTreeNode node in treeViewUnits.Nodes) foreach (RadTreeNode node in treeViewUnits.Nodes)
node.Checked = false; node.Checked = false;
// clear speed values // clear speed values
rseSpeedLower.Value = 0; rseSpeedLower.Value = 0;
rseSpeedUpper.Value = 0; rseSpeedUpper.Value = 0;
@ -2824,13 +2826,9 @@ namespace Safedispatch_4_0
try try
{ {
if (rcbShowLabels.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On) if (rcbShowLabels.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On)
mapGoogles.ExecuteScript("window.GWTcallback('" + "putlabels,heading_positions"+ "');");
ExecuteScript("putlabels, heading_positions"); else mapGoogles.ExecuteScript("window.GWTcallback('" + "removelabels,heading_positions" + "');");
else
ExecuteScript("removelabels, heading_positions");
Thread.Sleep(1); Thread.Sleep(1);
checkbox_UpdateHT(sender, args); checkbox_UpdateHT(sender, args);
} }
catch (Exception ex) catch (Exception ex)
@ -2850,7 +2848,6 @@ namespace Safedispatch_4_0
if (rcbShowGeofence.Checked) if (rcbShowGeofence.Checked)
ForceShowZone(); ForceShowZone();
else ForceHideZone(); else ForceHideZone();
checkbox_UpdateHT(sender, args); checkbox_UpdateHT(sender, args);
} }
catch (Exception ex) catch (Exception ex)
@ -2865,8 +2862,10 @@ namespace Safedispatch_4_0
/// </summary> /// </summary>
private void rbtAnimation_EnabledChanged(object sender, EventArgs e) private void rbtAnimation_EnabledChanged(object sender, EventArgs e)
{ {
Color bkColor = ((RadButton)sender).Enabled ? MainForm2.ButtonColor : MainForm2.ButtonColorDisabled; if(((RadButton)sender).Enabled)
((RadButton)sender).ButtonElement.ButtonFillElement.BackColor = bkColor; ((RadButton)sender).ButtonElement.ButtonFillElement.BackColor = MainForm2.ButtonColor;
else
((RadButton)sender).ButtonElement.ButtonFillElement.BackColor = MainForm2.ButtonColorDisabled;
} }
@ -2955,27 +2954,17 @@ namespace Safedispatch_4_0
{ {
if (isLoaded) if (isLoaded)
{ {
int value = Convert.ToInt32(((RadSpinEditor)sender).Value);
RadSpinEditor spinEditor = sender as RadSpinEditor; if (((RadSpinEditor)sender).Name == "rseSpeedLower" || ((RadSpinEditor)sender).Name == "rseSpeedUpper")
int value = Convert.ToInt32(spinEditor.Value);
if (spinEditor.Name.Equals("rseSpeedLower") || spinEditor.Name.Equals("rseSpeedUpper"))
{ {
if (MainForm2.isInMile) value = (int)(value * 1.60934); if (MainForm2.isInMile) value = (int)(value * 1.60934);
} }
VisualSettings.InsertUpdateHTforVisualItems(this.Name, spinEditor.Name, value.ToString()); VisualSettings.InsertUpdateHTforVisualItems(this.Name, ((RadSpinEditor)sender).Name, value.ToString());
if (((RadSpinEditor)sender).Name == "rsePositionDisplay")
string spinEditorName = string.Empty; VisualSettings.InsertUpdateHTforVisualItems("hisPlayTime", value.ToString());
if (((RadSpinEditor)sender).Name == "rseSkipSeconds")
if (spinEditor.Name.Equals("rsePositionDisplay")) VisualSettings.InsertUpdateHTforVisualItems("hisPauseTime", value.ToString());
spinEditorName = "hisPlayTime";
else if (spinEditor.Name.Equals("rseSkipSeconds"))
spinEditorName = "hisPauseTime";
if(!string.IsNullOrEmpty(spinEditorName))
VisualSettings.InsertUpdateHTforVisualItems(spinEditorName, value.ToString());
} }
} }
/// <summary> /// <summary>

View File

@ -41,7 +41,7 @@ namespace Safedispatch_4_0
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition(); Telerik.WinControls.UI.TableViewDefinition tableViewDefinition6 = new Telerik.WinControls.UI.TableViewDefinition();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HistoryTab)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HistoryTab));
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.textBox3 = new Telerik.WinControls.UI.RadTextBox(); this.textBox3 = new Telerik.WinControls.UI.RadTextBox();
@ -60,6 +60,24 @@ namespace Safedispatch_4_0
this.GoogleClick = new System.Windows.Forms.Timer(this.components); this.GoogleClick = new System.Windows.Forms.Timer(this.components);
this.StartBasicHistory = new System.Windows.Forms.Timer(this.components); this.StartBasicHistory = new System.Windows.Forms.Timer(this.components);
this.radDock1 = new Telerik.WinControls.UI.Docking.RadDock(); this.radDock1 = new Telerik.WinControls.UI.Docking.RadDock();
this.windowHistoryResult = new Telerik.WinControls.UI.Docking.ToolWindow();
this.panelAnimationButtons = new Telerik.WinControls.UI.RadPanel();
this.rbPrev = new Telerik.WinControls.UI.RadButton();
this.rbNext = new Telerik.WinControls.UI.RadButton();
this.rbStop = new Telerik.WinControls.UI.RadButton();
this.rbPause = new Telerik.WinControls.UI.RadButton();
this.rbPlay = new Telerik.WinControls.UI.RadButton();
this.gridHistoryPoints = new Telerik.WinControls.UI.RadGridView();
this.timeTrackBar = new Telerik.WinControls.UI.RadTrackBar();
this.rsePositionDisplay = new Telerik.WinControls.UI.RadSpinEditor();
this.rseSkipSeconds = new Telerik.WinControls.UI.RadSpinEditor();
this.radLabel10 = new Telerik.WinControls.UI.RadLabel();
this.labelSlideshow = new Telerik.WinControls.UI.RadLabel();
this.rcbShowLabels = new Telerik.WinControls.UI.RadCheckBox();
this.rcbShowGeofence = new Telerik.WinControls.UI.RadCheckBox();
this.rlPositionDisplayMs = new Telerik.WinControls.UI.RadLabel();
this.rlAnimation = new Telerik.WinControls.UI.RadLabel();
this.toolTabStripTabs = new Telerik.WinControls.UI.Docking.ToolTabStrip();
this.toolWindow4 = new Telerik.WinControls.UI.Docking.ToolWindow(); this.toolWindow4 = new Telerik.WinControls.UI.Docking.ToolWindow();
this.pbFilter = new System.Windows.Forms.PictureBox(); this.pbFilter = new System.Windows.Forms.PictureBox();
this.rbResetHistory = new Telerik.WinControls.UI.RadButton(); this.rbResetHistory = new Telerik.WinControls.UI.RadButton();
@ -79,24 +97,6 @@ namespace Safedispatch_4_0
this.treeViewUnits = new Telerik.WinControls.UI.RadTreeView(); this.treeViewUnits = new Telerik.WinControls.UI.RadTreeView();
this.rlHistoryForSelectedUnits = new Telerik.WinControls.UI.RadLabel(); this.rlHistoryForSelectedUnits = new Telerik.WinControls.UI.RadLabel();
this.labelUnits = new Telerik.WinControls.UI.RadLabel(); this.labelUnits = new Telerik.WinControls.UI.RadLabel();
this.toolTabStripTabs = new Telerik.WinControls.UI.Docking.ToolTabStrip();
this.windowHistoryResult = new Telerik.WinControls.UI.Docking.ToolWindow();
this.panelAnimationButtons = new Telerik.WinControls.UI.RadPanel();
this.rbPrev = new Telerik.WinControls.UI.RadButton();
this.rbNext = new Telerik.WinControls.UI.RadButton();
this.rbStop = new Telerik.WinControls.UI.RadButton();
this.rbPause = new Telerik.WinControls.UI.RadButton();
this.rbPlay = new Telerik.WinControls.UI.RadButton();
this.gridHistoryPoints = new Telerik.WinControls.UI.RadGridView();
this.timeTrackBar = new Telerik.WinControls.UI.RadTrackBar();
this.rsePositionDisplay = new Telerik.WinControls.UI.RadSpinEditor();
this.rseSkipSeconds = new Telerik.WinControls.UI.RadSpinEditor();
this.radLabel10 = new Telerik.WinControls.UI.RadLabel();
this.labelSlideshow = new Telerik.WinControls.UI.RadLabel();
this.rcbShowLabels = new Telerik.WinControls.UI.RadCheckBox();
this.rcbShowGeofence = new Telerik.WinControls.UI.RadCheckBox();
this.rlPositionDisplayMs = new Telerik.WinControls.UI.RadLabel();
this.rlAnimation = new Telerik.WinControls.UI.RadLabel();
this.documentContainer1 = new Telerik.WinControls.UI.Docking.DocumentContainer(); this.documentContainer1 = new Telerik.WinControls.UI.Docking.DocumentContainer();
this.documentTabStrip1 = new Telerik.WinControls.UI.Docking.DocumentTabStrip(); this.documentTabStrip1 = new Telerik.WinControls.UI.Docking.DocumentTabStrip();
this.documentWindow1 = new Telerik.WinControls.UI.Docking.DocumentWindow(); this.documentWindow1 = new Telerik.WinControls.UI.Docking.DocumentWindow();
@ -126,27 +126,6 @@ namespace Safedispatch_4_0
((System.ComponentModel.ISupportInitialize)(this.skinButton4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.skinButton4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radDock1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radDock1)).BeginInit();
this.radDock1.SuspendLayout(); this.radDock1.SuspendLayout();
this.toolWindow4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbFilter)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rbResetHistory)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rbSearchHistory)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rcbComputeAddress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rcbSpeedUpper)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rseSpeedUpper)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pb24H)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rcbSpeedLower)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rtbFilterUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rseSpeedLower)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rdpEndTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rdpStartTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rcb24H)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rlUntil)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.treeViewUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rlHistoryForSelectedUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.labelUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.toolTabStripTabs)).BeginInit();
this.toolTabStripTabs.SuspendLayout();
this.windowHistoryResult.SuspendLayout(); this.windowHistoryResult.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelAnimationButtons)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.panelAnimationButtons)).BeginInit();
this.panelAnimationButtons.SuspendLayout(); this.panelAnimationButtons.SuspendLayout();
@ -166,6 +145,27 @@ namespace Safedispatch_4_0
((System.ComponentModel.ISupportInitialize)(this.rcbShowGeofence)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rcbShowGeofence)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rlPositionDisplayMs)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rlPositionDisplayMs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rlAnimation)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rlAnimation)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.toolTabStripTabs)).BeginInit();
this.toolTabStripTabs.SuspendLayout();
this.toolWindow4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbFilter)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rbResetHistory)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rbSearchHistory)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rcbComputeAddress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rcbSpeedUpper)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rseSpeedUpper)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pb24H)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rcbSpeedLower)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rtbFilterUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rseSpeedLower)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rdpEndTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rdpStartTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rcb24H)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rlUntil)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.treeViewUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rlHistoryForSelectedUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.labelUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).BeginInit();
this.documentContainer1.SuspendLayout(); this.documentContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.documentTabStrip1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.documentTabStrip1)).BeginInit();
@ -311,6 +311,7 @@ namespace Safedispatch_4_0
this.radDock1.Location = new System.Drawing.Point(0, 0); this.radDock1.Location = new System.Drawing.Point(0, 0);
this.radDock1.MainDocumentContainer = this.documentContainer1; this.radDock1.MainDocumentContainer = this.documentContainer1;
this.radDock1.Name = "radDock1"; this.radDock1.Name = "radDock1";
this.radDock1.Padding = new System.Windows.Forms.Padding(0);
// //
// //
// //
@ -325,381 +326,6 @@ namespace Safedispatch_4_0
this.radDock1.ActiveWindowChanging += new Telerik.WinControls.UI.Docking.DockWindowCancelEventHandler(this.radDock1_ActiveWindowChanging); this.radDock1.ActiveWindowChanging += new Telerik.WinControls.UI.Docking.DockWindowCancelEventHandler(this.radDock1_ActiveWindowChanging);
this.radDock1.ActiveWindowChanged += new Telerik.WinControls.UI.Docking.DockWindowEventHandler(this.radDock1_ActiveWindowChanged); this.radDock1.ActiveWindowChanged += new Telerik.WinControls.UI.Docking.DockWindowEventHandler(this.radDock1_ActiveWindowChanged);
// //
// toolWindow4
//
this.toolWindow4.BackColor = System.Drawing.Color.WhiteSmoke;
this.toolWindow4.Caption = null;
this.toolWindow4.Controls.Add(this.pbFilter);
this.toolWindow4.Controls.Add(this.rbResetHistory);
this.toolWindow4.Controls.Add(this.rbSearchHistory);
this.toolWindow4.Controls.Add(this.rcbComputeAddress);
this.toolWindow4.Controls.Add(this.rcbSpeedUpper);
this.toolWindow4.Controls.Add(this.rseSpeedUpper);
this.toolWindow4.Controls.Add(this.pb24H);
this.toolWindow4.Controls.Add(this.rcbSpeedLower);
this.toolWindow4.Controls.Add(this.rtbFilterUnits);
this.toolWindow4.Controls.Add(this.rseSpeedLower);
this.toolWindow4.Controls.Add(this.rdpEndTime);
this.toolWindow4.Controls.Add(this.rdpStartTime);
this.toolWindow4.Controls.Add(this.rcb24H);
this.toolWindow4.Controls.Add(this.rlUntil);
this.toolWindow4.Controls.Add(this.radLabel6);
this.toolWindow4.Controls.Add(this.treeViewUnits);
this.toolWindow4.Controls.Add(this.rlHistoryForSelectedUnits);
this.toolWindow4.Controls.Add(this.labelUnits);
this.toolWindow4.DocumentButtons = Telerik.WinControls.UI.Docking.DocumentStripButtons.None;
this.toolWindow4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
this.toolWindow4.Location = new System.Drawing.Point(1, 29);
this.toolWindow4.Name = "toolWindow4";
this.toolWindow4.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.toolWindow4.Size = new System.Drawing.Size(294, 762);
this.toolWindow4.Text = "History search parameters";
this.toolWindow4.ToolCaptionButtons = Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.None;
//
// pbFilter
//
this.pbFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.pbFilter.BackColor = System.Drawing.Color.White;
this.pbFilter.Image = global::Dispatcher.Properties.Resources.i_search;
this.pbFilter.Location = new System.Drawing.Point(259, 468);
this.pbFilter.Name = "pbFilter";
this.pbFilter.Size = new System.Drawing.Size(21, 21);
this.pbFilter.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pbFilter.TabIndex = 68;
this.pbFilter.TabStop = false;
this.pbFilter.Tag = "unselected";
this.pbFilter.MouseEnter += new System.EventHandler(this.pbFilter_MouseEnter);
this.pbFilter.MouseLeave += new System.EventHandler(this.pbFilter_MouseLeave);
//
// rbResetHistory
//
this.rbResetHistory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rbResetHistory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
this.rbResetHistory.Cursor = System.Windows.Forms.Cursors.Hand;
this.rbResetHistory.Font = new System.Drawing.Font("Segoe UI", 10F);
this.rbResetHistory.Location = new System.Drawing.Point(18, 716);
this.rbResetHistory.Name = "rbResetHistory";
this.rbResetHistory.Size = new System.Drawing.Size(91, 34);
this.rbResetHistory.TabIndex = 76;
this.rbResetHistory.Text = "Reset";
this.rbResetHistory.ThemeName = "TelerikMetroBlue";
this.rbResetHistory.Click += new System.EventHandler(this.rbResetHistory_Click);
((Telerik.WinControls.UI.RadButtonElement)(this.rbResetHistory.GetChildAt(0))).Text = "Reset";
((Telerik.WinControls.Primitives.FillPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Font = new System.Drawing.Font("Segoe UI", 8F, System.Drawing.FontStyle.Bold);
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Alignment = System.Drawing.ContentAlignment.MiddleCenter;
((Telerik.WinControls.Primitives.FocusPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(3))).BackColor = System.Drawing.Color.DeepSkyBlue;
//
// rbSearchHistory
//
this.rbSearchHistory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rbSearchHistory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
this.rbSearchHistory.Cursor = System.Windows.Forms.Cursors.Hand;
this.rbSearchHistory.Font = new System.Drawing.Font("Segoe UI", 10F);
this.rbSearchHistory.Location = new System.Drawing.Point(147, 716);
this.rbSearchHistory.Name = "rbSearchHistory";
this.rbSearchHistory.Size = new System.Drawing.Size(136, 34);
this.rbSearchHistory.TabIndex = 75;
this.rbSearchHistory.Text = "Search History";
this.rbSearchHistory.ThemeName = "TelerikMetroBlue";
this.rbSearchHistory.Click += new System.EventHandler(this.btDisplayHeadingHisotry_Click);
((Telerik.WinControls.UI.RadButtonElement)(this.rbSearchHistory.GetChildAt(0))).Text = "Search History";
((Telerik.WinControls.Primitives.FillPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold);
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Alignment = System.Drawing.ContentAlignment.MiddleCenter;
((Telerik.WinControls.Primitives.FocusPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(3))).BackColor = System.Drawing.Color.DeepSkyBlue;
//
// rcbComputeAddress
//
this.rcbComputeAddress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rcbComputeAddress.BackColor = System.Drawing.Color.Transparent;
this.rcbComputeAddress.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5)))));
this.rcbComputeAddress.Location = new System.Drawing.Point(20, 679);
this.rcbComputeAddress.Name = "rcbComputeAddress";
//
//
//
this.rcbComputeAddress.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
this.rcbComputeAddress.Size = new System.Drawing.Size(119, 19);
this.rcbComputeAddress.TabIndex = 74;
this.rcbComputeAddress.Text = "Compute address";
this.rcbComputeAddress.ThemeName = "TelerikMetroBlue";
this.rcbComputeAddress.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(this.checkbox_UpdateHT);
//
// rcbSpeedUpper
//
this.rcbSpeedUpper.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rcbSpeedUpper.BackColor = System.Drawing.Color.Transparent;
this.rcbSpeedUpper.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5)))));
this.rcbSpeedUpper.Location = new System.Drawing.Point(95, 643);
this.rcbSpeedUpper.Name = "rcbSpeedUpper";
//
//
//
this.rcbSpeedUpper.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
this.rcbSpeedUpper.Size = new System.Drawing.Size(160, 19);
this.rcbSpeedUpper.TabIndex = 73;
this.rcbSpeedUpper.Text = "Upper speed limit [km/h]";
this.rcbSpeedUpper.ThemeName = "TelerikMetroBlue";
this.rcbSpeedUpper.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(this.checkbox_UpdateHT);
this.rcbSpeedUpper.CheckStateChanged += new System.EventHandler(this.speedLimit_CheckStateChanged);
//
// rseSpeedUpper
//
this.rseSpeedUpper.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rseSpeedUpper.Enabled = false;
this.rseSpeedUpper.Location = new System.Drawing.Point(19, 640);
this.rseSpeedUpper.Maximum = new decimal(new int[] {
350,
0,
0,
0});
this.rseSpeedUpper.Name = "rseSpeedUpper";
this.rseSpeedUpper.Size = new System.Drawing.Size(72, 21);
this.rseSpeedUpper.TabIndex = 72;
this.rseSpeedUpper.TabStop = false;
this.rseSpeedUpper.TextAlignment = System.Windows.Forms.HorizontalAlignment.Right;
this.rseSpeedUpper.ThemeName = "Office2013Light";
this.rseSpeedUpper.Value = new decimal(new int[] {
50,
0,
0,
0});
this.rseSpeedUpper.ValueChanged += new System.EventHandler(this.rse_ValueChanged);
//
// pb24H
//
this.pb24H.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.pb24H.BackColor = System.Drawing.Color.Transparent;
this.pb24H.Cursor = System.Windows.Forms.Cursors.Hand;
this.pb24H.Image = global::Dispatcher.Properties.Resources.h_24h;
this.pb24H.Location = new System.Drawing.Point(247, 548);
this.pb24H.Name = "pb24H";
this.pb24H.Size = new System.Drawing.Size(36, 36);
this.pb24H.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pb24H.TabIndex = 71;
this.pb24H.TabStop = false;
this.pb24H.Tag = "selected";
this.pb24H.Click += new System.EventHandler(this.pb24H_Click);
this.pb24H.MouseEnter += new System.EventHandler(this.pb24H_MouseEnter);
this.pb24H.MouseLeave += new System.EventHandler(this.pb24H_MouseLeave);
//
// rcbSpeedLower
//
this.rcbSpeedLower.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rcbSpeedLower.BackColor = System.Drawing.Color.Transparent;
this.rcbSpeedLower.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5)))));
this.rcbSpeedLower.Location = new System.Drawing.Point(95, 618);
this.rcbSpeedLower.Name = "rcbSpeedLower";
//
//
//
this.rcbSpeedLower.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
this.rcbSpeedLower.Size = new System.Drawing.Size(159, 19);
this.rcbSpeedLower.TabIndex = 70;
this.rcbSpeedLower.Text = "Lower speed limit [km/h]";
this.rcbSpeedLower.ThemeName = "TelerikMetroBlue";
this.rcbSpeedLower.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(this.checkbox_UpdateHT);
this.rcbSpeedLower.CheckStateChanged += new System.EventHandler(this.speedLimit_CheckStateChanged);
//
// rtbFilterUnits
//
this.rtbFilterUnits.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rtbFilterUnits.Font = new System.Drawing.Font("Segoe UI", 10F);
this.rtbFilterUnits.Location = new System.Drawing.Point(16, 467);
this.rtbFilterUnits.MaxLength = 140;
this.rtbFilterUnits.Name = "rtbFilterUnits";
this.rtbFilterUnits.NullText = "Type to search unit";
this.rtbFilterUnits.Size = new System.Drawing.Size(262, 23);
this.rtbFilterUnits.TabIndex = 58;
this.rtbFilterUnits.ThemeName = "Office2013Dark";
this.rtbFilterUnits.TextChanged += new System.EventHandler(this.rtbFilterUnits_TextChanged);
//
// rseSpeedLower
//
this.rseSpeedLower.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rseSpeedLower.Enabled = false;
this.rseSpeedLower.Location = new System.Drawing.Point(19, 615);
this.rseSpeedLower.Maximum = new decimal(new int[] {
350,
0,
0,
0});
this.rseSpeedLower.Name = "rseSpeedLower";
this.rseSpeedLower.Size = new System.Drawing.Size(72, 21);
this.rseSpeedLower.TabIndex = 69;
this.rseSpeedLower.TabStop = false;
this.rseSpeedLower.TextAlignment = System.Windows.Forms.HorizontalAlignment.Right;
this.rseSpeedLower.ThemeName = "Office2013Light";
this.rseSpeedLower.ValueChanged += new System.EventHandler(this.rse_ValueChanged);
//
// rdpEndTime
//
this.rdpEndTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rdpEndTime.CustomFormat = "MM/dd/yyyy, HH:mm";
this.rdpEndTime.Enabled = false;
this.rdpEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.rdpEndTime.Location = new System.Drawing.Point(18, 567);
this.rdpEndTime.MaxDate = new System.DateTime(2030, 12, 31, 0, 0, 0, 0);
this.rdpEndTime.MinDate = new System.DateTime(2010, 1, 1, 0, 0, 0, 0);
this.rdpEndTime.Name = "rdpEndTime";
this.rdpEndTime.Size = new System.Drawing.Size(225, 21);
this.rdpEndTime.TabIndex = 64;
this.rdpEndTime.TabStop = false;
this.rdpEndTime.Text = "01/01/2010, 00:00";
this.rdpEndTime.ThemeName = "Office2013Light";
this.rdpEndTime.Value = new System.DateTime(2010, 1, 1, 0, 0, 0, 0);
//
// rdpStartTime
//
this.rdpStartTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rdpStartTime.CustomFormat = "MM/dd/yyyy, HH:mm";
this.rdpStartTime.Enabled = false;
this.rdpStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.rdpStartTime.Location = new System.Drawing.Point(18, 542);
this.rdpStartTime.MaxDate = new System.DateTime(2030, 12, 31, 0, 0, 0, 0);
this.rdpStartTime.MinDate = new System.DateTime(2010, 1, 1, 0, 0, 0, 0);
this.rdpStartTime.Name = "rdpStartTime";
this.rdpStartTime.NullText = "Display all";
this.rdpStartTime.Size = new System.Drawing.Size(225, 21);
this.rdpStartTime.TabIndex = 63;
this.rdpStartTime.TabStop = false;
this.rdpStartTime.Text = "01/01/2015, 00:00";
this.rdpStartTime.ThemeName = "Office2013Light";
this.rdpStartTime.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0);
//
// rcb24H
//
this.rcb24H.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rcb24H.AutoSize = false;
this.rcb24H.BackColor = System.Drawing.Color.Transparent;
this.rcb24H.CheckState = System.Windows.Forms.CheckState.Checked;
this.rcb24H.Enabled = false;
this.rcb24H.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5)))));
this.rcb24H.Location = new System.Drawing.Point(253, 550);
this.rcb24H.Name = "rcb24H";
//
//
//
this.rcb24H.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
this.rcb24H.Size = new System.Drawing.Size(25, 37);
this.rcb24H.TabIndex = 67;
this.rcb24H.Text = "24";
this.rcb24H.TextWrap = true;
this.rcb24H.ThemeName = "TelerikMetroBlue";
this.rcb24H.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On;
//
// rlUntil
//
this.rlUntil.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rlUntil.AutoSize = false;
this.rlUntil.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.rlUntil.ForeColor = System.Drawing.Color.DarkGray;
this.rlUntil.Location = new System.Drawing.Point(134, 587);
this.rlUntil.Name = "rlUntil";
this.rlUntil.Size = new System.Drawing.Size(109, 19);
this.rlUntil.TabIndex = 66;
this.rlUntil.Text = "History until";
this.rlUntil.TextAlignment = System.Drawing.ContentAlignment.TopRight;
//
// radLabel6
//
this.radLabel6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.radLabel6.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.radLabel6.ForeColor = System.Drawing.Color.DarkGray;
this.radLabel6.Location = new System.Drawing.Point(16, 525);
this.radLabel6.Name = "radLabel6";
this.radLabel6.Size = new System.Drawing.Size(81, 19);
this.radLabel6.TabIndex = 65;
this.radLabel6.Text = "History from";
//
// treeViewUnits
//
this.treeViewUnits.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.treeViewUnits.CheckBoxes = true;
this.treeViewUnits.Location = new System.Drawing.Point(16, 25);
this.treeViewUnits.Name = "treeViewUnits";
this.treeViewUnits.Size = new System.Drawing.Size(265, 443);
this.treeViewUnits.SortOrder = System.Windows.Forms.SortOrder.Ascending;
this.treeViewUnits.SpacingBetweenNodes = -1;
this.treeViewUnits.TabIndex = 60;
this.treeViewUnits.Text = "radTreeView1";
this.treeViewUnits.ThemeName = "TelerikMetroBlue";
this.treeViewUnits.TriStateMode = true;
this.treeViewUnits.NodeFormatting += new Telerik.WinControls.UI.TreeNodeFormattingEventHandler(this.treeViewUnits_NodeFormatting);
this.treeViewUnits.CreateNodeElement += new Telerik.WinControls.UI.CreateTreeNodeElementEventHandler(this.treeViewUnits_CreateNodeElement);
//
// rlHistoryForSelectedUnits
//
this.rlHistoryForSelectedUnits.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rlHistoryForSelectedUnits.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.rlHistoryForSelectedUnits.ForeColor = System.Drawing.Color.DarkGray;
this.rlHistoryForSelectedUnits.Location = new System.Drawing.Point(16, 490);
this.rlHistoryForSelectedUnits.Name = "rlHistoryForSelectedUnits";
this.rlHistoryForSelectedUnits.Size = new System.Drawing.Size(152, 19);
this.rlHistoryForSelectedUnits.TabIndex = 61;
this.rlHistoryForSelectedUnits.Text = "History for selected units";
//
// labelUnits
//
this.labelUnits.BackColor = System.Drawing.Color.WhiteSmoke;
this.labelUnits.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold);
this.labelUnits.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
this.labelUnits.Location = new System.Drawing.Point(16, 5);
this.labelUnits.Name = "labelUnits";
this.labelUnits.Size = new System.Drawing.Size(40, 21);
this.labelUnits.TabIndex = 77;
this.labelUnits.Text = "Units";
//
// toolTabStripTabs
//
this.toolTabStripTabs.CanUpdateChildIndex = true;
this.toolTabStripTabs.CaptionVisible = false;
this.toolTabStripTabs.Controls.Add(this.toolWindow4);
this.toolTabStripTabs.Controls.Add(this.windowHistoryResult);
this.toolTabStripTabs.Location = new System.Drawing.Point(5, 5);
this.toolTabStripTabs.Name = "toolTabStripTabs";
//
//
//
this.toolTabStripTabs.RootElement.MinSize = new System.Drawing.Size(25, 25);
this.toolTabStripTabs.SelectedIndex = 0;
this.toolTabStripTabs.Size = new System.Drawing.Size(296, 793);
this.toolTabStripTabs.SizeInfo.AbsoluteSize = new System.Drawing.Size(296, 200);
this.toolTabStripTabs.SizeInfo.SplitterCorrection = new System.Drawing.Size(110, 0);
this.toolTabStripTabs.TabIndex = 4;
this.toolTabStripTabs.TabStop = false;
this.toolTabStripTabs.TabStripAlignment = Telerik.WinControls.UI.TabStripAlignment.Top;
this.toolTabStripTabs.ThemeName = "TelerikMetroBlue";
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).Width = 0F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).LeftWidth = 12F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).TopWidth = 0F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).RightWidth = 12F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).BottomWidth = 0F;
((Telerik.WinControls.UI.Docking.ToolWindowCaptionElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
((Telerik.WinControls.UI.Docking.ToolWindowCaptionElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(0))).Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(0).GetChildAt(1))).SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).ItemContentOrientation = Telerik.WinControls.UI.PageViewContentOrientation.Horizontal;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderWidth = 0F;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderLeftWidth = 0F;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderTopWidth = 0F;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderRightWidth = 0F;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderBottomWidth = 0F;
((Telerik.WinControls.UI.StripViewItemContainer)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0))).BorderWidth = 0F;
((Telerik.WinControls.UI.StripViewItemContainer)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0))).BorderBottomWidth = 3F;
((Telerik.WinControls.UI.StripViewItemContainer)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0))).BorderBottomColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
((Telerik.WinControls.UI.StripViewItemContainer)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0))).Margin = new System.Windows.Forms.Padding(0);
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderWidth = 0F;
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderLeftWidth = 0F;
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderTopWidth = 0F;
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderRightWidth = 0F;
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderBottomWidth = 0F;
((Telerik.WinControls.UI.StripViewButtonsPanel)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(1))).BorderBottomWidth = 2F;
//
// windowHistoryResult // windowHistoryResult
// //
this.windowHistoryResult.BackColor = System.Drawing.Color.WhiteSmoke; this.windowHistoryResult.BackColor = System.Drawing.Color.WhiteSmoke;
@ -873,7 +499,7 @@ namespace Safedispatch_4_0
this.gridHistoryPoints.MasterTemplate.EnableGrouping = false; this.gridHistoryPoints.MasterTemplate.EnableGrouping = false;
this.gridHistoryPoints.MasterTemplate.ShowColumnHeaders = false; this.gridHistoryPoints.MasterTemplate.ShowColumnHeaders = false;
this.gridHistoryPoints.MasterTemplate.ShowRowHeaderColumn = false; this.gridHistoryPoints.MasterTemplate.ShowRowHeaderColumn = false;
this.gridHistoryPoints.MasterTemplate.ViewDefinition = tableViewDefinition1; this.gridHistoryPoints.MasterTemplate.ViewDefinition = tableViewDefinition6;
this.gridHistoryPoints.Name = "gridHistoryPoints"; this.gridHistoryPoints.Name = "gridHistoryPoints";
this.gridHistoryPoints.ShowGroupPanel = false; this.gridHistoryPoints.ShowGroupPanel = false;
this.gridHistoryPoints.Size = new System.Drawing.Size(273, 489); this.gridHistoryPoints.Size = new System.Drawing.Size(273, 489);
@ -1038,6 +664,381 @@ namespace Safedispatch_4_0
this.rlAnimation.TabIndex = 85; this.rlAnimation.TabIndex = 85;
this.rlAnimation.Text = "Animation active for less than 100 positions"; this.rlAnimation.Text = "Animation active for less than 100 positions";
// //
// toolTabStripTabs
//
this.toolTabStripTabs.CanUpdateChildIndex = true;
this.toolTabStripTabs.CaptionVisible = false;
this.toolTabStripTabs.Controls.Add(this.toolWindow4);
this.toolTabStripTabs.Controls.Add(this.windowHistoryResult);
this.toolTabStripTabs.Location = new System.Drawing.Point(0, 0);
this.toolTabStripTabs.Name = "toolTabStripTabs";
//
//
//
this.toolTabStripTabs.RootElement.MinSize = new System.Drawing.Size(25, 25);
this.toolTabStripTabs.SelectedIndex = 0;
this.toolTabStripTabs.Size = new System.Drawing.Size(296, 803);
this.toolTabStripTabs.SizeInfo.AbsoluteSize = new System.Drawing.Size(296, 200);
this.toolTabStripTabs.SizeInfo.SplitterCorrection = new System.Drawing.Size(110, 0);
this.toolTabStripTabs.TabIndex = 4;
this.toolTabStripTabs.TabStop = false;
this.toolTabStripTabs.TabStripAlignment = Telerik.WinControls.UI.TabStripAlignment.Top;
this.toolTabStripTabs.ThemeName = "TelerikMetroBlue";
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).Width = 0F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).LeftWidth = 12F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).TopWidth = 0F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).RightWidth = 12F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(1))).BottomWidth = 0F;
((Telerik.WinControls.UI.Docking.ToolWindowCaptionElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
((Telerik.WinControls.UI.Docking.ToolWindowCaptionElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(0))).Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(0).GetChildAt(1))).SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).ItemContentOrientation = Telerik.WinControls.UI.PageViewContentOrientation.Horizontal;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderWidth = 0F;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderLeftWidth = 0F;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderTopWidth = 0F;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderRightWidth = 0F;
((Telerik.WinControls.UI.RadPageViewTabStripElement)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1))).BorderBottomWidth = 0F;
((Telerik.WinControls.UI.StripViewItemContainer)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0))).BorderWidth = 0F;
((Telerik.WinControls.UI.StripViewItemContainer)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0))).BorderBottomWidth = 3F;
((Telerik.WinControls.UI.StripViewItemContainer)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0))).BorderBottomColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
((Telerik.WinControls.UI.StripViewItemContainer)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0))).Margin = new System.Windows.Forms.Padding(0);
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderWidth = 0F;
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderLeftWidth = 0F;
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderTopWidth = 0F;
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderRightWidth = 0F;
((Telerik.WinControls.UI.StripViewItemLayout)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(0))).BorderBottomWidth = 0F;
((Telerik.WinControls.UI.StripViewButtonsPanel)(this.toolTabStripTabs.GetChildAt(0).GetChildAt(2).GetChildAt(1).GetChildAt(0).GetChildAt(1))).BorderBottomWidth = 2F;
//
// toolWindow4
//
this.toolWindow4.BackColor = System.Drawing.Color.WhiteSmoke;
this.toolWindow4.Caption = null;
this.toolWindow4.Controls.Add(this.pbFilter);
this.toolWindow4.Controls.Add(this.rbResetHistory);
this.toolWindow4.Controls.Add(this.rbSearchHistory);
this.toolWindow4.Controls.Add(this.rcbComputeAddress);
this.toolWindow4.Controls.Add(this.rcbSpeedUpper);
this.toolWindow4.Controls.Add(this.rseSpeedUpper);
this.toolWindow4.Controls.Add(this.pb24H);
this.toolWindow4.Controls.Add(this.rcbSpeedLower);
this.toolWindow4.Controls.Add(this.rtbFilterUnits);
this.toolWindow4.Controls.Add(this.rseSpeedLower);
this.toolWindow4.Controls.Add(this.rdpEndTime);
this.toolWindow4.Controls.Add(this.rdpStartTime);
this.toolWindow4.Controls.Add(this.rcb24H);
this.toolWindow4.Controls.Add(this.rlUntil);
this.toolWindow4.Controls.Add(this.radLabel6);
this.toolWindow4.Controls.Add(this.treeViewUnits);
this.toolWindow4.Controls.Add(this.rlHistoryForSelectedUnits);
this.toolWindow4.Controls.Add(this.labelUnits);
this.toolWindow4.DocumentButtons = Telerik.WinControls.UI.Docking.DocumentStripButtons.None;
this.toolWindow4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
this.toolWindow4.Location = new System.Drawing.Point(1, 29);
this.toolWindow4.Name = "toolWindow4";
this.toolWindow4.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.toolWindow4.Size = new System.Drawing.Size(294, 772);
this.toolWindow4.Text = "History search parameters";
this.toolWindow4.ToolCaptionButtons = Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.None;
//
// pbFilter
//
this.pbFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.pbFilter.BackColor = System.Drawing.Color.White;
this.pbFilter.Image = global::Dispatcher.Properties.Resources.i_search;
this.pbFilter.Location = new System.Drawing.Point(259, 478);
this.pbFilter.Name = "pbFilter";
this.pbFilter.Size = new System.Drawing.Size(21, 21);
this.pbFilter.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pbFilter.TabIndex = 68;
this.pbFilter.TabStop = false;
this.pbFilter.Tag = "unselected";
this.pbFilter.MouseEnter += new System.EventHandler(this.pbFilter_MouseEnter);
this.pbFilter.MouseLeave += new System.EventHandler(this.pbFilter_MouseLeave);
//
// rbResetHistory
//
this.rbResetHistory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rbResetHistory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
this.rbResetHistory.Cursor = System.Windows.Forms.Cursors.Hand;
this.rbResetHistory.Font = new System.Drawing.Font("Segoe UI", 10F);
this.rbResetHistory.Location = new System.Drawing.Point(18, 726);
this.rbResetHistory.Name = "rbResetHistory";
this.rbResetHistory.Size = new System.Drawing.Size(91, 34);
this.rbResetHistory.TabIndex = 76;
this.rbResetHistory.Text = "Reset";
this.rbResetHistory.ThemeName = "TelerikMetroBlue";
this.rbResetHistory.Click += new System.EventHandler(this.rbResetHistory_Click);
((Telerik.WinControls.UI.RadButtonElement)(this.rbResetHistory.GetChildAt(0))).Text = "Reset";
((Telerik.WinControls.Primitives.FillPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Font = new System.Drawing.Font("Segoe UI", 8F, System.Drawing.FontStyle.Bold);
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Alignment = System.Drawing.ContentAlignment.MiddleCenter;
((Telerik.WinControls.Primitives.FocusPrimitive)(this.rbResetHistory.GetChildAt(0).GetChildAt(3))).BackColor = System.Drawing.Color.DeepSkyBlue;
//
// rbSearchHistory
//
this.rbSearchHistory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rbSearchHistory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
this.rbSearchHistory.Cursor = System.Windows.Forms.Cursors.Hand;
this.rbSearchHistory.Font = new System.Drawing.Font("Segoe UI", 10F);
this.rbSearchHistory.Location = new System.Drawing.Point(147, 726);
this.rbSearchHistory.Name = "rbSearchHistory";
this.rbSearchHistory.Size = new System.Drawing.Size(136, 34);
this.rbSearchHistory.TabIndex = 75;
this.rbSearchHistory.Text = "Search History";
this.rbSearchHistory.ThemeName = "TelerikMetroBlue";
this.rbSearchHistory.Click += new System.EventHandler(this.btDisplayHeadingHisotry_Click);
((Telerik.WinControls.UI.RadButtonElement)(this.rbSearchHistory.GetChildAt(0))).Text = "Search History";
((Telerik.WinControls.Primitives.FillPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold);
((Telerik.WinControls.Primitives.TextPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Alignment = System.Drawing.ContentAlignment.MiddleCenter;
((Telerik.WinControls.Primitives.FocusPrimitive)(this.rbSearchHistory.GetChildAt(0).GetChildAt(3))).BackColor = System.Drawing.Color.DeepSkyBlue;
//
// rcbComputeAddress
//
this.rcbComputeAddress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rcbComputeAddress.BackColor = System.Drawing.Color.Transparent;
this.rcbComputeAddress.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5)))));
this.rcbComputeAddress.Location = new System.Drawing.Point(20, 689);
this.rcbComputeAddress.Name = "rcbComputeAddress";
//
//
//
this.rcbComputeAddress.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
this.rcbComputeAddress.Size = new System.Drawing.Size(119, 19);
this.rcbComputeAddress.TabIndex = 74;
this.rcbComputeAddress.Text = "Compute address";
this.rcbComputeAddress.ThemeName = "TelerikMetroBlue";
this.rcbComputeAddress.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(this.checkbox_UpdateHT);
//
// rcbSpeedUpper
//
this.rcbSpeedUpper.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rcbSpeedUpper.BackColor = System.Drawing.Color.Transparent;
this.rcbSpeedUpper.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5)))));
this.rcbSpeedUpper.Location = new System.Drawing.Point(95, 653);
this.rcbSpeedUpper.Name = "rcbSpeedUpper";
//
//
//
this.rcbSpeedUpper.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
this.rcbSpeedUpper.Size = new System.Drawing.Size(160, 19);
this.rcbSpeedUpper.TabIndex = 73;
this.rcbSpeedUpper.Text = "Upper speed limit [km/h]";
this.rcbSpeedUpper.ThemeName = "TelerikMetroBlue";
this.rcbSpeedUpper.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(this.checkbox_UpdateHT);
this.rcbSpeedUpper.CheckStateChanged += new System.EventHandler(this.speedLimit_CheckStateChanged);
//
// rseSpeedUpper
//
this.rseSpeedUpper.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rseSpeedUpper.Enabled = false;
this.rseSpeedUpper.Location = new System.Drawing.Point(19, 650);
this.rseSpeedUpper.Maximum = new decimal(new int[] {
350,
0,
0,
0});
this.rseSpeedUpper.Name = "rseSpeedUpper";
this.rseSpeedUpper.Size = new System.Drawing.Size(72, 21);
this.rseSpeedUpper.TabIndex = 72;
this.rseSpeedUpper.TabStop = false;
this.rseSpeedUpper.TextAlignment = System.Windows.Forms.HorizontalAlignment.Right;
this.rseSpeedUpper.ThemeName = "Office2013Light";
this.rseSpeedUpper.Value = new decimal(new int[] {
50,
0,
0,
0});
this.rseSpeedUpper.ValueChanged += new System.EventHandler(this.rse_ValueChanged);
//
// pb24H
//
this.pb24H.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.pb24H.BackColor = System.Drawing.Color.Transparent;
this.pb24H.Cursor = System.Windows.Forms.Cursors.Hand;
this.pb24H.Image = global::Dispatcher.Properties.Resources.h_24h;
this.pb24H.Location = new System.Drawing.Point(247, 558);
this.pb24H.Name = "pb24H";
this.pb24H.Size = new System.Drawing.Size(36, 36);
this.pb24H.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pb24H.TabIndex = 71;
this.pb24H.TabStop = false;
this.pb24H.Tag = "selected";
this.pb24H.Click += new System.EventHandler(this.pb24H_Click);
this.pb24H.MouseEnter += new System.EventHandler(this.pb24H_MouseEnter);
this.pb24H.MouseLeave += new System.EventHandler(this.pb24H_MouseLeave);
//
// rcbSpeedLower
//
this.rcbSpeedLower.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rcbSpeedLower.BackColor = System.Drawing.Color.Transparent;
this.rcbSpeedLower.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5)))));
this.rcbSpeedLower.Location = new System.Drawing.Point(95, 628);
this.rcbSpeedLower.Name = "rcbSpeedLower";
//
//
//
this.rcbSpeedLower.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
this.rcbSpeedLower.Size = new System.Drawing.Size(159, 19);
this.rcbSpeedLower.TabIndex = 70;
this.rcbSpeedLower.Text = "Lower speed limit [km/h]";
this.rcbSpeedLower.ThemeName = "TelerikMetroBlue";
this.rcbSpeedLower.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(this.checkbox_UpdateHT);
this.rcbSpeedLower.CheckStateChanged += new System.EventHandler(this.speedLimit_CheckStateChanged);
//
// rtbFilterUnits
//
this.rtbFilterUnits.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rtbFilterUnits.Font = new System.Drawing.Font("Segoe UI", 10F);
this.rtbFilterUnits.Location = new System.Drawing.Point(16, 477);
this.rtbFilterUnits.MaxLength = 140;
this.rtbFilterUnits.Name = "rtbFilterUnits";
this.rtbFilterUnits.NullText = "Type to search unit";
this.rtbFilterUnits.Size = new System.Drawing.Size(262, 23);
this.rtbFilterUnits.TabIndex = 58;
this.rtbFilterUnits.ThemeName = "Office2013Dark";
this.rtbFilterUnits.TextChanged += new System.EventHandler(this.rtbFilterUnits_TextChanged);
//
// rseSpeedLower
//
this.rseSpeedLower.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rseSpeedLower.Enabled = false;
this.rseSpeedLower.Location = new System.Drawing.Point(19, 625);
this.rseSpeedLower.Maximum = new decimal(new int[] {
350,
0,
0,
0});
this.rseSpeedLower.Name = "rseSpeedLower";
this.rseSpeedLower.Size = new System.Drawing.Size(72, 21);
this.rseSpeedLower.TabIndex = 69;
this.rseSpeedLower.TabStop = false;
this.rseSpeedLower.TextAlignment = System.Windows.Forms.HorizontalAlignment.Right;
this.rseSpeedLower.ThemeName = "Office2013Light";
this.rseSpeedLower.ValueChanged += new System.EventHandler(this.rse_ValueChanged);
//
// rdpEndTime
//
this.rdpEndTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rdpEndTime.CustomFormat = "MM/dd/yyyy, HH:mm";
this.rdpEndTime.Enabled = false;
this.rdpEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.rdpEndTime.Location = new System.Drawing.Point(18, 577);
this.rdpEndTime.MaxDate = new System.DateTime(2030, 12, 31, 0, 0, 0, 0);
this.rdpEndTime.MinDate = new System.DateTime(2010, 1, 1, 0, 0, 0, 0);
this.rdpEndTime.Name = "rdpEndTime";
this.rdpEndTime.Size = new System.Drawing.Size(225, 21);
this.rdpEndTime.TabIndex = 64;
this.rdpEndTime.TabStop = false;
this.rdpEndTime.Text = "01/01/2010, 00:00";
this.rdpEndTime.ThemeName = "Office2013Light";
this.rdpEndTime.Value = new System.DateTime(2010, 1, 1, 0, 0, 0, 0);
//
// rdpStartTime
//
this.rdpStartTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rdpStartTime.CustomFormat = "MM/dd/yyyy, HH:mm";
this.rdpStartTime.Enabled = false;
this.rdpStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.rdpStartTime.Location = new System.Drawing.Point(18, 552);
this.rdpStartTime.MaxDate = new System.DateTime(2030, 12, 31, 0, 0, 0, 0);
this.rdpStartTime.MinDate = new System.DateTime(2010, 1, 1, 0, 0, 0, 0);
this.rdpStartTime.Name = "rdpStartTime";
this.rdpStartTime.NullText = "Display all";
this.rdpStartTime.Size = new System.Drawing.Size(225, 21);
this.rdpStartTime.TabIndex = 63;
this.rdpStartTime.TabStop = false;
this.rdpStartTime.Text = "01/01/2015, 00:00";
this.rdpStartTime.ThemeName = "Office2013Light";
this.rdpStartTime.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0);
//
// rcb24H
//
this.rcb24H.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rcb24H.AutoSize = false;
this.rcb24H.BackColor = System.Drawing.Color.Transparent;
this.rcb24H.CheckState = System.Windows.Forms.CheckState.Checked;
this.rcb24H.Enabled = false;
this.rcb24H.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5)))));
this.rcb24H.Location = new System.Drawing.Point(253, 560);
this.rcb24H.Name = "rcb24H";
//
//
//
this.rcb24H.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
this.rcb24H.Size = new System.Drawing.Size(25, 37);
this.rcb24H.TabIndex = 67;
this.rcb24H.Text = "24";
this.rcb24H.TextWrap = true;
this.rcb24H.ThemeName = "TelerikMetroBlue";
this.rcb24H.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On;
//
// rlUntil
//
this.rlUntil.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rlUntil.AutoSize = false;
this.rlUntil.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.rlUntil.ForeColor = System.Drawing.Color.DarkGray;
this.rlUntil.Location = new System.Drawing.Point(134, 597);
this.rlUntil.Name = "rlUntil";
this.rlUntil.Size = new System.Drawing.Size(109, 19);
this.rlUntil.TabIndex = 66;
this.rlUntil.Text = "History until";
this.rlUntil.TextAlignment = System.Drawing.ContentAlignment.TopRight;
//
// radLabel6
//
this.radLabel6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.radLabel6.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.radLabel6.ForeColor = System.Drawing.Color.DarkGray;
this.radLabel6.Location = new System.Drawing.Point(16, 535);
this.radLabel6.Name = "radLabel6";
this.radLabel6.Size = new System.Drawing.Size(81, 19);
this.radLabel6.TabIndex = 65;
this.radLabel6.Text = "History from";
//
// treeViewUnits
//
this.treeViewUnits.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.treeViewUnits.CheckBoxes = true;
this.treeViewUnits.Location = new System.Drawing.Point(16, 25);
this.treeViewUnits.Name = "treeViewUnits";
this.treeViewUnits.Size = new System.Drawing.Size(265, 453);
this.treeViewUnits.SortOrder = System.Windows.Forms.SortOrder.Ascending;
this.treeViewUnits.SpacingBetweenNodes = -1;
this.treeViewUnits.TabIndex = 60;
this.treeViewUnits.Text = "radTreeView1";
this.treeViewUnits.ThemeName = "TelerikMetroBlue";
this.treeViewUnits.TriStateMode = true;
this.treeViewUnits.NodeFormatting += new Telerik.WinControls.UI.TreeNodeFormattingEventHandler(this.treeViewUnits_NodeFormatting);
this.treeViewUnits.CreateNodeElement += new Telerik.WinControls.UI.CreateTreeNodeElementEventHandler(this.treeViewUnits_CreateNodeElement);
//
// rlHistoryForSelectedUnits
//
this.rlHistoryForSelectedUnits.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.rlHistoryForSelectedUnits.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.rlHistoryForSelectedUnits.ForeColor = System.Drawing.Color.DarkGray;
this.rlHistoryForSelectedUnits.Location = new System.Drawing.Point(16, 500);
this.rlHistoryForSelectedUnits.Name = "rlHistoryForSelectedUnits";
this.rlHistoryForSelectedUnits.Size = new System.Drawing.Size(152, 19);
this.rlHistoryForSelectedUnits.TabIndex = 61;
this.rlHistoryForSelectedUnits.Text = "History for selected units";
//
// labelUnits
//
this.labelUnits.BackColor = System.Drawing.Color.WhiteSmoke;
this.labelUnits.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold);
this.labelUnits.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
this.labelUnits.Location = new System.Drawing.Point(16, 5);
this.labelUnits.Name = "labelUnits";
this.labelUnits.Size = new System.Drawing.Size(40, 21);
this.labelUnits.TabIndex = 77;
this.labelUnits.Text = "Units";
//
// documentContainer1 // documentContainer1
// //
this.documentContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254))))); this.documentContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254)))));
@ -1074,7 +1075,7 @@ namespace Safedispatch_4_0
// //
this.documentTabStrip1.RootElement.MinSize = new System.Drawing.Size(25, 25); this.documentTabStrip1.RootElement.MinSize = new System.Drawing.Size(25, 25);
this.documentTabStrip1.SelectedIndex = 1; this.documentTabStrip1.SelectedIndex = 1;
this.documentTabStrip1.Size = new System.Drawing.Size(844, 793); this.documentTabStrip1.Size = new System.Drawing.Size(854, 803);
this.documentTabStrip1.TabIndex = 0; this.documentTabStrip1.TabIndex = 0;
this.documentTabStrip1.TabStop = false; this.documentTabStrip1.TabStop = false;
this.documentTabStrip1.TabStripVisible = false; this.documentTabStrip1.TabStripVisible = false;
@ -1124,7 +1125,7 @@ namespace Safedispatch_4_0
this.toolWindow2.Margin = new System.Windows.Forms.Padding(0); this.toolWindow2.Margin = new System.Windows.Forms.Padding(0);
this.toolWindow2.Name = "toolWindow2"; this.toolWindow2.Name = "toolWindow2";
this.toolWindow2.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked; this.toolWindow2.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.toolWindow2.Size = new System.Drawing.Size(844, 793); this.toolWindow2.Size = new System.Drawing.Size(854, 803);
this.toolWindow2.Text = "toolWindow2"; this.toolWindow2.Text = "toolWindow2";
this.toolWindow2.Resize += new System.EventHandler(this.toolWindow2_Resize); this.toolWindow2.Resize += new System.EventHandler(this.toolWindow2_Resize);
// //
@ -1183,7 +1184,7 @@ namespace Safedispatch_4_0
this.HistMapPanel.Location = new System.Drawing.Point(0, 0); this.HistMapPanel.Location = new System.Drawing.Point(0, 0);
this.HistMapPanel.Margin = new System.Windows.Forms.Padding(0); this.HistMapPanel.Margin = new System.Windows.Forms.Padding(0);
this.HistMapPanel.Name = "HistMapPanel"; this.HistMapPanel.Name = "HistMapPanel";
this.HistMapPanel.Size = new System.Drawing.Size(844, 793); this.HistMapPanel.Size = new System.Drawing.Size(854, 803);
this.HistMapPanel.TabIndex = 0; this.HistMapPanel.TabIndex = 0;
this.HistMapPanel.ThemeName = "TelerikMetroBlue"; this.HistMapPanel.ThemeName = "TelerikMetroBlue";
((Telerik.WinControls.UI.RadPanelElement)(this.HistMapPanel.GetChildAt(0))).Text = ""; ((Telerik.WinControls.UI.RadPanelElement)(this.HistMapPanel.GetChildAt(0))).Text = "";
@ -1267,28 +1268,6 @@ namespace Safedispatch_4_0
((System.ComponentModel.ISupportInitialize)(this.skinButton4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.skinButton4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radDock1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radDock1)).EndInit();
this.radDock1.ResumeLayout(false); this.radDock1.ResumeLayout(false);
this.toolWindow4.ResumeLayout(false);
this.toolWindow4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbFilter)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rbResetHistory)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rbSearchHistory)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rcbComputeAddress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rcbSpeedUpper)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rseSpeedUpper)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pb24H)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rcbSpeedLower)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rtbFilterUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rseSpeedLower)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rdpEndTime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rdpStartTime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rcb24H)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rlUntil)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.treeViewUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rlHistoryForSelectedUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.labelUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.toolTabStripTabs)).EndInit();
this.toolTabStripTabs.ResumeLayout(false);
this.windowHistoryResult.ResumeLayout(false); this.windowHistoryResult.ResumeLayout(false);
this.windowHistoryResult.PerformLayout(); this.windowHistoryResult.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.panelAnimationButtons)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.panelAnimationButtons)).EndInit();
@ -1309,6 +1288,28 @@ namespace Safedispatch_4_0
((System.ComponentModel.ISupportInitialize)(this.rcbShowGeofence)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rcbShowGeofence)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rlPositionDisplayMs)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rlPositionDisplayMs)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rlAnimation)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rlAnimation)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.toolTabStripTabs)).EndInit();
this.toolTabStripTabs.ResumeLayout(false);
this.toolWindow4.ResumeLayout(false);
this.toolWindow4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbFilter)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rbResetHistory)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rbSearchHistory)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rcbComputeAddress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rcbSpeedUpper)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rseSpeedUpper)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pb24H)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rcbSpeedLower)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rtbFilterUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rseSpeedLower)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rdpEndTime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rdpStartTime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rcb24H)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rlUntil)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.treeViewUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rlHistoryForSelectedUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.labelUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).EndInit();
this.documentContainer1.ResumeLayout(false); this.documentContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.documentTabStrip1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.documentTabStrip1)).EndInit();

View File

@ -149,7 +149,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABI ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABI
HQAAAk1TRnQBSQFMAgEBBgEAAXABCAFwAQgBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA HQAAAk1TRnQBSQFMAgEBBgEAAWgBCAFoAQgBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEgBgABICIAAywBQwNQAZ4BYAJbAdYCXAFVAeoCYAFZAesBXwJcAdsDVAGuAzQBVCAA AwABIAMAAQEBAAEgBgABICIAAywBQwNQAZ4BYAJbAdYCXAFVAeoCYAFZAesBXwJcAdsDVAGuAzQBVCAA
AyYBOANPAZcDXAHPA1cB6ANVAeoDWgHTA1EBoAMsAUSYAAMIAQsDUAGdAZACAAH/AY4CAAH/AZACAAH/ AyYBOANPAZcDXAHPA1cB6ANVAeoDWgHTA1EBoAMsAUSYAAMIAQsDUAGdAZACAAH/AY4CAAH/AZACAAH/
AZECAAH/AZECAAH/AZACAAH/AY4CAAH/AY4CAAH/A1gBuQMUARsQAAMMARADTgGVAysB/AMAAf8DAAH/ AZECAAH/AZECAAH/AZACAAH/AY4CAAH/AY4CAAH/A1gBuQMUARsQAAMMARADTgGVAysB/AMAAf8DAAH/

View File

@ -29,23 +29,22 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.radDock1 = new Telerik.WinControls.UI.Docking.RadDock(); this.radDock1 = new Telerik.WinControls.UI.Docking.RadDock();
this.repSMSLocation = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repGeofenc = new Telerik.WinControls.UI.Docking.ToolWindow();
this.documentContainer1 = new Telerik.WinControls.UI.Docking.DocumentContainer(); this.documentContainer1 = new Telerik.WinControls.UI.Docking.DocumentContainer();
this.documentTabStrip1 = new Telerik.WinControls.UI.Docking.DocumentTabStrip(); this.documentTabStrip1 = new Telerik.WinControls.UI.Docking.DocumentTabStrip();
this.repSpeed = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repSpeed = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repGeofenc = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repLand = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repLand = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repONOFF = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repONOFF = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repEmerg = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repEmerg = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repALL = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repALL = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repHist = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repHist = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repBatchHist = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repEndDay = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repEndDay = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repIdle = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repIdle = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repStop = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repStop = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repFleet = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repFleet = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repTelem = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repTelem = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repTelemEvn = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repTelemEvn = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repSMSLocation = new Telerik.WinControls.UI.Docking.ToolWindow();
this.repTicketing = new Telerik.WinControls.UI.Docking.ToolWindow(); this.repTicketing = new Telerik.WinControls.UI.Docking.ToolWindow();
this.radThemeManager1 = new Telerik.WinControls.RadThemeManager(); this.radThemeManager1 = new Telerik.WinControls.RadThemeManager();
((System.ComponentModel.ISupportInitialize)(this.radDock1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radDock1)).BeginInit();
@ -58,7 +57,7 @@
// //
// radDock1 // radDock1
// //
this.radDock1.ActiveWindow = this.repBatchHist; this.radDock1.ActiveWindow = this.repONOFF;
this.radDock1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254))))); this.radDock1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254)))));
this.radDock1.CausesValidation = false; this.radDock1.CausesValidation = false;
this.radDock1.Controls.Add(this.documentContainer1); this.radDock1.Controls.Add(this.documentContainer1);
@ -80,23 +79,22 @@
this.radDock1.ThemeName = "TelerikMetroBlue"; this.radDock1.ThemeName = "TelerikMetroBlue";
this.radDock1.ActiveWindowChanging += new Telerik.WinControls.UI.Docking.DockWindowCancelEventHandler(this.radDock1_ActiveWindowChanging); this.radDock1.ActiveWindowChanging += new Telerik.WinControls.UI.Docking.DockWindowCancelEventHandler(this.radDock1_ActiveWindowChanging);
this.radDock1.ActiveWindowChanged += new Telerik.WinControls.UI.Docking.DockWindowEventHandler(this.radDock1_ActiveWindowChanged); this.radDock1.ActiveWindowChanged += new Telerik.WinControls.UI.Docking.DockWindowEventHandler(this.radDock1_ActiveWindowChanged);
((Telerik.WinControls.UI.SplitPanelElement)(this.radDock1.GetChildAt(0))).Padding = new System.Windows.Forms.Padding(5);
((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).Width = 0F; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).Width = 0F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).LeftWidth = 0F; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).LeftWidth = 0F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).TopWidth = 0F; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).TopWidth = 0F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).RightWidth = 0F; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).RightWidth = 0F;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).BottomWidth = 0F; ((Telerik.WinControls.Primitives.BorderPrimitive)(this.radDock1.GetChildAt(0).GetChildAt(1))).BottomWidth = 0F;
// //
// repSMSLocation // repGeofenc
// //
this.repSMSLocation.Caption = null; this.repGeofenc.Caption = null;
this.repSMSLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.repGeofenc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.repSMSLocation.Location = new System.Drawing.Point(4, 32); this.repGeofenc.Location = new System.Drawing.Point(4, 32);
this.repSMSLocation.Name = "repSMSLocation"; this.repGeofenc.Name = "repGeofenc";
this.repSMSLocation.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked; this.repGeofenc.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.repSMSLocation.Size = new System.Drawing.Size(1454, 502); this.repGeofenc.Size = new System.Drawing.Size(1454, 502);
this.repSMSLocation.Text = "Text message location"; this.repGeofenc.Text = "Geofencing Retroactive";
this.repSMSLocation.Enter += new System.EventHandler(this.repSMSLocation_Enter); this.repGeofenc.Enter += new System.EventHandler(this.repGeofenc_Enter);
// //
// documentContainer1 // documentContainer1
// //
@ -116,14 +114,13 @@
// //
this.documentTabStrip1.CanUpdateChildIndex = true; this.documentTabStrip1.CanUpdateChildIndex = true;
this.documentTabStrip1.CausesValidation = false; this.documentTabStrip1.CausesValidation = false;
this.documentTabStrip1.Controls.Add(this.repHist);
this.documentTabStrip1.Controls.Add(this.repSpeed); this.documentTabStrip1.Controls.Add(this.repSpeed);
this.documentTabStrip1.Controls.Add(this.repGeofenc); this.documentTabStrip1.Controls.Add(this.repGeofenc);
this.documentTabStrip1.Controls.Add(this.repLand); this.documentTabStrip1.Controls.Add(this.repLand);
this.documentTabStrip1.Controls.Add(this.repONOFF); this.documentTabStrip1.Controls.Add(this.repONOFF);
this.documentTabStrip1.Controls.Add(this.repEmerg); this.documentTabStrip1.Controls.Add(this.repEmerg);
this.documentTabStrip1.Controls.Add(this.repALL); this.documentTabStrip1.Controls.Add(this.repALL);
this.documentTabStrip1.Controls.Add(this.repBatchHist); this.documentTabStrip1.Controls.Add(this.repHist);
this.documentTabStrip1.Controls.Add(this.repEndDay); this.documentTabStrip1.Controls.Add(this.repEndDay);
this.documentTabStrip1.Controls.Add(this.repIdle); this.documentTabStrip1.Controls.Add(this.repIdle);
this.documentTabStrip1.Controls.Add(this.repStop); this.documentTabStrip1.Controls.Add(this.repStop);
@ -138,7 +135,7 @@
// //
// //
this.documentTabStrip1.RootElement.MinSize = new System.Drawing.Size(25, 25); this.documentTabStrip1.RootElement.MinSize = new System.Drawing.Size(25, 25);
this.documentTabStrip1.SelectedIndex = 7; this.documentTabStrip1.SelectedIndex = 3;
this.documentTabStrip1.Size = new System.Drawing.Size(1462, 538); this.documentTabStrip1.Size = new System.Drawing.Size(1462, 538);
this.documentTabStrip1.TabIndex = 0; this.documentTabStrip1.TabIndex = 0;
this.documentTabStrip1.TabStop = false; this.documentTabStrip1.TabStop = false;
@ -168,17 +165,6 @@
this.repSpeed.ToolCaptionButtons = Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.None; this.repSpeed.ToolCaptionButtons = Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.None;
this.repSpeed.Enter += new System.EventHandler(this.repSpeed_Enter); this.repSpeed.Enter += new System.EventHandler(this.repSpeed_Enter);
// //
// repGeofenc
//
this.repGeofenc.Caption = null;
this.repGeofenc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.repGeofenc.Location = new System.Drawing.Point(4, 32);
this.repGeofenc.Name = "repGeofenc";
this.repGeofenc.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.repGeofenc.Size = new System.Drawing.Size(1454, 502);
this.repGeofenc.Text = "Geofencing Retroactive";
this.repGeofenc.Enter += new System.EventHandler(this.repGeofenc_Enter);
//
// repLand // repLand
// //
this.repLand.Caption = null; this.repLand.Caption = null;
@ -194,10 +180,10 @@
// //
this.repONOFF.Caption = null; this.repONOFF.Caption = null;
this.repONOFF.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.repONOFF.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.repONOFF.Location = new System.Drawing.Point(5, 28); this.repONOFF.Location = new System.Drawing.Point(4, 32);
this.repONOFF.Name = "repONOFF"; this.repONOFF.Name = "repONOFF";
this.repONOFF.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked; this.repONOFF.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.repONOFF.Size = new System.Drawing.Size(1442, 495); this.repONOFF.Size = new System.Drawing.Size(1454, 502);
this.repONOFF.Text = "Mototrbo ON / OFF"; this.repONOFF.Text = "Mototrbo ON / OFF";
this.repONOFF.Enter += new System.EventHandler(this.repONOFF_Enter); this.repONOFF.Enter += new System.EventHandler(this.repONOFF_Enter);
// //
@ -227,24 +213,13 @@
// //
this.repHist.Caption = null; this.repHist.Caption = null;
this.repHist.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.repHist.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.repHist.Location = new System.Drawing.Point(4, 32); this.repHist.Location = new System.Drawing.Point(6, 28);
this.repHist.Name = "repHist"; this.repHist.Name = "repHist";
this.repHist.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked; this.repHist.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.repHist.Size = new System.Drawing.Size(1454, 502); this.repHist.Size = new System.Drawing.Size(1015, 446);
this.repHist.Text = "History"; this.repHist.Text = "History";
this.repHist.Enter += new System.EventHandler(this.repHist_Enter); this.repHist.Enter += new System.EventHandler(this.repHist_Enter);
// //
// repBatchHist
//
this.repBatchHist.Caption = null;
this.repBatchHist.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.repBatchHist.Location = new System.Drawing.Point(4, 32);
this.repBatchHist.Name = "repBatchHist";
this.repBatchHist.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.repBatchHist.Size = new System.Drawing.Size(1454, 502);
this.repBatchHist.Text = "Batch History";
this.repBatchHist.Enter += new System.EventHandler(this.repBatchHist_Enter);
//
// repEndDay // repEndDay
// //
this.repEndDay.Caption = null; this.repEndDay.Caption = null;
@ -311,14 +286,25 @@
this.repTelemEvn.Text = "Telemetry Event"; this.repTelemEvn.Text = "Telemetry Event";
this.repTelemEvn.Enter += new System.EventHandler(this.repTelemEvn_Enter); this.repTelemEvn.Enter += new System.EventHandler(this.repTelemEvn_Enter);
// //
// repSMSLocation
//
this.repSMSLocation.Caption = null;
this.repSMSLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.repSMSLocation.Location = new System.Drawing.Point(4, 32);
this.repSMSLocation.Name = "repSMSLocation";
this.repSMSLocation.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.repSMSLocation.Size = new System.Drawing.Size(1454, 502);
this.repSMSLocation.Text = "Text message location";
this.repSMSLocation.Enter += new System.EventHandler(this.repSMSLocation_Enter);
//
// repTicketing // repTicketing
// //
this.repTicketing.Caption = null; this.repTicketing.Caption = null;
this.repTicketing.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.repTicketing.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.repTicketing.Location = new System.Drawing.Point(4, 32); this.repTicketing.Location = new System.Drawing.Point(6, 29);
this.repTicketing.Name = "repTicketing"; this.repTicketing.Name = "repTicketing";
this.repTicketing.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked; this.repTicketing.PreviousDockState = Telerik.WinControls.UI.Docking.DockState.Docked;
this.repTicketing.Size = new System.Drawing.Size(1454, 502); this.repTicketing.Size = new System.Drawing.Size(1440, 493);
this.repTicketing.Text = "Job Ticketing"; this.repTicketing.Text = "Job Ticketing";
this.repTicketing.Enter += new System.EventHandler(this.repTicketing_Enter); this.repTicketing.Enter += new System.EventHandler(this.repTicketing_Enter);
// //
@ -342,7 +328,6 @@
private Telerik.WinControls.UI.Docking.DocumentContainer documentContainer1; private Telerik.WinControls.UI.Docking.DocumentContainer documentContainer1;
private Telerik.WinControls.UI.Docking.ToolWindow repHist; private Telerik.WinControls.UI.Docking.ToolWindow repHist;
private Telerik.WinControls.UI.Docking.ToolWindow repBatchHist;
private Telerik.WinControls.UI.Docking.DocumentTabStrip documentTabStrip1; private Telerik.WinControls.UI.Docking.DocumentTabStrip documentTabStrip1;
private Telerik.WinControls.UI.Docking.ToolWindow repONOFF; private Telerik.WinControls.UI.Docking.ToolWindow repONOFF;
private Telerik.WinControls.UI.Docking.ToolWindow repGeofenc; private Telerik.WinControls.UI.Docking.ToolWindow repGeofenc;

View File

@ -25,7 +25,6 @@ namespace Safedispatch_4_0
repEmerg.Text = MainForm2.returnLNGString("emergAlarm"); repEmerg.Text = MainForm2.returnLNGString("emergAlarm");
repFleet.Text = MainForm2.returnLNGString("FleetReport"); repFleet.Text = MainForm2.returnLNGString("FleetReport");
repHist.Text = MainForm2.returnLNGString("tabHist"); repHist.Text = MainForm2.returnLNGString("tabHist");
repBatchHist.Text = MainForm2.returnLNGString("tabBatchHist");
switch (MainForm2.radioType) switch (MainForm2.radioType)
{ {
@ -74,6 +73,8 @@ namespace Safedispatch_4_0
InitializeComponent(); InitializeComponent();
setLanguage(); setLanguage();
repHash.Clear(); repHash.Clear();
if ((MainForm2.radioType == RADIOTYPE.MOTO) || (MainForm2.radioType == RADIOTYPE.HYT) if ((MainForm2.radioType == RADIOTYPE.MOTO) || (MainForm2.radioType == RADIOTYPE.HYT)
@ -83,13 +84,10 @@ namespace Safedispatch_4_0
repHash.Add(repTelem.Name, false); repHash.Add(repTelem.Name, false);
repHash.Add(repTelemEvn.Name, false); repHash.Add(repTelemEvn.Name, false);
} }
if (MainForm2.radioType != RADIOTYPE.SIMOCO && MainForm2.radioType != RADIOTYPE.EXCERA) if (MainForm2.radioType != RADIOTYPE.SIMOCO && MainForm2.radioType != RADIOTYPE.EXCERA)
repHash.Add(repONOFF.Name, false); repHash.Add(repONOFF.Name, false);
if (MainForm2.radioType != RADIOTYPE.CONECTPLUS) if (MainForm2.radioType != RADIOTYPE.CONECTPLUS)
repHash.Add(repEmerg.Name, false); repHash.Add(repEmerg.Name, false);
if (MainForm2.SMSDecide) if (MainForm2.SMSDecide)
repHash.Add(repSMSLocation.Name, false); repHash.Add(repSMSLocation.Name, false);
@ -97,7 +95,6 @@ namespace Safedispatch_4_0
repHash.Add(repFleet.Name, false); repHash.Add(repFleet.Name, false);
repHash.Add(repGeofenc.Name, false); repHash.Add(repGeofenc.Name, false);
repHash.Add(repHist.Name, false); repHash.Add(repHist.Name, false);
repHash.Add(repBatchHist.Name, false);
repHash.Add(repIdle.Name, false); repHash.Add(repIdle.Name, false);
//repHash.Add(repONOFF.Name, false); //repHash.Add(repONOFF.Name, false);
repHash.Add(repSpeed.Name, false); repHash.Add(repSpeed.Name, false);
@ -105,7 +102,6 @@ namespace Safedispatch_4_0
repHash.Add(repALL.Name, false); repHash.Add(repALL.Name, false);
documentTabStrip1.SelectedIndex = 0; documentTabStrip1.SelectedIndex = 0;
OnEnterValid = true; OnEnterValid = true;
//on ENter don' work here //on ENter don' work here
CheckTabs(rep_type.SPEED, repSpeed); CheckTabs(rep_type.SPEED, repSpeed);
@ -117,10 +113,22 @@ namespace Safedispatch_4_0
menuService.AllowDocumentContextMenu = false; menuService.AllowDocumentContextMenu = false;
menuService.AllowToolContextMenu = false; menuService.AllowToolContextMenu = false;
RemoveCloseButtons(); repALL.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repEmerg.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repEndDay.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repFleet.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repGeofenc.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repHist.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repIdle.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repONOFF.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repSpeed.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repStop.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repTelem.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repTelemEvn.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repSMSLocation.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repTicketing.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repLand.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
MainForm2.RestartMEM += 40000000; MainForm2.RestartMEM += 40000000;
try try
{ {
switch (MainForm2.radioType) switch (MainForm2.radioType)
@ -197,10 +205,7 @@ namespace Safedispatch_4_0
{ {
SM.Debug("Error remove reports constructor" + ex.ToString()); SM.Debug("Error remove reports constructor" + ex.ToString());
} }
if (!MainForm2.SMSDecide) documentTabStrip1.Controls.Remove(repSMSLocation);
if (!MainForm2.SMSDecide)
documentTabStrip1.Controls.Remove(repSMSLocation);
if(MainForm2.radioType == RADIOTYPE.LINX) if(MainForm2.radioType == RADIOTYPE.LINX)
@ -213,26 +218,6 @@ namespace Safedispatch_4_0
} }
} }
private void RemoveCloseButtons()
{
repALL.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repEmerg.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repEndDay.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repFleet.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repGeofenc.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repHist.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repBatchHist.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repIdle.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repONOFF.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repSpeed.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repStop.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repTelem.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repTelemEvn.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repSMSLocation.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repTicketing.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
repLand.DocumentButtons &= ~Telerik.WinControls.UI.Docking.DocumentStripButtons.Close;
}
private void menuService_ContextMenuDisplaying(object sender, ContextMenuDisplayingEventArgs e) private void menuService_ContextMenuDisplaying(object sender, ContextMenuDisplayingEventArgs e)
{ {
if (e.MenuType == ContextMenuType.DockWindow && if (e.MenuType == ContextMenuType.DockWindow &&
@ -241,10 +226,10 @@ namespace Safedispatch_4_0
for (int i = 0; i < e.MenuItems.Count; i++) for (int i = 0; i < e.MenuItems.Count; i++)
{ {
RadMenuItemBase menuItem = e.MenuItems[i]; RadMenuItemBase menuItem = e.MenuItems[i];
if (menuItem.Name.Equals("CloseWindow") || if (menuItem.Name == "CloseWindow" ||
menuItem.Name.Equals("CloseAllButThis") || menuItem.Name == "CloseAllButThis" ||
menuItem.Name.Equals("CloseAll") || menuItem.Name == "CloseAll" ||
menuItem.Name.Equals("Hidden") || menuItem.Name == "Hidden" ||
menuItem is RadMenuSeparatorItem) menuItem is RadMenuSeparatorItem)
{ {
menuItem.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; menuItem.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
@ -258,27 +243,35 @@ namespace Safedispatch_4_0
if (OnEnterValid) if (OnEnterValid)
{ {
if (repHash[tool.Name] != null) if (repHash[tool.Name] != null)
{
if (((Boolean)repHash[tool.Name]) == false) if (((Boolean)repHash[tool.Name]) == false)
{ {
repHash[tool.Name] = true; repHash[tool.Name] = true;
AddReportWindow(type, tool); AddReportWindow(type, tool);
// add geofences to the combobox
if (type == rep_type.GEOFENC)
OnFocusControl.Refresh_GeoName();
else if (type == rep_type.LAND)
OnFocusControl.Refresh_LandName();
} }
else else
{ {
OnFocusControl = (ReportsControl)tool.Controls[0]; OnFocusControl = (ReportsControl)tool.Controls[0];
// refresh geofecens from the combobox
if (type == rep_type.GEOFENC)
OnFocusControl.Refresh_GeoName();
else if (type == rep_type.LAND)
OnFocusControl.Refresh_LandName();
} }
}
else else
{ {
repHash.Add(tool.Name, true); repHash.Add(tool.Name, true);
AddReportWindow(type, tool); AddReportWindow(type, tool);
// add geofences to the combobox
if (type == rep_type.GEOFENC)
OnFocusControl.Refresh_GeoName();
else if (type == rep_type.LAND)
OnFocusControl.Refresh_LandName();
} }
if (type == rep_type.GEOFENC)
OnFocusControl.Refresh_GeoName();
else if (type == rep_type.LAND)
OnFocusControl.Refresh_LandName();
} }
} }
@ -317,11 +310,6 @@ namespace Safedispatch_4_0
CheckTabs(rep_type.HIST, (ToolWindow)sender); CheckTabs(rep_type.HIST, (ToolWindow)sender);
} }
private void repBatchHist_Enter(object sender, EventArgs e)
{
CheckTabs(rep_type.BATCH_HIST, (ToolWindow)sender);
}
private void repIdle_Enter(object sender, EventArgs e) private void repIdle_Enter(object sender, EventArgs e)
{ {
CheckTabs(rep_type.IDLE, (ToolWindow)sender); CheckTabs(rep_type.IDLE, (ToolWindow)sender);
@ -403,7 +391,5 @@ namespace Safedispatch_4_0
e.DockWindow.TabStripItem.BackColor = MainForm2.TabSelectedColor; e.DockWindow.TabStripItem.BackColor = MainForm2.TabSelectedColor;
} }
#endregion #endregion
} }
} }

View File

@ -31,9 +31,6 @@
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.radDock1 = new Telerik.WinControls.UI.Docking.RadDock(); this.radDock1 = new Telerik.WinControls.UI.Docking.RadDock();
this.documentWindow1 = new Telerik.WinControls.UI.Docking.DocumentWindow(); this.documentWindow1 = new Telerik.WinControls.UI.Docking.DocumentWindow();
this.btPrintReportInCsv = new Telerik.WinControls.UI.RadButton();
this.btPrintReport = new Telerik.WinControls.UI.RadButton();
this.radTreeUnits = new Telerik.WinControls.UI.RadTreeView();
this.pbReportDaily = new System.Windows.Forms.PictureBox(); this.pbReportDaily = new System.Windows.Forms.PictureBox();
this.ckReportDaily = new Telerik.WinControls.UI.RadCheckBox(); this.ckReportDaily = new Telerik.WinControls.UI.RadCheckBox();
this.pbStatus = new System.Windows.Forms.PictureBox(); this.pbStatus = new System.Windows.Forms.PictureBox();
@ -51,6 +48,7 @@
this.rProgressBar = new Telerik.WinControls.UI.RadProgressBar(); this.rProgressBar = new Telerik.WinControls.UI.RadProgressBar();
this.rlComputing = new Telerik.WinControls.UI.RadLabel(); this.rlComputing = new Telerik.WinControls.UI.RadLabel();
this.ckComputeAddress = new Telerik.WinControls.UI.RadCheckBox(); this.ckComputeAddress = new Telerik.WinControls.UI.RadCheckBox();
this.btPrintReport = new Telerik.WinControls.UI.RadButton();
this.rdtUntil = new Telerik.WinControls.UI.RadDateTimePicker(); this.rdtUntil = new Telerik.WinControls.UI.RadDateTimePicker();
this.ckDataFilter = new Telerik.WinControls.UI.RadCheckBox(); this.ckDataFilter = new Telerik.WinControls.UI.RadCheckBox();
this.ckSelectALL = new Telerik.WinControls.UI.RadCheckBox(); this.ckSelectALL = new Telerik.WinControls.UI.RadCheckBox();
@ -101,13 +99,9 @@
this.GisAddressWorker = new System.ComponentModel.BackgroundWorker(); this.GisAddressWorker = new System.ComponentModel.BackgroundWorker();
this.toolTipHelp = new System.Windows.Forms.ToolTip(this.components); this.toolTipHelp = new System.Windows.Forms.ToolTip(this.components);
this.office2013LightTheme1 = new Telerik.WinControls.Themes.Office2013LightTheme(); this.office2013LightTheme1 = new Telerik.WinControls.Themes.Office2013LightTheme();
this.ckKeepValidPositions = new Telerik.WinControls.UI.RadCheckBox();
((System.ComponentModel.ISupportInitialize)(this.radDock1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radDock1)).BeginInit();
this.radDock1.SuspendLayout(); this.radDock1.SuspendLayout();
this.documentWindow1.SuspendLayout(); this.documentWindow1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.btPrintReportInCsv)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.btPrintReport)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radTreeUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbReportDaily)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbReportDaily)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ckReportDaily)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckReportDaily)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbStatus)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbStatus)).BeginInit();
@ -127,6 +121,7 @@
this.rProgressBar.SuspendLayout(); this.rProgressBar.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.rlComputing)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rlComputing)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ckComputeAddress)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckComputeAddress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.btPrintReport)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rdtUntil)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rdtUntil)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ckDataFilter)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckDataFilter)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ckSelectALL)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckSelectALL)).BeginInit();
@ -178,7 +173,6 @@
((System.ComponentModel.ISupportInitialize)(this.panelNoReport)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.panelNoReport)).BeginInit();
this.panelNoReport.SuspendLayout(); this.panelNoReport.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbReportType)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbReportType)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ckKeepValidPositions)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// radDock1 // radDock1
@ -213,16 +207,13 @@
// documentWindow1 // documentWindow1
// //
this.documentWindow1.BackColor = System.Drawing.Color.WhiteSmoke; this.documentWindow1.BackColor = System.Drawing.Color.WhiteSmoke;
this.documentWindow1.Controls.Add(this.ckKeepValidPositions);
this.documentWindow1.Controls.Add(this.btPrintReportInCsv);
this.documentWindow1.Controls.Add(this.btPrintReport);
this.documentWindow1.Controls.Add(this.radTreeUnits);
this.documentWindow1.Controls.Add(this.pbReportDaily); this.documentWindow1.Controls.Add(this.pbReportDaily);
this.documentWindow1.Controls.Add(this.ckReportDaily); this.documentWindow1.Controls.Add(this.ckReportDaily);
this.documentWindow1.Controls.Add(this.pbStatus); this.documentWindow1.Controls.Add(this.pbStatus);
this.documentWindow1.Controls.Add(this.rgbReport); this.documentWindow1.Controls.Add(this.rgbReport);
this.documentWindow1.Controls.Add(this.rProgressBar); this.documentWindow1.Controls.Add(this.rProgressBar);
this.documentWindow1.Controls.Add(this.ckComputeAddress); this.documentWindow1.Controls.Add(this.ckComputeAddress);
this.documentWindow1.Controls.Add(this.btPrintReport);
this.documentWindow1.Controls.Add(this.rdtUntil); this.documentWindow1.Controls.Add(this.rdtUntil);
this.documentWindow1.Controls.Add(this.ckDataFilter); this.documentWindow1.Controls.Add(this.ckDataFilter);
this.documentWindow1.Controls.Add(this.ckSelectALL); this.documentWindow1.Controls.Add(this.ckSelectALL);
@ -248,60 +239,6 @@
this.documentWindow1.Size = new System.Drawing.Size(287, 725); this.documentWindow1.Size = new System.Drawing.Size(287, 725);
this.documentWindow1.Text = "documentWindow1"; this.documentWindow1.Text = "documentWindow1";
// //
// btPrintReportInCsv
//
this.btPrintReportInCsv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
this.btPrintReportInCsv.CausesValidation = false;
this.btPrintReportInCsv.Cursor = System.Windows.Forms.Cursors.Hand;
this.btPrintReportInCsv.Font = new System.Drawing.Font("Segoe UI", 10F);
this.btPrintReportInCsv.Location = new System.Drawing.Point(14, 671);
this.btPrintReportInCsv.Name = "btPrintReportInCsv";
this.btPrintReportInCsv.Size = new System.Drawing.Size(257, 34);
this.btPrintReportInCsv.TabIndex = 92;
this.btPrintReportInCsv.Text = "Generate Report in CSV";
this.btPrintReportInCsv.ThemeName = "TelerikMetroBlue";
this.btPrintReportInCsv.Click += new System.EventHandler(this.btPrintReportInCsv_Click);
((Telerik.WinControls.UI.RadButtonElement)(this.btPrintReportInCsv.GetChildAt(0))).Text = "Generate Report in CSV";
((Telerik.WinControls.Primitives.FillPrimitive)(this.btPrintReportInCsv.GetChildAt(0).GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.btPrintReportInCsv.GetChildAt(0).GetChildAt(1).GetChildAt(1))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.btPrintReportInCsv.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold);
((Telerik.WinControls.Primitives.TextPrimitive)(this.btPrintReportInCsv.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Alignment = System.Drawing.ContentAlignment.MiddleCenter;
((Telerik.WinControls.Primitives.FocusPrimitive)(this.btPrintReportInCsv.GetChildAt(0).GetChildAt(3))).BackColor = System.Drawing.Color.DeepSkyBlue;
//
// btPrintReport
//
this.btPrintReport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
this.btPrintReport.CausesValidation = false;
this.btPrintReport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btPrintReport.Font = new System.Drawing.Font("Segoe UI", 10F);
this.btPrintReport.Location = new System.Drawing.Point(15, 631);
this.btPrintReport.Name = "btPrintReport";
this.btPrintReport.Size = new System.Drawing.Size(257, 34);
this.btPrintReport.TabIndex = 91;
this.btPrintReport.Text = "Generate Report";
this.btPrintReport.ThemeName = "TelerikMetroBlue";
this.btPrintReport.Click += new System.EventHandler(this.btPrintReport_Click);
((Telerik.WinControls.UI.RadButtonElement)(this.btPrintReport.GetChildAt(0))).Text = "Generate Report";
((Telerik.WinControls.Primitives.FillPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(1).GetChildAt(1))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold);
((Telerik.WinControls.Primitives.TextPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Alignment = System.Drawing.ContentAlignment.MiddleCenter;
((Telerik.WinControls.Primitives.FocusPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(3))).BackColor = System.Drawing.Color.DeepSkyBlue;
//
// radTreeUnits
//
this.radTreeUnits.CheckBoxes = true;
this.radTreeUnits.Location = new System.Drawing.Point(16, 483);
this.radTreeUnits.Name = "radTreeUnits";
this.radTreeUnits.Size = new System.Drawing.Size(257, 142);
this.radTreeUnits.SortOrder = System.Windows.Forms.SortOrder.Ascending;
this.radTreeUnits.SpacingBetweenNodes = -1;
this.radTreeUnits.TabIndex = 130;
this.radTreeUnits.Text = "radTreeView1";
this.radTreeUnits.ThemeName = "TelerikMetroBlue";
this.radTreeUnits.TriStateMode = true;
this.radTreeUnits.Visible = false;
//
// pbReportDaily // pbReportDaily
// //
this.pbReportDaily.BackColor = System.Drawing.Color.Transparent; this.pbReportDaily.BackColor = System.Drawing.Color.Transparent;
@ -592,6 +529,28 @@
this.ckComputeAddress.Text = "Compute address"; this.ckComputeAddress.Text = "Compute address";
this.ckComputeAddress.ThemeName = "TelerikMetroBlue"; this.ckComputeAddress.ThemeName = "TelerikMetroBlue";
// //
// btPrintReport
//
this.btPrintReport.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btPrintReport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
this.btPrintReport.CausesValidation = false;
this.btPrintReport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btPrintReport.Font = new System.Drawing.Font("Segoe UI", 10F);
this.btPrintReport.Location = new System.Drawing.Point(16, 480);
this.btPrintReport.Name = "btPrintReport";
this.btPrintReport.Size = new System.Drawing.Size(257, 34);
this.btPrintReport.TabIndex = 91;
this.btPrintReport.Text = "Generate Report";
this.btPrintReport.ThemeName = "TelerikMetroBlue";
this.btPrintReport.Click += new System.EventHandler(this.btPrintReport_Click);
((Telerik.WinControls.UI.RadButtonElement)(this.btPrintReport.GetChildAt(0))).Text = "Generate Report";
((Telerik.WinControls.Primitives.FillPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(1).GetChildAt(1))).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
((Telerik.WinControls.Primitives.TextPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold);
((Telerik.WinControls.Primitives.TextPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(1).GetChildAt(1))).Alignment = System.Drawing.ContentAlignment.MiddleCenter;
((Telerik.WinControls.Primitives.FocusPrimitive)(this.btPrintReport.GetChildAt(0).GetChildAt(3))).BackColor = System.Drawing.Color.DeepSkyBlue;
//
// rdtUntil // rdtUntil
// //
this.rdtUntil.CustomFormat = "MM/dd/yyyy, HH:mm"; this.rdtUntil.CustomFormat = "MM/dd/yyyy, HH:mm";
@ -1255,17 +1214,6 @@
this.GisAddressWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.GisAddressWorker_DoWork); this.GisAddressWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.GisAddressWorker_DoWork);
this.GisAddressWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.GisAddressWorker_RunWorkerCompleted); this.GisAddressWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.GisAddressWorker_RunWorkerCompleted);
// //
// ckKeepValidPositions
//
this.ckKeepValidPositions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.ckKeepValidPositions.Location = new System.Drawing.Point(17, 356);
this.ckKeepValidPositions.Name = "ckKeepValidPositions";
this.ckKeepValidPositions.Size = new System.Drawing.Size(144, 18);
this.ckKeepValidPositions.TabIndex = 131;
this.ckKeepValidPositions.Text = "Keep only valid positions";
this.ckKeepValidPositions.ThemeName = "TelerikMetroBlue";
this.ckKeepValidPositions.Visible = false;
//
// ReportsControl // ReportsControl
// //
this.Controls.Add(this.radDock1); this.Controls.Add(this.radDock1);
@ -1276,9 +1224,6 @@
this.radDock1.ResumeLayout(false); this.radDock1.ResumeLayout(false);
this.documentWindow1.ResumeLayout(false); this.documentWindow1.ResumeLayout(false);
this.documentWindow1.PerformLayout(); this.documentWindow1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.btPrintReportInCsv)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.btPrintReport)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radTreeUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbReportDaily)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbReportDaily)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ckReportDaily)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckReportDaily)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbStatus)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbStatus)).EndInit();
@ -1299,6 +1244,7 @@
this.rProgressBar.ResumeLayout(false); this.rProgressBar.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.rlComputing)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rlComputing)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ckComputeAddress)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckComputeAddress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.btPrintReport)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rdtUntil)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rdtUntil)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ckDataFilter)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckDataFilter)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ckSelectALL)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckSelectALL)).EndInit();
@ -1355,7 +1301,6 @@
((System.ComponentModel.ISupportInitialize)(this.panelNoReport)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.panelNoReport)).EndInit();
this.panelNoReport.ResumeLayout(false); this.panelNoReport.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbReportType)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbReportType)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ckKeepValidPositions)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -1432,8 +1377,5 @@
private Telerik.WinControls.UI.RadButton btSaveEmail; private Telerik.WinControls.UI.RadButton btSaveEmail;
private Telerik.WinControls.Themes.Office2013LightTheme office2013LightTheme1; private Telerik.WinControls.Themes.Office2013LightTheme office2013LightTheme1;
private Telerik.WinControls.UI.RadLabel rlIdle; private Telerik.WinControls.UI.RadLabel rlIdle;
private Telerik.WinControls.UI.RadTreeView radTreeUnits;
public Telerik.WinControls.UI.RadButton btPrintReportInCsv;
private Telerik.WinControls.UI.RadCheckBox ckKeepValidPositions;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -726,28 +726,20 @@ namespace SubscriberAndUserManager
string data = System.Text.Encoding.ASCII.GetString(rawData, 0, actualLen); string data = System.Text.Encoding.ASCII.GetString(rawData, 0, actualLen);
//SM.Debug("RX: " + data.Trim()); //SM.Debug("RX: " + data.Trim());
string[] tempArr = data.Split("#".ToCharArray()); string[] tempArr = data.Split('#');
if (tempArr.Length == 0) if (tempArr.Length == 0)
{ {
SM.Debug("incorect message=" + data); SM.Debug("incorect message=" + data);
return false; return false;
} }
int messLen = 0; int messLen = Convert.ToInt32(tempArr[1]);
if( tempArr[1] != "")
messLen = Convert.ToInt32(tempArr[1]);
if (actualLen != messLen) if (actualLen != messLen)
{ {
Console.WriteLine("message length({0}) != actual length({1})", messLen, actualLen); Console.WriteLine("message length({0}) != actual length({1})", messLen, actualLen);
return false; return false;
} }
int opCode = Convert.ToInt32(tempArr[3]);
int opCode = 0;
if(tempArr[3] != "")
opCode = Convert.ToInt32(tempArr[3]);
switch (opCode) switch (opCode)
{ {

View File

@ -279,7 +279,6 @@ namespace SubscriberAndUserManager
this.pictureBox1.Location = new System.Drawing.Point(257, 143); this.pictureBox1.Location = new System.Drawing.Point(257, 143);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 32); this.pictureBox1.Size = new System.Drawing.Size(32, 32);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 48; this.pictureBox1.TabIndex = 48;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
// //

View File

@ -283,7 +283,6 @@ namespace SubscriberAndUserManager
{ {
try { gatewayRegs = regManager.getAllGateways(); } try { gatewayRegs = regManager.getAllGateways(); }
catch (Exception ex) { Console.WriteLine(ex.ToString()); CustomMessageBox.Show(CustomMessageBoxType.exclamation, MainForm.returnLNGString("dberr"), MainForm.returnLNGString("err")); return; } catch (Exception ex) { Console.WriteLine(ex.ToString()); CustomMessageBox.Show(CustomMessageBoxType.exclamation, MainForm.returnLNGString("dberr"), MainForm.returnLNGString("err")); return; }
remainingGateways = totalGateways - regManager.gatewaysCount(); remainingGateways = totalGateways - regManager.gatewaysCount();
//gvGateways.DataSource = gatewayRegs; //gvGateways.DataSource = gatewayRegs;
@ -311,7 +310,6 @@ namespace SubscriberAndUserManager
int usedMapUS = 0; int usedMapUS = 0;
int usedMapEu = 0; int usedMapEu = 0;
int usedArcgis = 0; int usedArcgis = 0;
for (int i = 0; i < safeDispatchRegs.Count; i++) for (int i = 0; i < safeDispatchRegs.Count; i++)
{ {
if (safeDispatchRegs[i].gps) if (safeDispatchRegs[i].gps)
@ -370,23 +368,16 @@ namespace SubscriberAndUserManager
remainingOpenStreetMap = totalOpenStreetMap - usedMapEu; remainingOpenStreetMap = totalOpenStreetMap - usedMapEu;
remainingUS = totalUS - usedMapUS; remainingUS = totalUS - usedMapUS;
remainingGoogle = totalGoogle - usedGoogle; remainingGoogle = totalGoogle - usedGoogle;
gvSafeDispatches.DataSource = safeDispatchRegs; gvSafeDispatches.DataSource = safeDispatchRegs;
#region broadcast SD for dispatcher IP changed #region broadcast SD for dispatcher IP changed
string ipList = "";
//broadcast SD for dispatcher IP changed foreach (var item in safeDispatchRegs)
ipList += item.ip + "/";
string ipList = string.Join("/", safeDispatchRegs.Select(x => x.ip));
string cmd = $"#0.0#475#{ipList}"; string test1 = "#475#" + ipList;
String cmdok1 = "#" + "0.0" + test1; Int32 tmp1 = cmdok1.Length + 1; tmp1 += tmp1.ToString().Length; cmdok1 = "#" + tmp1.ToString() + cmdok1;
// calc length and insert it at the begining MainForm.BroadcastRegistrationSD(cmdok1);
Int32 length = cmd.Length + 1;
length += length.ToString().Length;
cmd = $"#{length}{cmd}";
MainForm.BroadcastRegistrationSD(cmd);
#endregion #endregion
//gvSafeDispatches.Columns[5].HeaderText = "Geo-Fences"; //gvSafeDispatches.Columns[5].HeaderText = "Geo-Fences";