public Extent GetMaxExtent() { Extent extent = new Extent(); Extent x = new Extent(); for (int i = 0; i < Servicies.Count(); i++) { if (Servicies.ElementAt(i).GetType() == typeof(WMSClient)) { WMSClient WmsClient = (WMSClient)Servicies.ElementAt(i); x = WmsClient.GetMaxSize(); } else { WMTClient WmtClient = (WMTClient)Servicies.ElementAt(i); x = WmtClient.Extent(); } if (i == 0) { extent = x; } else { extent.ExpandToInclude(x); } } return(extent); }
//public void AddService(WebServiceType ServiceType, string WMSserver = "", string XMLCustomFile = "") //{ // switch (ServiceType) // { // case (WebServiceType.WMS): // { // WMSCapabilities WmsCapabilities = new WMSCapabilities(); // WmsCapabilities.ReadCapabilities(WMSserver, XMLCustomFile, Proxy); // Servicies.Add(WmsCapabilities); // } // break; // default: // { // WMTClient WmtClient = new WMTClient(); // WmtClient.Create(ServiceType, Proxy); // Servicies.Add(WmtClient); // } // break; // } //} public string GetHTML(ref GDIMap m, Size size, string ClientID) { string htm = ""; Rectangle Rect = m.ProjToPixel(m.ViewExtents); htm += "<div id=\"Back_" + ClientID + "\" style=\"position:absolute; left:" + Rect.Left.ToString() + "px; top:" + Rect.Top.ToString() + "px; width:" + Rect.Width.ToString() + "px; height:" + Rect.Height.ToString() + "px; z-index:1; \">"; for (int i = 0; i < Servicies.Count(); i++) { if (Servicies.ElementAt(i).GetType() == typeof(WMSClient)) { WMSClient WmsClient = (WMSClient)Servicies.ElementAt(i); htm += WmsClient.GetHTML(ref m, size, ClientID + "_" + i.ToString()); } else { WMTClient WmtClient = (WMTClient)Servicies.ElementAt(i); if (WmtClient.Visible) { htm += WmtClient.GetHTML(ref m, size, ClientID + "_" + i.ToString()); } } } htm += "</div>"; return(htm); }
/// <summary>Ремонт ел.блоків</summary> /// <param name="MainProcess"></param> /// <param name="unitBarcode">Штрихкод блоку</param> public RepairUnit(WMSClient MainProcess, string unitBarcode) : base(MainProcess, 1) { UnitBarcode = unitBarcode; IsLoad = true; DrawControls(); }
/// <summary>Ремонт ел.блоків</summary> /// <param name="MainProcess"></param> /// <param name="unitBarcode">Штрихкод блоку</param> public RepairUnit(WMSClient MainProcess, string unitBarcode) : base(MainProcess, 1) { UnitBarcode = unitBarcode; IsLoad = true; DrawControls(); }
/// <summary>Ремонт світильників</summary> public RepairLight(WMSClient MainProcess, string lightBarcode) : base(MainProcess, 1) { LightBarcode = lightBarcode; IsLoad = true; stage = Stages.Begin; DrawControls(); }
/// <summary>Ремонт світильників</summary> public RepairLight(WMSClient MainProcess, string lightBarcode) : base(MainProcess, 1) { LightBarcode = lightBarcode; IsLoad = true; stage = Stages.Begin; DrawControls(); }
/// <summary>��������� ��������� �� ���������</summary> /// <param name="MainProcess"></param> /// <param name="barcode">�������� ��������������</param> /// <param name="type">��� ��������������</param> /// <param name="state">����� ������</param> public SetAccessoryNewState(WMSClient MainProcess, string barcode, TypeOfAccessories type, TypesOfLampsStatus state) : base(MainProcess, 1) { accessoryBarcode = barcode; typeOfAccessory = type; newState = state; IsLoad = true; DrawControls(); }
/// <summary>Прийомка з ...</summary> /// <param name="MainProcess"></param> /// <param name="type">Тип комплектуючого</param> public AcceptionSendingDocs(WMSClient MainProcess, TypeOfAccessories type) : base(MainProcess, 1) { rows = new Dictionary<string, DataRow>(); accepted = new List<string>(); typeOfAccessory = type; IsLoad = true; DrawControls(); }
/// <summary>Прийомка з ...</summary> /// <param name="MainProcess"></param> /// <param name="type">Тип комплектуючого</param> public AcceptionSendingDocs(WMSClient MainProcess, TypeOfAccessories type) : base(MainProcess, 1) { rows = new Dictionary <string, DataRow>(); accepted = new List <string>(); typeOfAccessory = type; IsLoad = true; DrawControls(); }
/// <summary>Поставити світильник на зберігання</summary> /// <param name="MainProcess"></param> /// <param name="barcode">Штрихкод комплектуючого</param> /// <param name="type">Тип комплектуючого</param> /// <param name="state">Новий статус</param> public SetAccessoryNewState(WMSClient MainProcess, string barcode, TypeOfAccessories type, TypesOfLampsStatus state) : base(MainProcess, 1) { accessoryBarcode = barcode; typeOfAccessory = type; newState = state; IsLoad = true; DrawControls(); }
private void CreateMap() { string basePath = Server.MapPath(@"~\Shape"); WebMap1.Projection = KnownCoordinateSystems.Projected.World.WebMercator; WebMap1.MapViewExtents = new Extent(-20037508.342789, -20037508.342789, 20037508.342789, 20037508.342789); WebMapClient client = new WebMapClient(); WMTClient wmt1 = new WMTClient(); wmt1.Create(WebServiceType.BingHybrid); string WMSServerWMS0 = "http://maps.ngdc.noaa.gov/soap/web_mercator/marine_geology/MapServer/WMSServer"; WMSClient wms0 = new WMSClient(); wms0.ReadCapabilities(WMSServerWMS0); wms0.CRS = "EPSG:3857"; wms0.Projection = KnownCoordinateSystems.Projected.World.WebMercator; string WMSServerWMS1 = "http://maps.ngdc.noaa.gov/soap/web_mercator/graticule/MapServer/WMSServer"; WMSClient wms1 = new WMSClient(); wms1.ReadCapabilities(WMSServerWMS1); wms1.CRS = "EPSG:3857"; wms1.Projection = KnownCoordinateSystems.Projected.World.WebMercator; client.AddService(wmt1); client.AddService(wms0); client.AddService(wms1); WebMap1.Back = client; IMapFeatureLayer countriesLayer = (IMapFeatureLayer)WebMap1.AddLayer(basePath + @"\10m_admin_0_countries.shp"); PolygonSymbolizer symbCountries = new PolygonSymbolizer(Color.FromArgb(0, 191, 0)); symbCountries.SetFillColor(Color.Transparent); symbCountries.OutlineSymbolizer = new LineSymbolizer(Color.Magenta, 1); countriesLayer.Symbolizer = symbCountries; IMapFeatureLayer graticules30Layer = (IMapFeatureLayer)WebMap1.AddLayer(basePath + @"\10m_graticules_30.shp"); LineSymbolizer symbGratitules30 = new LineSymbolizer(Color.Red, 1); graticules30Layer.Symbolizer = symbGratitules30; graticules30Layer.IsVisible = false; }
/// <summary>��������� � �����</summary> /// <param name="MainProcess"></param> /// <param name="topic">���������</param> /// <param name="doc">����� ���������</param> /// <param name="table">����� �������� �������</param> public AcceptanceFromExchange(WMSClient MainProcess, string topic, string doc, string table) : base(MainProcess, 1) { accepted = new Dictionary<long, List<KeyValuePair<long, string>>>(); MainProcess.ToDoCommand = topic; docName = doc; tableName = table; IsLoad = true; DrawControls(); }
/// <summary>Приймання з обміну</summary> /// <param name="MainProcess"></param> /// <param name="topic">Заголовок</param> /// <param name="doc">Назва документу</param> /// <param name="table">Назва табличної частини</param> public AcceptanceFromExchange(WMSClient MainProcess, string topic, string doc, string table) : base(MainProcess, 1) { accepted = new Dictionary <long, List <KeyValuePair <long, string> > >(); MainProcess.ToDoCommand = topic; docName = doc; tableName = table; IsLoad = true; DrawControls(); }
/// <summary>��������� � ...</summary> /// <param name="MainProcess"></param> /// <param name="topic">��������� (� ����?)</param> /// <param name="table">����� �������� ������� ���������</param> public AcceptanceFrom(WMSClient MainProcess, string topic, string table) : base(MainProcess, 1) { rows = new Dictionary<string, DataRow>(); accepted = new List<string>(); MainProcess.ToDoCommand = topic; tableName = table; IsLoad = true; DrawControls(); }
/// <summary>Приймання з ...</summary> /// <param name="MainProcess"></param> /// <param name="topic">Заголовок (з чого?)</param> /// <param name="table">Назва табличної частини документу</param> public AcceptanceFrom(WMSClient MainProcess, string topic, string table) : base(MainProcess, 1) { rows = new Dictionary <string, DataRow>(); accepted = new List <string>(); MainProcess.ToDoCommand = topic; tableName = table; IsLoad = true; DrawControls(); }
public PlacingOnMap(WMSClient wmsClient, long map, int register, int position) : base(wmsClient, 1) { StopNetworkConnection(); this.map = map; this.register = register; this.position = position; DrawForm1Controls(); }
public PlacingOnMap(WMSClient wmsClient, long map, int register, int position) : base(wmsClient, 1) { StopNetworkConnection(); this.map = map; this.register = register; this.position = position; DrawForm1Controls(); }
/// <summary>Приемка нового коплектующего</summary> /// <param name="MainProcess"></param> /// <param name="topic">Заголовок</param> /// <param name="accessory">Тип комплектующего</param> public AcceptanceOfNewAccessory(WMSClient MainProcess, string topic, TypeOfAccessories accessory) : base(MainProcess, 1) { MainProcess.ToDoCommand = topic; FormNumber = 1; BusinessProcessType = ProcessType.Registration; typeOfAccessory = accessory; acceptanceDoc = new AcceptanceOfNewComponents(); IsLoad = true; DrawControls(); }
/// <summary>Приемка нового коплектующего</summary> /// <param name="MainProcess"></param> /// <param name="topic">Заголовок</param> /// <param name="accessory">Тип комплектующего</param> public AcceptanceOfNewAccessory(WMSClient MainProcess, string topic, TypeOfAccessories accessory) : base(MainProcess, 1) { MainProcess.ToDoCommand = topic; FormNumber = 1; BusinessProcessType = ProcessType.Registration; typeOfAccessory = accessory; acceptanceDoc = new AcceptanceOfNewComponents(); IsLoad = true; DrawControls(); }
/// <summary>Прийомка з ...</summary> /// <param name="MainProcess"></param> /// <param name="topic">Заголовок</param> /// <param name="type">Тип комплектуючого</param> /// <param name="subTableName">Ім'я табличної частини</param> public AcceptionSendingDocs(WMSClient MainProcess, string topic, TypeOfAccessories type, string subTableName) : base(MainProcess, 1) { rows = new Dictionary <string, DataRow>(); accepted = new List <string>(); this.subTableName = subTableName; MainProcess.ToDoCommand = topic; typeOfAccessory = type; IsLoad = true; DrawControls(); }
/// <summary>Прийомка з ...</summary> /// <param name="MainProcess"></param> /// <param name="topic">Заголовок</param> /// <param name="type">Тип комплектуючого</param> /// <param name="subTableName">Ім'я табличної частини</param> public AcceptionSendingDocs(WMSClient MainProcess, string topic, TypeOfAccessories type, string subTableName) : base(MainProcess, 1) { rows = new Dictionary<string, DataRow>(); accepted = new List<string>(); this.subTableName = subTableName; MainProcess.ToDoCommand = topic; typeOfAccessory = type; IsLoad = true; DrawControls(); }
public void getMap(DataRecordSetter Setter, DataRecord record, int Width = 100, int Height = 100, string Format = "image/png", DownloadType type = DownloadType.Record, string OutputPath = "", string OutputName = "") // Parameters TODO { Console.WriteLine("GetMap"); // Build a WMS observable var client = new WMSClient(factory, type, OutputPath, OutputName); client.Token = GenerateToken("GetMap"); client.App = App; client.Root = Root; client.GetData(record, Width, Height, Format); client.callback = Setter; AddObservable(client); }
public ReplacingAccessory(WMSClient MainProcess, object caseBarcode, object accessoryBarcode, bool replaceProcess, TypeOfAccessories type) : base(MainProcess, 1) { CaseBarcode = caseBarcode; NewAccessoryBarcode = accessoryBarcode; FormNumber = 1; BusinessProcessType = ProcessType.Registration; this.replaceProcess = replaceProcess; this.type = type; IsLoad = true; fillStr(); DrawControls(); }
public ReplacingAccessory(WMSClient MainProcess, object caseBarcode, object accessoryBarcode, bool replaceProcess, TypeOfAccessories type) : base(MainProcess, 1) { CaseBarcode = caseBarcode; NewAccessoryBarcode = accessoryBarcode; FormNumber = 1; BusinessProcessType = ProcessType.Registration; this.replaceProcess = replaceProcess; this.type = type; IsLoad = true; fillStr(); DrawControls(); }
private void btnGetCapabilities_Click(object sender, EventArgs e) { var serverUrl = tbServerUrl.Text; var wmsClient = new WMSClient(); wmsClient.ReadCapabilities(serverUrl); WmsServerInfo.Version = wmsClient.Version; WmsServerInfo.OnlineResource = wmsClient.ServiceDescription.OnlineResource; var layers = wmsClient.GetVisibleLayer(); dgvLayers.DataSource = layers; }
public void List(WebLegend tree) { for (int i = Servicies.Count() - 1; i >= 0; i--) { if (Servicies.ElementAt(i).GetType() == typeof(WMSClient)) { WMSClient WmsClient = (WMSClient)Servicies.ElementAt(i); WmsClient.List(tree); } else { WMTClient WmtClient = (WMTClient)Servicies.ElementAt(i); WmtClient.List(tree); } } }
public void Check(string[] keys, bool check) { for (int i = 0; i < Servicies.Count(); i++) { if (Servicies.ElementAt(i).GetType() == typeof(WMSClient)) { WMSClient WmsClient = (WMSClient)Servicies.ElementAt(i); WmsClient.CheckLayer(keys, check); } else { WMTClient WmtClient = (WMTClient)Servicies.ElementAt(i); if (keys[0] == WmtClient.Name) { WmtClient.Visible = check; } } } }
public AcceptingAfterFixing(WMSClient wmsClient) : base(wmsClient, 1) { }
public ListOfLabelsConstructor(WMSClient mainProcess, object[] parameters) { MainProcess = mainProcess; Topic = string.Empty; Parameters = parameters; }
public ListOfLabelsConstructor(WMSClient mainProcess) { MainProcess = mainProcess; }
/// <summary>"Процессы"</summary> public Processes(WMSClient MainProcess) : base(MainProcess, 1) { IsLoad = true; DrawControls(); }
public ListOfLabelsConstructor(WMSClient mainProcess) { MainProcess = mainProcess; }
/// <summary>"Процессы"</summary> public Processes(WMSClient MainProcess) : base(MainProcess, 1) { IsLoad = true; DrawControls(); }
public AcceptingAfterFixing(WMSClient wmsClient) : base(wmsClient, 1) { }
public ListOfLabelsConstructor(WMSClient mainProcess, object[] parameters) { MainProcess = mainProcess; Topic = string.Empty; Parameters = parameters; }
public ListOfLabelsConstructor(WMSClient mainProcess, string topic, object[] parameters) { Topic = topic; Parameters = parameters; MainProcess = mainProcess; }
public ListOfLabelsConstructor(WMSClient mainProcess, string topic, object[] parameters) { Topic = topic; Parameters = parameters; MainProcess = mainProcess; }