840 lines
50 KiB
C#
840 lines
50 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Collections;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using MapGoogle;
|
|
using ESRI.ArcGIS.EngineCore;
|
|
using ESRI.ArcGIS.Display;
|
|
using SafeMobileLib;
|
|
using System.Drawing.Imaging;
|
|
|
|
namespace Safedispatch_4_0
|
|
{
|
|
|
|
public class BusSymbolsGIS
|
|
{
|
|
private IGraphicTrackerSymbol simbBusE;
|
|
private IGraphicTrackerSymbol simbBusESE;
|
|
private IGraphicTrackerSymbol simbBusSE;
|
|
private IGraphicTrackerSymbol simbBusSSE;
|
|
private IGraphicTrackerSymbol simbBusS;
|
|
private IGraphicTrackerSymbol simbBusSSV;
|
|
private IGraphicTrackerSymbol simbBusSV;
|
|
private IGraphicTrackerSymbol simbBusVSV;
|
|
private IGraphicTrackerSymbol simbBusV;
|
|
private IGraphicTrackerSymbol simbBusVNV;
|
|
private IGraphicTrackerSymbol simbBusNV;
|
|
private IGraphicTrackerSymbol simbBusNNV;
|
|
private IGraphicTrackerSymbol simbBusN;
|
|
private IGraphicTrackerSymbol simbBusNNE;
|
|
private IGraphicTrackerSymbol simbBusNE;
|
|
private IGraphicTrackerSymbol simbBusENE;
|
|
|
|
private IGraphicTrackerSymbol simbBusGE;
|
|
private IGraphicTrackerSymbol simbBusGESE;
|
|
private IGraphicTrackerSymbol simbBusGSE;
|
|
private IGraphicTrackerSymbol simbBusGSSE;
|
|
private IGraphicTrackerSymbol simbBusGS;
|
|
private IGraphicTrackerSymbol simbBusGSSV;
|
|
private IGraphicTrackerSymbol simbBusGSV;
|
|
private IGraphicTrackerSymbol simbBusGVSV;
|
|
private IGraphicTrackerSymbol simbBusGV;
|
|
private IGraphicTrackerSymbol simbBusGVNV;
|
|
private IGraphicTrackerSymbol simbBusGNV;
|
|
private IGraphicTrackerSymbol simbBusGNNV;
|
|
private IGraphicTrackerSymbol simbBusGN;
|
|
private IGraphicTrackerSymbol simbBusGNNE;
|
|
private IGraphicTrackerSymbol simbBusGNE;
|
|
private IGraphicTrackerSymbol simbBusGENE;
|
|
|
|
|
|
private IGraphicTrackerSymbol simbBusRE;
|
|
private IGraphicTrackerSymbol simbBusRESE;
|
|
private IGraphicTrackerSymbol simbBusRSE;
|
|
private IGraphicTrackerSymbol simbBusRSSE;
|
|
private IGraphicTrackerSymbol simbBusRS;
|
|
private IGraphicTrackerSymbol simbBusRSSV;
|
|
private IGraphicTrackerSymbol simbBusRSV;
|
|
private IGraphicTrackerSymbol simbBusRVSV;
|
|
private IGraphicTrackerSymbol simbBusRV;
|
|
private IGraphicTrackerSymbol simbBusRVNV;
|
|
private IGraphicTrackerSymbol simbBusRNV;
|
|
private IGraphicTrackerSymbol simbBusRNNV;
|
|
private IGraphicTrackerSymbol simbBusRN;
|
|
private IGraphicTrackerSymbol simbBusRNNE;
|
|
private IGraphicTrackerSymbol simbBusRNE;
|
|
private IGraphicTrackerSymbol simbBusRENE;
|
|
|
|
private String tabName;
|
|
|
|
private ESRI.ArcGIS.Display.IPictureMarkerSymbol CreateMark(String filename)
|
|
{
|
|
try
|
|
{
|
|
ESRI.ArcGIS.Display.IPictureMarkerSymbol bitmapPictureMarkerSymbolCls = new ESRI.ArcGIS.Display.PictureMarkerSymbolClass();
|
|
bitmapPictureMarkerSymbolCls.CreateMarkerSymbolFromFile(ESRI.ArcGIS.Display.esriIPictureType.esriIPictureBitmap, filename);
|
|
bitmapPictureMarkerSymbolCls.Angle = 0;
|
|
RgbColor rgbColor = new ESRI.ArcGIS.Display.RgbColor();
|
|
rgbColor.Red = 255;
|
|
rgbColor.Green = 255;
|
|
rgbColor.Blue = 255;
|
|
bitmapPictureMarkerSymbolCls.BitmapTransparencyColor = rgbColor;
|
|
bitmapPictureMarkerSymbolCls.Size = 24;
|
|
bitmapPictureMarkerSymbolCls.XOffset = 0;
|
|
bitmapPictureMarkerSymbolCls.YOffset = -12;
|
|
return bitmapPictureMarkerSymbolCls;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Error load marker filename: " + filename+" EX:"+ex.ToString());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public BusSymbolsGIS(IGraphicTracker m_graphicTracker, String _tabName)
|
|
{
|
|
//tmpSYMB = m_graphicTracker.CreateSymbol(((Car)MainForm2.carlist[((Vehicle)MainForm2.vehicleHT[vehiclesList.SelectedRows[0].Cells[2].Value.ToString()]).IconID]).GISsymb as ISymbol, null);
|
|
try
|
|
{
|
|
tabName = _tabName;
|
|
string fileName;
|
|
|
|
/* Image ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_e.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_e.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ene.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ene.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ese.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ese.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_n.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_n.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ne.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ne.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_nne.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_nne.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_nnv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_nnv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_nv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_nv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_s.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_s.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_se.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_se.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_sse.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_sse.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ssv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ssv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_sv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_sv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_v.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_v.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_vnv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_vnv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_vsv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_vsv.bmp", ImageFormat.Bmp);
|
|
|
|
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_e.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_e.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_ene.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_ene.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_ese.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_ese.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_n.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_n.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_ne.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_ne.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_nne.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_nne.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_nnv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_nnv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_nv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_nv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_s.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_s.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_se.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_se.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_sse.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_sse.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_ssv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_ssv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_sv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_sv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_v.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_v.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_vnv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_vnv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_vsv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowg_vsv.bmp", ImageFormat.Bmp);
|
|
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_e.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_e.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_ene.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_ene.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_ese.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_ese.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_n.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_n.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_ne.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_ne.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_nne.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_nne.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_nnv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_nnv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_nv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_nv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_s.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_s.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_se.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_se.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_sse.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_sse.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_ssv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_ssv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_sv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_sv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_v.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_v.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_vnv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_vnv.bmp", ImageFormat.Bmp);
|
|
ArcgisImage = Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_vsv.png");
|
|
ArcgisImage.Save(System.Windows.Forms.Application.StartupPath + @"\resource\history\arrowr_vsv.bmp", ImageFormat.Bmp);*/
|
|
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_e.bmp";
|
|
Dispatcher.Properties.Resources._01_Arrow_E.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusE = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ese.bmp";
|
|
Dispatcher.Properties.Resources._02_Arrow_ESE.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusESE = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_se.bmp";
|
|
Dispatcher.Properties.Resources._03_Arrow_SE.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusSE = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_sse.bmp";
|
|
Dispatcher.Properties.Resources._04_Arrow_SSE.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusSSE = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_s.bmp";
|
|
Dispatcher.Properties.Resources._05_Arrow_S.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusS = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ssv.bmp";
|
|
Dispatcher.Properties.Resources._06_Arrow_SSV.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusSSV = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_sv.bmp";
|
|
Dispatcher.Properties.Resources._07_Arrow_SV.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusSV = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_vsv.bmp";
|
|
Dispatcher.Properties.Resources._08_Arrow_VSV.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusVSV = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_v.bmp";
|
|
Dispatcher.Properties.Resources._09_Arrow_V.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusV = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_vnv.bmp";
|
|
Dispatcher.Properties.Resources._10_Arrow_VNV.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusVNV = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_nv.bmp";
|
|
Dispatcher.Properties.Resources._11_Arrow_NV.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusNV = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_nnv.bmp";
|
|
Dispatcher.Properties.Resources._12_Arrow_NNV.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusNNV = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_n.bmp";
|
|
Dispatcher.Properties.Resources._13_Arrow_N.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusN = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_nne.bmp";
|
|
Dispatcher.Properties.Resources._14_Arrow_NNE.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusNNE = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ne.bmp";
|
|
Dispatcher.Properties.Resources._15_Arrow_NE.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusNE = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\history\arrow_ene.bmp";
|
|
Dispatcher.Properties.Resources._16_Arrow_ENE.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
|
|
simbBusENE = m_graphicTracker.CreateSymbol(CreateMark(fileName) as ISymbol, null);
|
|
if (System.IO.File.Exists(fileName)) System.IO.File.Delete(fileName);
|
|
|
|
foreach (Int32 obj in MainForm2.carlist.Keys)
|
|
((Car)MainForm2.carlist[obj]).SymbGIS[tabName] = m_graphicTracker.CreateSymbol(((Car)MainForm2.carlist[obj]).GISsymb as ISymbol, null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Erroare la bagat simbolurile" + ex.StackTrace);
|
|
}
|
|
}
|
|
|
|
public IGraphicTrackerSymbol GetSymbolFromOrientation(Int32 param)
|
|
{
|
|
try
|
|
{
|
|
if (((param >= 0) && (param < 11.25)) || ((param > 348.75) && (param <= 360)))
|
|
return simbBusE;
|
|
else if ((param >= 11.25) && (param < 33.75))
|
|
return simbBusENE;
|
|
else if ((param >= 33.75) && (param < 56.25))
|
|
return simbBusNE;
|
|
else if ((param >= 56.25) && (param < 78.75))
|
|
return simbBusNNE;
|
|
else if ((param >= 78.75) && (param < 101.25))
|
|
return simbBusN;
|
|
else if ((param >= 101.25) && (param < 123.75))
|
|
return simbBusNNV;
|
|
else if ((param >= 123.75) && (param < 146.25))
|
|
return simbBusNV;
|
|
else if ((param >= 146.25) && (param < 168.75))
|
|
return simbBusVNV;
|
|
else if ((param >= 168.75) && (param < 191.25))
|
|
return simbBusV;
|
|
else if ((param >= 191.25) && (param < 213.75))
|
|
return simbBusVSV;
|
|
else if ((param >= 213.75) && (param < 236.25))
|
|
return simbBusSV;
|
|
else if ((param >= 236.25) && (param < 258.75))
|
|
return simbBusSSV;
|
|
else if ((param >= 258.75) && (param < 281.25))
|
|
return simbBusS;
|
|
else if ((param >= 281.25) && (param < 303.75))
|
|
return simbBusSSE;
|
|
else if ((param >= 303.75) && (param < 326.25))
|
|
return simbBusSE;
|
|
else if ((param >= 326.25) && (param < 348.75))
|
|
return simbBusESE;
|
|
else
|
|
return simbBusE;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Ex:"+ex.Message);
|
|
return simbBusE;
|
|
}
|
|
}
|
|
|
|
public IGraphicTrackerSymbol GetSymbolFromOrientationColor(Int32 param, SymbolColor parColor)
|
|
{
|
|
try
|
|
{
|
|
if (parColor == SymbolColor.Green)
|
|
{
|
|
if (((param >= 0) && (param < 11.25)) || ((param > 348.75) && (param <= 360)))
|
|
return simbBusGE;
|
|
else if ((param >= 11.25) && (param < 33.75))
|
|
return simbBusGENE;
|
|
else if ((param >= 33.75) && (param < 56.25))
|
|
return simbBusGNE;
|
|
else if ((param >= 56.25) && (param < 78.75))
|
|
return simbBusGNNE;
|
|
else if ((param >= 78.75) && (param < 101.25))
|
|
return simbBusGN;
|
|
else if ((param >= 101.25) && (param < 123.75))
|
|
return simbBusGNNV;
|
|
else if ((param >= 123.75) && (param < 146.25))
|
|
return simbBusGNV;
|
|
else if ((param >= 146.25) && (param < 168.75))
|
|
return simbBusGVNV;
|
|
else if ((param >= 168.75) && (param < 191.25))
|
|
return simbBusGV;
|
|
else if ((param >= 191.25) && (param < 213.75))
|
|
return simbBusGVSV;
|
|
else if ((param >= 213.75) && (param < 236.25))
|
|
return simbBusGSV;
|
|
else if ((param >= 236.25) && (param < 258.75))
|
|
return simbBusGSSV;
|
|
else if ((param >= 258.75) && (param < 281.25))
|
|
return simbBusGS;
|
|
else if ((param >= 281.25) && (param < 303.75))
|
|
return simbBusGSSE;
|
|
else if ((param >= 303.75) && (param < 326.25))
|
|
return simbBusGSE;
|
|
else if ((param >= 326.25) && (param < 348.75))
|
|
return simbBusGESE;
|
|
else
|
|
return simbBusGE;
|
|
} if (parColor == SymbolColor.Red)
|
|
{
|
|
if (((param >= 0) && (param < 11.25)) || ((param > 348.75) && (param <= 360)))
|
|
return simbBusRE;
|
|
else if ((param >= 11.25) && (param < 33.75))
|
|
return simbBusRENE;
|
|
else if ((param >= 33.75) && (param < 56.25))
|
|
return simbBusRNE;
|
|
else if ((param >= 56.25) && (param < 78.75))
|
|
return simbBusRNNE;
|
|
else if ((param >= 78.75) && (param < 101.25))
|
|
return simbBusRN;
|
|
else if ((param >= 101.25) && (param < 123.75))
|
|
return simbBusRNNV;
|
|
else if ((param >= 123.75) && (param < 146.25))
|
|
return simbBusRNV;
|
|
else if ((param >= 146.25) && (param < 168.75))
|
|
return simbBusRVNV;
|
|
else if ((param >= 168.75) && (param < 191.25))
|
|
return simbBusRV;
|
|
else if ((param >= 191.25) && (param < 213.75))
|
|
return simbBusRVSV;
|
|
else if ((param >= 213.75) && (param < 236.25))
|
|
return simbBusRSV;
|
|
else if ((param >= 236.25) && (param < 258.75))
|
|
return simbBusRSSV;
|
|
else if ((param >= 258.75) && (param < 281.25))
|
|
return simbBusRS;
|
|
else if ((param >= 281.25) && (param < 303.75))
|
|
return simbBusRSSE;
|
|
else if ((param >= 303.75) && (param < 326.25))
|
|
return simbBusRSE;
|
|
else if ((param >= 326.25) && (param < 348.75))
|
|
return simbBusRESE;
|
|
else
|
|
return simbBusRE;
|
|
}
|
|
else
|
|
return simbBusRE;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Ex:" + ex.Message);
|
|
return simbBusRE;
|
|
}
|
|
}
|
|
|
|
public IGraphicTrackerSymbol GetSymbolFromOrientationIcon(Int32 param, Int32 iconpar)
|
|
{
|
|
IGraphicTrackerSymbol tmp = simbBusE;
|
|
if (iconpar < 1) return GetSymbolFromOrientation(param);
|
|
else
|
|
{
|
|
try
|
|
{
|
|
tmp = ((IGraphicTrackerSymbol)((Car)MainForm2.carlist[iconpar]).SymbGIS[tabName]);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Unable to select car icon:" + ex.ToString());
|
|
}
|
|
return tmp;
|
|
}
|
|
}
|
|
}
|
|
|
|
public class BusSymbols
|
|
{
|
|
private Symbolx simbBusE;
|
|
private Symbolx simbBusESE;
|
|
private Symbolx simbBusSE;
|
|
private Symbolx simbBusSSE;
|
|
private Symbolx simbBusS;
|
|
private Symbolx simbBusSSV;
|
|
private Symbolx simbBusSV;
|
|
private Symbolx simbBusVSV;
|
|
private Symbolx simbBusV;
|
|
private Symbolx simbBusVNV;
|
|
private Symbolx simbBusNV;
|
|
private Symbolx simbBusNNV;
|
|
private Symbolx simbBusN;
|
|
private Symbolx simbBusNNE;
|
|
private Symbolx simbBusNE;
|
|
private Symbolx simbBusENE;
|
|
|
|
private Symbolx simbBusGE;
|
|
private Symbolx simbBusGESE;
|
|
private Symbolx simbBusGSE;
|
|
private Symbolx simbBusGSSE;
|
|
private Symbolx simbBusGS;
|
|
private Symbolx simbBusGSSV;
|
|
private Symbolx simbBusGSV;
|
|
private Symbolx simbBusGVSV;
|
|
private Symbolx simbBusGV;
|
|
private Symbolx simbBusGVNV;
|
|
private Symbolx simbBusGNV;
|
|
private Symbolx simbBusGNNV;
|
|
private Symbolx simbBusGN;
|
|
private Symbolx simbBusGNNE;
|
|
private Symbolx simbBusGNE;
|
|
private Symbolx simbBusGENE;
|
|
|
|
|
|
private Symbolx simbBusRE;
|
|
private Symbolx simbBusRESE;
|
|
private Symbolx simbBusRSE;
|
|
private Symbolx simbBusRSSE;
|
|
private Symbolx simbBusRS;
|
|
private Symbolx simbBusRSSV;
|
|
private Symbolx simbBusRSV;
|
|
private Symbolx simbBusRVSV;
|
|
private Symbolx simbBusRV;
|
|
private Symbolx simbBusRVNV;
|
|
private Symbolx simbBusRNV;
|
|
private Symbolx simbBusRNNV;
|
|
private Symbolx simbBusRN;
|
|
private Symbolx simbBusRNNE;
|
|
private Symbolx simbBusRNE;
|
|
private Symbolx simbBusRENE;
|
|
|
|
public BusSymbols(AxMappointControlx mapControl)
|
|
{
|
|
string fileName;
|
|
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_E.bmp";
|
|
simbBusE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_ESE.bmp";
|
|
simbBusESE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_SE.bmp";
|
|
simbBusSE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_SSE.bmp";
|
|
simbBusSSE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_S.bmp";
|
|
simbBusS = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_SSV.bmp";
|
|
simbBusSSV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_SV.bmp";
|
|
simbBusSV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_VSV.bmp";
|
|
simbBusVSV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_V.bmp";
|
|
simbBusV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_VNV.bmp";
|
|
simbBusVNV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_NV.bmp";
|
|
simbBusNV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_NNV.bmp";
|
|
simbBusNNV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_N.bmp";
|
|
simbBusN = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_NNE.bmp";
|
|
simbBusNNE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_NE.bmp";
|
|
simbBusNE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\Arrow_ENE.bmp";
|
|
simbBusENE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
|
|
FileStream fs;
|
|
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_E.ico";
|
|
|
|
simbBusGE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_ESE.ico";
|
|
|
|
simbBusGESE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_SE.ico";
|
|
|
|
simbBusGSE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_SSE.ico";
|
|
|
|
simbBusGSSE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_S.ico";
|
|
|
|
simbBusGS = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_SSV.ico";
|
|
|
|
simbBusGSSV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_SV.ico";
|
|
|
|
simbBusGSV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_VSV.ico";
|
|
|
|
simbBusGVSV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_V.ico";
|
|
|
|
simbBusGV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_VNV.ico";
|
|
|
|
simbBusGVNV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_NV.ico";
|
|
|
|
simbBusGNV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_NNV.ico";
|
|
|
|
simbBusGNNV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_N.ico";
|
|
|
|
simbBusGN = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_NNE.ico";
|
|
|
|
simbBusGNNE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_NE.ico";
|
|
|
|
simbBusGNE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowG_ENE.ico";
|
|
|
|
simbBusGENE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_E.ico";
|
|
|
|
simbBusRE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_ESE.ico";
|
|
|
|
simbBusRESE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_SE.ico";
|
|
|
|
simbBusRSE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_SSE.ico";
|
|
|
|
simbBusRSSE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_S.ico";
|
|
|
|
simbBusRS = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_SSV.ico";
|
|
|
|
simbBusRSSV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_SV.ico";
|
|
|
|
simbBusRSV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_VSV.ico";
|
|
|
|
simbBusRVSV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_V.ico";
|
|
|
|
simbBusRV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_VNV.ico";
|
|
|
|
simbBusRVNV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_NV.ico";
|
|
|
|
simbBusRNV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_NNV.ico";
|
|
|
|
simbBusRNNV = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_N.ico";
|
|
|
|
simbBusRN = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_NNE.ico";
|
|
|
|
simbBusRNNE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_NE.ico";
|
|
|
|
simbBusRNE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
fileName = System.Windows.Forms.Application.StartupPath + @"\resource\images\ArrowR_ENE.ico";
|
|
simbBusRENE = mapControl.ActiveMap.Symbols.Add(fileName);
|
|
|
|
|
|
try
|
|
{
|
|
foreach (Int32 obj in MainForm2.carlist.Keys)
|
|
{
|
|
((Car)MainForm2.carlist[obj]).symb = mapControl.ActiveMap.Symbols.Add(((Car)MainForm2.carlist[obj]).fileName);
|
|
((Car)MainForm2.carlist[obj]).symb.Name = ((Car)MainForm2.carlist[obj]).googleAddresPath;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Erroare la bagat simbolurile"+ex.StackTrace);
|
|
}
|
|
}
|
|
|
|
public short GetSymbolFromOrientation(Int32 param)
|
|
{
|
|
try
|
|
{
|
|
if (((param >= 0) && (param < 11.25)) || ((param > 348.75) && (param <= 360)))
|
|
return simbBusE.ID;
|
|
else if ((param >= 11.25) && (param < 33.75))
|
|
return simbBusENE.ID;
|
|
else if ((param >= 33.75) && (param < 56.25))
|
|
return simbBusNE.ID;
|
|
else if ((param >= 56.25) && (param < 78.75))
|
|
return simbBusNNE.ID;
|
|
else if ((param >= 78.75) && (param < 101.25))
|
|
return simbBusN.ID;
|
|
else if ((param >= 101.25) && (param < 123.75))
|
|
return simbBusNNV.ID;
|
|
else if ((param >= 123.75) && (param < 146.25))
|
|
return simbBusNV.ID;
|
|
else if ((param >= 146.25) && (param < 168.75))
|
|
return simbBusVNV.ID;
|
|
else if ((param >= 168.75) && (param < 191.25))
|
|
return simbBusV.ID;
|
|
else if ((param >= 191.25) && (param < 213.75))
|
|
return simbBusVSV.ID;
|
|
else if ((param >= 213.75) && (param < 236.25))
|
|
return simbBusSV.ID;
|
|
else if ((param >= 236.25) && (param < 258.75))
|
|
return simbBusSSV.ID;
|
|
else if ((param >= 258.75) && (param < 281.25))
|
|
return simbBusS.ID;
|
|
else if ((param >= 281.25) && (param < 303.75))
|
|
return simbBusSSE.ID;
|
|
else if ((param >= 303.75) && (param < 326.25))
|
|
return simbBusSE.ID;
|
|
else if ((param >= 326.25) && (param < 348.75))
|
|
return simbBusESE.ID;
|
|
else
|
|
return -1;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Ex:" + ex.Message);
|
|
return -1;
|
|
}
|
|
}
|
|
public short GetSymbolFromOrientationColor(Int32 param, SymbolColor parColor)
|
|
{
|
|
try
|
|
{
|
|
if (parColor == SymbolColor.Green)
|
|
{
|
|
if (((param >= 0) && (param < 11.25)) || ((param > 348.75) && (param <= 360)))
|
|
return simbBusGE.ID;
|
|
else if ((param >= 11.25) && (param < 33.75))
|
|
return simbBusGENE.ID;
|
|
else if ((param >= 33.75) && (param < 56.25))
|
|
return simbBusGNE.ID;
|
|
else if ((param >= 56.25) && (param < 78.75))
|
|
return simbBusGNNE.ID;
|
|
else if ((param >= 78.75) && (param < 101.25))
|
|
return simbBusGN.ID;
|
|
else if ((param >= 101.25) && (param < 123.75))
|
|
return simbBusGNNV.ID;
|
|
else if ((param >= 123.75) && (param < 146.25))
|
|
return simbBusGNV.ID;
|
|
else if ((param >= 146.25) && (param < 168.75))
|
|
return simbBusGVNV.ID;
|
|
else if ((param >= 168.75) && (param < 191.25))
|
|
return simbBusGV.ID;
|
|
else if ((param >= 191.25) && (param < 213.75))
|
|
return simbBusGVSV.ID;
|
|
else if ((param >= 213.75) && (param < 236.25))
|
|
return simbBusGSV.ID;
|
|
else if ((param >= 236.25) && (param < 258.75))
|
|
return simbBusGSSV.ID;
|
|
else if ((param >= 258.75) && (param < 281.25))
|
|
return simbBusGS.ID;
|
|
else if ((param >= 281.25) && (param < 303.75))
|
|
return simbBusGSSE.ID;
|
|
else if ((param >= 303.75) && (param < 326.25))
|
|
return simbBusGSE.ID;
|
|
else if ((param >= 326.25) && (param < 348.75))
|
|
return simbBusGESE.ID;
|
|
else
|
|
return -1;
|
|
} if (parColor == SymbolColor.Red)
|
|
{
|
|
if (((param >= 0) && (param < 11.25)) || ((param > 348.75) && (param <= 360)))
|
|
return simbBusRE.ID;
|
|
else if ((param >= 11.25) && (param < 33.75))
|
|
return simbBusRENE.ID;
|
|
else if ((param >= 33.75) && (param < 56.25))
|
|
return simbBusRNE.ID;
|
|
else if ((param >= 56.25) && (param < 78.75))
|
|
return simbBusRNNE.ID;
|
|
else if ((param >= 78.75) && (param < 101.25))
|
|
return simbBusRN.ID;
|
|
else if ((param >= 101.25) && (param < 123.75))
|
|
return simbBusRNNV.ID;
|
|
else if ((param >= 123.75) && (param < 146.25))
|
|
return simbBusRNV.ID;
|
|
else if ((param >= 146.25) && (param < 168.75))
|
|
return simbBusRVNV.ID;
|
|
else if ((param >= 168.75) && (param < 191.25))
|
|
return simbBusRV.ID;
|
|
else if ((param >= 191.25) && (param < 213.75))
|
|
return simbBusRVSV.ID;
|
|
else if ((param >= 213.75) && (param < 236.25))
|
|
return simbBusRSV.ID;
|
|
else if ((param >= 236.25) && (param < 258.75))
|
|
return simbBusRSSV.ID;
|
|
else if ((param >= 258.75) && (param < 281.25))
|
|
return simbBusRS.ID;
|
|
else if ((param >= 281.25) && (param < 303.75))
|
|
return simbBusRSSE.ID;
|
|
else if ((param >= 303.75) && (param < 326.25))
|
|
return simbBusRSE.ID;
|
|
else if ((param >= 326.25) && (param < 348.75))
|
|
return simbBusRESE.ID;
|
|
else
|
|
return -1;
|
|
}
|
|
else
|
|
return -1;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Ex:" + ex.Message);
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
public short GetSymbolFromOrientationIcon(Int32 param,Int32 iconpar)
|
|
{
|
|
short tmp = -1;//old iconpar<=1
|
|
if (iconpar < 1) return GetSymbolFromOrientation(param);
|
|
else
|
|
{
|
|
try
|
|
{
|
|
tmp = ((Car)MainForm2.carlist[iconpar]).symb.ID;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Unable to select car icon:"+ex.ToString());
|
|
}
|
|
return tmp;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public class PlaceWithID
|
|
{
|
|
public Symbolx objSymb;
|
|
public String placeType;
|
|
}
|
|
|
|
public class PlaceSymbols
|
|
{
|
|
private PlaceWithID ObjPlaceID;
|
|
private Symbolx objSymb;
|
|
public ArrayList ObjList = new ArrayList();
|
|
public ArrayList placetype = new ArrayList();
|
|
|
|
public PlaceSymbols(AxMappointControlx mapControl)
|
|
{
|
|
try
|
|
{
|
|
foreach (String obj in MainForm2.PlaceTypes.Keys)
|
|
{
|
|
objSymb = mapControl.ActiveMap.Symbols.Add(((Place)MainForm2.PlaceTypes[obj]).pic);
|
|
ObjPlaceID = new PlaceWithID();
|
|
ObjPlaceID.objSymb = objSymb;
|
|
ObjPlaceID.placeType = ((Place)MainForm2.PlaceTypes[obj]).type;
|
|
ObjList.Add(ObjPlaceID);
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Erroare la bagat simbolurile" + ex.ToString());
|
|
}
|
|
}
|
|
|
|
public short get_ID_for_Symbol(int idxScroll)
|
|
{
|
|
return ((Symbolx)placetype[idxScroll]).ID;
|
|
}
|
|
}
|
|
|
|
public class PlaceSymbolsGIS
|
|
{
|
|
public PlaceSymbolsGIS(IGraphicTracker PlaceSet, String tabName)
|
|
{
|
|
try
|
|
{
|
|
foreach (String obj in MainForm2.PlaceTypesGIS.Keys)
|
|
((Place)MainForm2.PlaceTypesGIS[obj]).SymbGIS[tabName] = PlaceSet.CreateSymbol(((Place)MainForm2.PlaceTypesGIS[obj]).GISsymb as ISymbol, null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SM.Debug("Erroare la bagat simbolurile" + ex.ToString());
|
|
}
|
|
}
|
|
}
|
|
}
|