Пример #1
0
        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);
        }
Пример #2
0
        //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);
        }
Пример #3
0
        /// <summary>Ремонт ел.блоків</summary>
        /// <param name="MainProcess"></param>
        /// <param name="unitBarcode">Штрихкод блоку</param>
        public RepairUnit(WMSClient MainProcess, string unitBarcode)
            : base(MainProcess, 1)
        {
            UnitBarcode = unitBarcode;

            IsLoad = true;
            DrawControls();
        }
Пример #4
0
        /// <summary>Ремонт ел.блоків</summary>
        /// <param name="MainProcess"></param>
        /// <param name="unitBarcode">Штрихкод блоку</param>
        public RepairUnit(WMSClient MainProcess, string unitBarcode)
            : base(MainProcess, 1)
        {
            UnitBarcode = unitBarcode;

            IsLoad = true;
            DrawControls();
        }
Пример #5
0
        /// <summary>Ремонт світильників</summary>
        public RepairLight(WMSClient MainProcess, string lightBarcode)
            : base(MainProcess, 1)
        {
            LightBarcode = lightBarcode;

            IsLoad = true;
            stage = Stages.Begin;
            DrawControls();
        }
Пример #6
0
        /// <summary>Ремонт світильників</summary>
        public RepairLight(WMSClient MainProcess, string lightBarcode)
            : base(MainProcess, 1)
        {
            LightBarcode = lightBarcode;

            IsLoad = true;
            stage  = Stages.Begin;
            DrawControls();
        }
Пример #7
0
        /// <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();
        }
Пример #8
0
        /// <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();
        }
Пример #9
0
        /// <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();
        }
Пример #10
0
        /// <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();
        }
Пример #11
0
        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;
        }
Пример #12
0
        /// <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();
        }
Пример #13
0
        /// <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();
        }
Пример #14
0
        /// <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();
        }
Пример #15
0
        /// <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();
        }
Пример #16
0
        public PlacingOnMap(WMSClient wmsClient, long map, int register, int position)
            : base(wmsClient, 1)
        {
            StopNetworkConnection();

            this.map = map;
            this.register = register;
            this.position = position;

            DrawForm1Controls();
        }
Пример #17
0
        public PlacingOnMap(WMSClient wmsClient, long map, int register, int position)
            : base(wmsClient, 1)
        {
            StopNetworkConnection();

            this.map      = map;
            this.register = register;
            this.position = position;

            DrawForm1Controls();
        }
Пример #18
0
        /// <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();
        }
Пример #19
0
        /// <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();
        }
Пример #20
0
        /// <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();
        }
Пример #21
0
        /// <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();
        }
Пример #22
0
    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);
    }
Пример #23
0
        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();
        }
Пример #24
0
        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();
        }
Пример #25
0
        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;
        }
Пример #26
0
 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);
         }
     }
 }
Пример #27
0
        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;
                    }
                }
            }
        }
Пример #28
0
 public AcceptingAfterFixing(WMSClient wmsClient)
     : base(wmsClient, 1)
 {
 }
Пример #29
0
 public ListOfLabelsConstructor(WMSClient mainProcess, object[] parameters)
 {
     MainProcess = mainProcess;
     Topic = string.Empty;
     Parameters = parameters;
 }
Пример #30
0
 public ListOfLabelsConstructor(WMSClient mainProcess)
 {
     MainProcess = mainProcess;
 }
Пример #31
0
 /// <summary>"Процессы"</summary>
 public Processes(WMSClient MainProcess)
     : base(MainProcess, 1)
 {
     IsLoad = true;
     DrawControls();
 }
Пример #32
0
 public ListOfLabelsConstructor(WMSClient mainProcess)
 {
     MainProcess = mainProcess;
 }
Пример #33
0
 /// <summary>"Процессы"</summary>
 public Processes(WMSClient MainProcess)
     : base(MainProcess, 1)
 {
     IsLoad = true;
     DrawControls();
 }
Пример #34
0
 public AcceptingAfterFixing(WMSClient wmsClient)
     : base(wmsClient, 1)
 {
 }
Пример #35
0
 public ListOfLabelsConstructor(WMSClient mainProcess, object[] parameters)
 {
     MainProcess = mainProcess;
     Topic       = string.Empty;
     Parameters  = parameters;
 }
Пример #36
0
 public ListOfLabelsConstructor(WMSClient mainProcess, string topic, object[] parameters)
 {
     Topic       = topic;
     Parameters  = parameters;
     MainProcess = mainProcess;
 }
Пример #37
0
 public ListOfLabelsConstructor(WMSClient mainProcess, string topic, object[] parameters)
 {
     Topic = topic;
     Parameters = parameters;
     MainProcess = mainProcess;
 }