public void Add() { //AppState.ViewDef.Layers.ChildLayers.Add(pl); IsRunning = true; this.ImageUrl = "http://googlediscovery.com/wp-content/uploads/panoramio.png"; service = new SaveService() { IsLocal = true, Name = "lookr", Id = Guid.NewGuid(), IsFileBased = false, StaticService = true, IsVisible = false, RelativeFolder = "Social Media" }; service.Init(Mode.client, AppState.DataServer); // TODO Check met Arnoud of dit niet de folder moet zijn die in de configoffline staat? service.Folder = Path.Combine(Directory.GetCurrentDirectory(),@"\PoiLayers\Social Media"); service.InitPoiService(); service.Settings.OpenTab = false; service.Settings.Icon = "brugwhite.png"; service.AutoStart = true; webcam = new PoI { PoiId = "Webcam", Style = new PoIStyle { DrawingMode = DrawingModes.Image, FillColor = Colors.Red, CallOutFillColor = Colors.White, CallOutForeground = Colors.Black, IconWidth = 30, IconHeight = 30, TapMode = TapMode.OpenMedia, TitleMode = TitleModes.None } }; webcam.AddMetaInfo("name", "name"); //result.AddMetaInfo("height", "height", MetaTypes.number); //result.AddMetaInfo("width", "width", MetaTypes.number); //result.AddMetaInfo("description", "description"); //result.AddMetaInfo("image", "image", MetaTypes.image); service.PoITypes.Add(webcam); AppState.DataServer.Services.Add(service); AppState.ViewDef.MapControl.ExtentChanged += MapControl_ExtentChanged; DownloadCams(); }
public void CreateService() { AppState.ViewDef.FolderIcons[@"AcceleratedLayers\Search Result"] = "pack://*****:*****@"\PoiLayers\Search Result"; SearchService.InitPoiService(); SearchService.Settings.OpenTab = false; SearchService.Settings.Icon = "brugwhite.png"; SearchService.AutoStart = true; result = new PoI { ContentId = "Brug", Style = new PoIStyle { DrawingMode = DrawingModes.Point, FillColor = Colors.Red, CallOutFillColor = Colors.White, CallOutForeground = Colors.Black, IconWidth = 30, IconHeight = 30, TitleMode = TitleModes.Bottom } }; result.AddMetaInfo("name", "name"); //result.AddMetaInfo("height", "height", MetaTypes.number); //result.AddMetaInfo("width", "width", MetaTypes.number); //result.AddMetaInfo("description", "description"); //result.AddMetaInfo("image", "image", MetaTypes.image); SearchService.PoITypes.Add(result); DataServer.Services.Add(SearchService); }
public SaveService CreateService() { AppState.ViewDef.FolderIcons[@"Layers\Sketch Layer"] = "pack://*****:*****@"\PoiLayers\Sketch Layer"; ss.InitPoiService(); ss.SettingsList = new ContentList { Service = ss, ContentType = typeof (ServiceSettings), Id = "settings", IsRessetable = false }; ss.SettingsList.Add(new ServiceSettings()); ss.AllContent.Add(ss.SettingsList); ss.Settings.OpenTab = false; ss.Settings.TabBarVisible = false; ss.Settings.Icon = "layer.png"; ss.AutoStart = true; //var result = new PoI //{ // ContentId = "Brug", // Style = new PoIStyle // { // DrawingMode = DrawingModes.Point, // FillColor = Colors.Red, // IconWidth = 30, // IconHeight = 30, // TitleMode = TitleModes.Bottom // } //}; //result.AddMetaInfo("name", "name"); ////result.AddMetaInfo("height", "height", MetaTypes.number); ////result.AddMetaInfo("width", "width", MetaTypes.number); ////result.AddMetaInfo("description", "description"); ////result.AddMetaInfo("image", "image", MetaTypes.image); //ss.PoITypes.Add(result); return ss; }
public void Add() { PanoramioService = new SaveService() { IsLocal = true, Name = "PanoramioEx", Id = Guid.NewGuid(), IsFileBased = false, StaticService = true, IsVisible = false, RelativeFolder = "Social Media" }; PanoramioService.Init(Mode.client, AppState.DataServer); // TODO Check met Arnoud of dit niet de folder moet zijn die in de configoffline staat? PanoramioService.Folder = Directory.GetCurrentDirectory() + @"\PoiLayers\Social Media"; PanoramioService.InitPoiService(); PanoramioService.Settings.OpenTab = true; PanoramioService.Settings.Icon = "brugwhite.png"; PanoramioService.AutoStart = true; mImagePoiStyle = new PoI { PoiId = "Image", Style = new PoIStyle { DrawingMode = DrawingModes.Image, FillColor = Colors.Red, CallOutFillColor = Colors.White, CallOutForeground = Colors.Black, IconWidth = 30, IconHeight = 30, TapMode = TapMode.OpenMedia, TitleMode = TitleModes.None }, MetaInfo = new MetaInfoCollection() { new MetaInfo() { Label = "name", Title = "name" } } }; PanoramioService.PoITypes.Add(mImagePoiStyle); AppState.DataServer.Services.Add(PanoramioService); Url = AppState.Config.Get("CustomPanoramio.Url", ""); if (!String.IsNullOrEmpty(Url)) { mWebClient = new WebClient(); mWebClient.DownloadDataCompleted += MWebClient_DownloadDataCompleted; mWebClient.DownloadDataAsync(new Uri(Url)); ReloadInMinutes = AppState.Config.GetInt("CustomPanoramio.RefreshInMinutes", 15); if (ReloadInMinutes > 0) { var ts = new TimeSpan(0, ReloadInMinutes, 0); mTimer = new System.Timers.Timer(ts.Milliseconds); mTimer.Elapsed += MTimer_Elapsed; mTimer.AutoReset = false; } } }
public void Start() { IsRunning = true; SketchService = CreateService(); circularMenuItem = new CircularMenuItem {Title = "Start Sketch"}; circularMenuItem.Selected += circularMenuItem_Selected; circularMenuItem.Id = Guid.NewGuid().ToString(); circularMenuItem.Icon = "pack://application:,,,/csCommon;component/Resources/Icons/Pen.png"; AppState.AddCircularMenu(circularMenuItem); circularMenuItem.OpenChanged += (e, f) => { if (circularMenuItem.IsOpen) { CreateService(); SketchService.Layer.Visible = true; SketchService.Layer.Opacity = 1; } else { if (SketchService != null) { SketchService.Layer.Opacity = 0; } if (Draw != null && Draw.IsEnabled) Draw.IsEnabled = false; DisableSelections(); } }; UpdateMenu(); Execute.OnUIThread(() => AppState.DataServer.Services.Add(SketchService)); }