/// <summary> /// Loads the templates. /// </summary> /// <param name="strFilename">The string filename.</param> private void LoadTemplates(string strFilename) { this.Cursor = Cursors.Wait; ClearTemplates(); try { XDocument xdoc = XDocument.Load(strFilename); foreach (XElement eTemplate in xdoc.Root.Elements("RFDevice")) { RFDevice device = RFDevice.FromXml(eTemplate); if (device != null) { this.RFDeviceTemplateCollection.Add(new RFDeviceTemplate(device)); } } } catch (Exception ex) { MB.Error(ex); } this.Cursor = Cursors.Arrow; }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /// <summary> /// Zooms to RFDevice. /// </summary> /// <param name="device">The device.</param> /// <param name="bSetMapZoomLevel">if set to <c>true</c> [b set map zoom level].</param> private void ZoomToRFDevice(RFDevice device, bool bSetMapZoomLevel = true) { this.mcMapControl.Position = new PointLatLng(device.Latitude, device.Longitude); if (bSetMapZoomLevel == true) { this.mcMapControl.Zoom = this.settings.MapZoomLevel; } }
/// <summary> /// Mains the specified arguments. /// </summary> /// <param name="args">The arguments.</param> static public void Main(string[] args) { Properties.Settings settings = Properties.Settings.Default; IPEndPoint epReceive = new IPEndPoint(IPAddress.Parse(settings.UDPServerHost), settings.UDPPortReceiving); UdpClient ucReceive = new UdpClient(settings.UDPPortReceiving); Socket sSenderSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); IPEndPoint epSenderEndPoint = new IPEndPoint(IPAddress.Parse(settings.UDPServerHost), settings.UDPPortSending); Console.Out.WriteLine("Listening To {0}:{1} And Waiting For Incoming Data ...", settings.UDPServerHost, settings.UDPPortReceiving); // A neverending story ... while (true) { byte[] baReceived = ucReceive.Receive(ref epReceive); string strReceived = Encoding.Default.GetString(baReceived); string strDateTime = DateTime.Now.Fmt_YYYYMMDD_HHMMSSFFF(); Console.Out.WriteLine(DIVIDER); Console.Out.WriteLine("{0}: Received {1} Bytes.", strDateTime, strReceived.Length); try { XDocument xDevice = XDocument.Parse(strReceived); RFDevice device = RFDevice.FromXml(xDevice.Root); Console.Out.WriteLine("Id : {0}", device.Id); Console.Out.WriteLine("Name : {0}", device.Name); Console.Out.WriteLine("Latitude : {0}", device.Latitude); Console.Out.WriteLine("Longitude : {0}", device.Longitude); Console.Out.WriteLine("StartTime : {0}", device.StartTime); // ---------------------------------------------------- GeoLocalizationResult gcr = new GeoLocalizationResult { Id = device.Id, Latitude = device.Latitude, Longitude = device.Longitude, Altitude = 0, LocalizationTime = DateTime.Now.Ticks }; XElement eGeoLocalizationResult = gcr.ToXml(); byte[] baMessage = Encoding.Default.GetBytes(eGeoLocalizationResult.ToDefaultString()); sSenderSocket.SendTo(baMessage, epSenderEndPoint); } catch (Exception ex) { Console.Error.WriteLine(ex.Message); } } }
/// <summary> /// Opens the file. /// </summary> /// <param name="strInputFilename">The string input filename.</param> internal void LoadFile(string strInputFilename) { this.Cursor = Cursors.Wait; this.CurrentFile = strInputFilename; try { XDocument xdoc = XDocument.Load(strInputFilename); //--------------------------------------------------------- XElement eGeneralSettings = xdoc.Root.Element("GeneralSettings"); this.Zoom = eGeneralSettings.GetDoubleFromNode("Zoom") ?? this.Zoom; //ShowCenter = eGeneralSettings.GetBoolFromNode("ShowCenter") ?? ShowCenter; //this.ScenarioDescription = eGeneralSettings.GetStringFromCData( "ScenarioDescription" ); string strMapProvider = eGeneralSettings.GetStringFromNode("MapProvider") ?? this.MapProvider.Name; this.MapProvider = GetProviderFromString(strMapProvider); XElement eCenterPosition = eGeneralSettings.Element("CenterPosition"); this.Latitude = eCenterPosition.GetDoubleFromNodePoint("Latitude") ?? this.Latitude; this.Longitude = eCenterPosition.GetDoubleFromNodePoint("Longitude") ?? this.Longitude; //--------------------------------------------------------- // Create not an new instance, only load the data into the existing one ... this.MetaInformation.LoadFromXml(xdoc.Root); // Ist ja noch nix passiert ... this.DescriptionMarkdownChanged = false; this.DescriptionStylesheetChanged = false; //this.tecDescription.Text = this.MetaInformation.Description; //this.tecStyleSheet.Text = this.MetaInformation.Stylesheet; //--------------------------------------------------------- XElement eRFDeviceCollection = xdoc.Root.Element("RFDeviceCollection"); foreach (XElement e in eRFDeviceCollection.Elements()) { AddRFDevice(RFDevice.FromXml(e)); } AddFileHistory(strInputFilename); } catch (Exception ex) { MB.Error(ex); } this.Cursor = Cursors.Arrow; }
/// <summary> /// Adds the RFDevice. /// </summary> /// <param name="d">The d.</param> /// <param name="bIsSelected">if set to <c>true</c> [b is selected].</param> private void AddRFDevice(RFDevice d, bool bIsSelected = false) { // Adding Everything, The User Can Still Correct This Later... //if (d.IsValid() == false) //{ // MB.Warning("Device Is Not Valid And Will Not Be Added To The Scenario!"); // return; //} AddRFDevice(new RFDeviceViewModel(this.mcMapControl, d), bIsSelected); }
public void Test000_ExportAndImportRFDeviceXml() { SIGENCEScenarioToolTestCaseHelper.ShowTestCaseInformation(); //----------------------------------------------------------------- RFDevice source = new RFDevice { Id = -42, RxTxType = RxTxTypes.IdealSDR, AntennaType = AntennaType.Unknown, StartTime = 42, Latitude = 15, Longitude = 10, Altitude = 1974, CenterFrequency_Hz = 90000, Bandwidth_Hz = 10000, Gain_dB = 5, SignalToNoiseRatio_dB = 263, Roll = -42, Pitch = -42, Yaw = -42, XPos = -1, YPos = -2, ZPos = -3, Name = "Han Solo", Remark = "A Star Wars Story.", }; XElement e = source.ToXml(); Assert.NotNull(e); string strFilename = $"{Path.GetTempPath()}nunit_rfdevice.{DateTime.Now.ToString( "yyyyMMdd_HHmmssfff" )}.xml"; e.SaveDefault(strFilename); Assert.True(File.Exists(strFilename)); //----------------------------------------------------------------- XDocument xdoc = XDocument.Load(strFilename); Assert.NotNull(xdoc); RFDevice destination = RFDevice.FromXml(xdoc.Root); Assert.NotNull(destination); Assert.True(destination.Equals(source)); }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /// <summary> /// Initializes a new instance of the <see cref="RFDeviceViewModel" /> class. /// </summary> /// <param name="mcMapControl">The mc map control.</param> /// <param name="device">The device.</param> /// <exception cref="ArgumentNullException">device</exception> public RFDeviceViewModel(GMapControl mcMapControl, RFDevice device) { //this.mcMapControl = mcMapControl ?? throw new ArgumentNullException(nameof(mcMapControl)); this.mcMapControl = mcMapControl; this.RFDevice = device ?? throw new ArgumentNullException(nameof(device)); //----------------------------------------------------------------- this.Marker = new GMapMarker(new PointLatLng(device.Latitude, device.Longitude)) { Offset = new Point(-15, -15), ZIndex = int.MaxValue, Tag = device }; UpdateMarkerShape(); }
/// <summary> /// Pastes the RFDevice. /// </summary> private void PasteRFDevice() { if (this.lCopiedRFDevices.Count > 0) { foreach (var device in this.lCopiedRFDevices) { // Create a copy of the original device and change the primarykey RFDevice newdevice = device.RFDevice.Clone(); newdevice.PrimaryKey = Guid.NewGuid(); newdevice.StartTime += this.settings.DeviceCopyTimeAddValue; AddRFDevice(newdevice); } } else { MB.Information("There are no copied RFDevices in the list.\nPlease mark a RFDevice and copied it."); } }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /// <summary> /// Creates the RFDevice. /// </summary> /// <param name="pll">The PLL.</param> /// <param name="ds">The ds.</param> /// <param name="bIsSelected">if set to <c>true</c> [b is selected].</param> private void AddRFDevice(PointLatLng pll, DeviceSource ds = DeviceSource.User, bool bIsSelected = false) { RFDevice newdevice = this.CurrentSelectedTemplate; // Die müssen wir ja neu vergeben ... newdevice.PrimaryKey = Guid.NewGuid(); // Und die müssen wir zuweisen, der Rest wird aus dem Template übernommen ... newdevice.DeviceSource = ds; newdevice.Latitude = pll.Lat; newdevice.Longitude = pll.Lng; AddRFDevice(newdevice, bIsSelected); //AddRFDevice( new RFDevice //{ // DeviceSource = ds, // Latitude = pll.Lat, // Longitude = pll.Lng //}, bIsSelected ); }
/// <summary> /// Creates the highest points. /// </summary> private void CreateHighestPoints() { if (this.tm == null) { MB.Information("Please Load First An Terrain Model!"); return; } DateTime dtStart = DateTime.Now; List <LatLonAlt> highestpoints = this.tm.GetHighestPoints(new Envelope(this.tm.XMin, this.tm.XMax, this.tm.YMin, this.tm.YMax), 10, 20); DateTime dtStop = DateTime.Now; if (highestpoints.Count > 0) { int iCounter = 0; foreach (LatLonAlt lla in highestpoints) { RFDevice dev = new RFDevice() { Latitude = lla.Lat, Longitude = lla.Lon, Altitude = lla.Alt, Name = $"HighPoint #{++iCounter } @ {lla.Alt} m", DeviceSource = DeviceSource.Automatic, Id = iCounter }; AddRFDevice(dev, true); } } MB.Information($"Time: {( dtStop - dtStart ).ToHHMMSSString()} / Points: {highestpoints.Count}"); GC.WaitForPendingFinalizers(); GC.Collect(); }
/// <summary> /// Adds to templates. /// </summary> /// <param name="device">The device.</param> private void AddToTemplates(RFDevice device) { this.RFDeviceTemplateCollection.Add(new RFDeviceTemplate(device)); }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #region Specialied Excel Import /// <summary> /// Loads from excel. /// </summary> /// <param name="strInputFilename">The string input filename.</param> private void LoadFromExcel(string strInputFilename) { if (strInputFilename.IsEmpty()) { throw new ArgumentException("The input filename can not be empty!", nameof(strInputFilename)); } Excel.Application excel = new Excel.Application(); try { Excel.Workbook wb = excel.Workbooks.Open(strInputFilename); // We guess, the RF Device Data is on sheet #1, starting @ row 1 ... Excel.Worksheet maindatasheet = wb.Sheets[1] as Excel.Worksheet; Excel.Range range = maindatasheet.UsedRange; int iColumnCount = range.Columns.Count; if (iColumnCount < 17) { throw new Exception( $"The Current Excel File Can Not Be Imported Because There Are Only {iColumnCount} Columns!\nWe Need At Least 17 Columns For A Good Import."); } int iRowCount = range.Rows.Count; if (iRowCount < 2) { throw new Exception( $"The Current Excel File Can Not Be Imported Because There Are Only {iRowCount} Rows!\nWe Need At Least 2 Rows For A Good Import."); } RFDeviceList dlImportedDevices = new RFDeviceList(); for (int iRow = 2; iRow < iRowCount + 1; iRow++) { RFDevice device = new RFDevice { DeviceSource = DeviceSource.DataImport, }; for (int iColumn = 1; iColumn < 19 + 1; iColumn++) { object value = (range.Cells[iRow, iColumn] as Excel.Range).Value2; if (value == null) { continue; } // Hier ist zu überlegen wie wir das ganze generisch machen können falls sich das Model nochmal ändert ... switch (iColumn) { case 1: device.StartTime = Convert.ToDouble(value); break; case 2: device.Id = Convert.ToInt32(value); break; case 3: device.Latitude = Convert.ToDouble(value); break; case 4: device.Longitude = Convert.ToDouble(value); break; case 5: device.Altitude = Convert.ToInt32(value); break; case 6: device.Roll = Convert.ToDouble(value); break; case 7: device.Pitch = Convert.ToDouble(value); break; case 8: device.Yaw = Convert.ToDouble(value); break; case 9: device.RxTxType = RxTxTypes.FromInt(device.Id, Convert.ToInt32(value)); break; case 10: device.AntennaType = (AntennaType)Convert.ToInt32(value); break; case 11: device.Gain_dB = Convert.ToDouble(value); break; case 12: device.CenterFrequency_Hz = Convert.ToDouble(value); break; case 13: device.Bandwidth_Hz = Convert.ToDouble(value); break; case 14: device.SignalToNoiseRatio_dB = Convert.ToDouble(value); break; case 15: device.XPos = Convert.ToInt32(value); break; case 16: device.YPos = Convert.ToInt32(value); break; case 17: device.ZPos = Convert.ToInt32(value); break; case 18: device.Remark = Convert.ToString(value); break; case 19: device.TechnicalParameters = Convert.ToString(value); break; } } dlImportedDevices.Add(device); } AddRFDevices(dlImportedDevices); } catch (Exception ex) { MB.Error(ex); } excel.Quit(); excel = null; GC.WaitForPendingFinalizers(); GC.Collect(); }
/// <summary> /// Initializes a new instance of the <see cref="MainWindow"/> class. /// </summary> public MainWindow() { InitializeComponent(); //----------------------------------------------------------------- if (this.settings.IsUpgraded == false) { this.settings.Upgrade(); this.settings.IsUpgraded = true; this.settings.Save(); } //if(string.IsNullOrEmpty( this.settings.UDPHost )) //{ // MB.Warning( "The value in the configuration file for the setting UDPHost is invalid!\nPlease correct the value and restart the application." ); // this.settings.UDPHost = "127.0.0.1"; //} //if(this.settings.UDPPortSending < 1025 || this.settings.UDPPortSending > 65535) //{ // MB.Warning( "The value in the configuration file for the setting UDPPort is invalid!\nPlease correct the value and restart the application." ); // this.settings.UDPPortSending = 4242; //} //if(this.settings.UDPDelay < 0 || this.settings.UDPDelay > 10000) //{ // MB.Warning( "The value in the configuration file for the setting UDPDelay is invalid!\nPlease correct the value and restart the application." ); // this.settings.UDPDelay = 500; //} if (this.settings.MapZoomLevel < 1 || this.settings.MapZoomLevel > 20) { MB.Warning("The value in the configuration file for the setting MapZoomLevel is invalid!\nPlease correct the value and restart the application."); this.settings.MapZoomLevel = 18; } //----------------------------------------------------------------- this.DataContext = this; //----------------------------------------------------------------- if (Properties.Settings.Default.LastOpenFiles == null) { Properties.Settings.Default.LastOpenFiles = new StringCollection(); } //----------------------------------------------------------------- InitMapControl(); InitMapProvider(); InitCommands(); InitFileOpenSaveDialogs(); InitTextEditorControls(); //----------------------------------------------------------------- SetTitle(); UpdateFileHistory(); //----------------------------------------------------------------- this.lcvRFDevices = CollectionViewSource.GetDefaultView(this.RFDeviceViewModelCollection) as ListCollectionView; if (this.lcvRFDevices != null) { this.lcvRFDevices.IsLiveFiltering = true; this.lcvRFDevices.Filter = IsWantedRFDevice; } //----------------------------------------------------------------- this.dgcbcRxTxType.ItemsSource = RxTxTypes.Values; List <RxTxType> lRxTxTypes = new List <RxTxType> { RxTxType.Empty }; lRxTxTypes.AddRange(RxTxTypes.Values); this.cbRxTxType.ItemsSource = lRxTxTypes; this.cbAntennaType.ItemsSource = DisplayableEnumeration.GetCollection <AntennaType>(); //----------------------------------------------------------------- this.RFDeviceTemplateCollection.Add(EMPTY_TEMPLATE); this.MetaInformation.PropertyChanged += MetaInformation_PropertyChanged; //----------------------------------------------------------------- using (XpsDocument xps = new XpsDocument("MarkdownCheatsheet.xps", FileAccess.Read)) { this.dvMarkdownCheatsheet.Document = xps.GetFixedDocumentSequence(); } this.dvMarkdownCheatsheet.FitToWidth(); //----------------------------------------------------------------- #if DEBUG //MessageMocker(@"O:\SIGENCE-ObiWanLansi-Tools\MessageHandler\java\messages\JammerDetection.xml"); HelpConfigFactory.CreateTemplate(Properties.Settings.Default.HelpPath); this.RFDeviceTemplateCollection.Add(new RFDeviceTemplate(new RFDevice { Name = "GPS Jammer", Id = 1 })); this.RFDeviceTemplateCollection.Add(new RFDeviceTemplate(new RFDevice { Name = "FMBroadcast", Id = 2 })); this.RFDeviceTemplateCollection.Add(new RFDeviceTemplate(new RFDevice { Name = "NFMRadio", Id = 3 })); this.RFDeviceTemplateCollection.Add(new RFDeviceTemplate(new RFDevice { Name = "AIS Sender", Id = 4 })); this.RFDeviceTemplateCollection.Add(new RFDeviceTemplate(new RFDevice { Name = "B200 Mini", Id = -2 })); this.RFDeviceTemplateCollection.Add(new RFDeviceTemplate(new RFDevice { Name = "HackRF", Id = -3 })); this.RFDeviceTemplateCollection.Add(new RFDeviceTemplate(new RFDevice { Name = "TwinRx", Id = -4 })); //LoadTemplates( @"D:\EigeneDateien\Entwicklung.GitHub\SIGENCE-Scenario-Tool\Examples\Templates.stt" ); //ImportSettings(@"D:\EigeneDateien\Entwicklung.GitHub\SIGENCE-Scenario-Tool\Examples\mysettings.sts"); //----------------------------------------------------------------- //try //{ // string strFilename = $"{Tool.StartupPath}\\tuebingen-regbez-latest.osm.sqlite"; // this.GeoNodeCollection = GeoNodeCollection.GetCollection(strFilename); //} //catch (Exception ex) //{ // MB.Error(ex); //} //this.lcvGeoNodes = CollectionViewSource.GetDefaultView(this.GeoNodeCollection) as ListCollectionView; //if (this.lcvGeoNodes != null) //{ // this.lcvGeoNodes.IsLiveFiltering = true; // this.lcvGeoNodes.Filter = IsWantedGeoNode; //} //----------------------------------------------------------------- //CreateRandomizedRFDevices(10, true); //AddRFDevice( new RFDevice { PrimaryKey = Guid.Empty, Id = -1, Latitude = 1974, Longitude = 1974, StartTime = -1974 } ); //AddRFDevice( new RFDevice //{ // Id = 42, // DeviceSource = DeviceSource.User, // Latitude = 47.666557, // Longitude = 9.386941, // AntennaType = AntennaType.HyperLOG60200, // RxTxType = RxTxTypes.FMBroadcast, // CenterFrequency_Hz = 90_000_000, // Bandwidth_Hz = 30_000 //} ); //AddRFDevice( new RFDevice //{ // Id = -42, // DeviceSource = DeviceSource.User, // Latitude = 47.666100, // Longitude = 9.172648, // AntennaType = AntennaType.OmniDirectional, // RxTxType = RxTxTypes.IdealSDR, // CenterFrequency_Hz = 90_000_000, // Bandwidth_Hz = 30_000 //} ); //CreateHeatmap(); //CreateExampleRFDevices(); //CreateRandomizedRFDevices(42); //OpenDeviceEditDialog(RFDevice.DUMMY); //----------------------------------------------------------------- RFDevice receiver = RFDevice.CreateDummy(); receiver.Id = -42; receiver.Longitude = 9.386941 + 0.1; receiver.Yaw = 45; AddRFDevice(receiver); RFDevice refdevice = RFDevice.CreateDummy(); refdevice.Id = 0; refdevice.Longitude = 9.386941 + 0.2; refdevice.Yaw = 45; AddRFDevice(refdevice); RFDevice sender = RFDevice.CreateDummy(); sender.Id = 42; sender.Longitude = 9.386941 + 0.3; sender.Yaw = 45; AddRFDevice(sender); //----------------------------------------------------------------- //SaveFile( @"D:\BigData\GitHub\SIGENCE-Scenario-Tool\Examples\TestScenario.stf" ); //LoadFile(@"D:\EigeneDateien\Entwicklung.GitHub\SIGENCE-Scenario-Tool\Examples\TestScenario.stf"); //SaveFile( @"C:\Transfer\TestScenario.stf" ); //LoadFile( @"C:\Transfer\TestScenario.stf" ); //Reset(); //LoadFile(@"D:\EigeneDateien\Entwicklung.GitHub\SIGENCE-Scenario-Tool\Examples\TestWrongAntennaType.stf"); //LoadFile(@"D:\EigeneDateien\Entwicklung.GitHub\SIGENCE-Scenario-Tool\Examples\LongLineForSimulationPlayer.stf"); //----------------------------------------------------------------- //RFDeviceList devicelist = GetDeviceList(); //ExportRFDevices( devicelist, new FileInfo( @"D:\EigeneDateien\Entwicklung.GitHub\SIGENCE-Scenario-Tool\Examples\TestScenario.csv" ) ); //ExportRFDevices( devicelist, new FileInfo( @"D:\EigeneDateien\Entwicklung.GitHub\SIGENCE-Scenario-Tool\Examples\TestScenario.xml" ) ); //ExportRFDevices( devicelist, new FileInfo( @"D:\EigeneDateien\Entwicklung.GitHub\SIGENCE-Scenario-Tool\Examples\TestScenario.json" ) ); //ExportRFDevices( devicelist, new FileInfo( @"D:\EigeneDateien\Entwicklung.GitHub\SIGENCE-Scenario-Tool\Examples\TestScenario.xlsx" ) ); //----------------------------------------------------------------- this.QuickCommands.Add("new"); this.QuickCommands.Add("rand 20"); this.QuickCommands.Add("export csv"); this.QuickCommands.Add("set rxtxtype unknown"); this.QuickCommands.Add("set name nasenbär"); this.QuickCommands.Add("remove"); this.QuickCommands.Add("save"); this.QuickCommands.Add("exit"); //----------------------------------------------------------------- //OpenScenarioSimulationPlayer(); //----------------------------------------------------------------- //InitMetaInformation(); //this.tiEditDescription.IsSelected = true; //this.tiMetaInformation.IsSelected = true; //UpdateScenarioDescriptionMarkdown(); ////string strMarkdown = $"{Tool.StartupPath}\\ExampleScenarioDescription.md"; //this.MetaInformation.Version = "1.0"; //this.MetaInformation.ApplicationContext = "Scenario Meta Information Test"; //this.MetaInformation.ContactPerson = "Jörg Lanser"; ////this.MetaInformation.Description = File.ReadAllText($"{Tool.StartupPath}\\ExampleScenarioDescription.md"); ////this.MetaInformation.Stylesheet = "h1 { border: 1px solid red; }"; //this.MetaInformation.SetDescriptionAndStylesheet(File.ReadAllText($"{Tool.StartupPath}\\ExampleScenarioDescription.md"), "h1 { border: 1px solid red; }"); ////this.MetaInformation.Attachements.Add(new Attachement(new FileInfo($"{Tool.StartupPath}\\ExampleScenarioDescription.md"), AttachementType.Embedded)); ////this.MetaInformation.Attachements.Add(new Attachement(new FileInfo($"{Tool.StartupPath}\\HelloWorld.py"), AttachementType.Embedded)); ////this.MetaInformation.Attachements.Add(new Attachement(new FileInfo($"{Tool.StartupPath}\\CheatSheet.pdf"), AttachementType.Link)); ////this.MetaInformation.Attachements.Add(new Attachement(new FileInfo($"{Tool.StartupPath}\\CheatSheet.xps"), AttachementType.Link)); ////this.MetaInformation.Attachements.Add(new Attachement(new FileInfo($"{Tool.StartupPath}\\streets_bw.sqlite"), AttachementType.Link)); //this.tecDescription.Text = this.MetaInformation.Description; //this.tecStyleSheet.Text = this.MetaInformation.Stylesheet; //this.tiMetaInformation.IsSelected = true; //----------------------------------------------------------------- //RFDevice device = new RFDevice().WithId(0).WithName("Hello").WithStartTime(5); //MB.Information(device.ToXml().ToString()); #else this.mMainMenu.Items.Remove(this.miTest); //this.tcTabControl.Items.Remove(this.tiGeoNodes); //this.tcTabControl.Items.Remove(this.tiMetaInformation); #endif }
/// <summary> /// Initializes a new instance of the <see cref="RFDeviceTemplate"/> class. /// </summary> /// <param name="device">The device.</param> /// <remarks>Copy only the important properties for an template to this new instance.</remarks> public RFDeviceTemplate(RFDevice device) { this.device = device.Clone(); }