/// <summary> /// Constructor creates st with calculated input data from a value object with inputted strings /// </summary> /// <param name="voir">Value object with the inputted data</param> public InputDataChart(VOInputDataRadix voir) { name = voir.name.data; chartType = voir.chartType.data; // handle timezone TimeZoneList tzl = new TimeZoneList(); RpTimeZone[] tz = tzl.theList; string zoneText; double offsetValue = 0; if (voir.specTimezone.filled) { offsetValue = (double)Conversions.TimeText2Double(voir.specTimezone.data); if (voir.specTimezoneDir.data == "-") offsetValue = -offsetValue; zoneText = voir.specTimezone.data; } else { offsetValue = Convert.ToDouble(tz[Convert.ToInt32(voir.timezone.data)].offset); zoneText = Conversions.double2OffsetHms(offsetValue); } this.dateText = voir.date.data; this.timeText = voir.time.data + ". " + ResourceBundle.RB_COM_ZONE + ": " + zoneText + ". " + ResourceBundle.RB_COM_DST + ": " + voir.dst.data + "."; this.dst = Convert.ToDouble(voir.dst.data); this.calendar = Convert.ToInt32(voir.calendar.data); this.location = voir.location.data; string direction = ""; if (voir.geoLongDirection.data == "+") direction = ResourceBundle.RB_COM_LONG_EAST; else direction = ResourceBundle.RB_COM_LONG_WEST; this.longitudeText = voir.geoLongitude.data + " " + direction; this.longitude = Conversions.Coordinates2Degrees(voir.geoLongitude.data, direction); if (voir.geoLatDirection.data == "+") direction = ResourceBundle.RB_COM_LAT_NORTH; else direction = ResourceBundle.RB_COM_LAT_SOUTH; this.latitudeText = voir.geoLatitude.data + " " + direction; this.latitude = Conversions.Coordinates2Degrees(voir.geoLatitude.data, direction); this.coordinatesText = longitudeText + " - " + latitudeText; int[] dateArray = Conversions.DateText2IntArray(voir.date.data); int[] timeArray = Conversions.TimeText2IntArray(voir.time.data); double dstValue = 0; if (voir.dst.filled) { dstValue = Convert.ToDouble(voir.dst.data); } this.sourcedescription = voir.sourceDescription.data; this.sourcetype = voir.sourceType.data; this.remarks = voir.remarks.data; JdBuilder jdb = new JdBuilder(dateArray[0], dateArray[1], dateArray[2], timeArray[0], timeArray[1], timeArray[2], calendar, offsetValue, dstValue); this.jdnr = jdb.jd; }
/// <summary> /// Handle the sending of a message /// </summary> /// <param name="msg">The message to handle</param> /// <returns>True if message was recognized, otherwise false</returns> public Boolean sendMessage(RpMessage msg) { Boolean success = true; int x = msg.id; switch (x) { case Messages.MSG_CANCEL: closeAnyForm(msg.sender, msg.sender); break; case Messages.MSG_NEWCASE: openFrm_Dataradix(msg.sender); break; case Messages.MSG_NEWCASE_COMPLETED: this.status = Messages.MSG_NEWCASE_COMPLETED; VOInputDataRadix voir = frm_Dataradix.voInputDataRadix; InputDataChart idc = new InputDataChart(voir); this._rpCase = new RpCase(config, idc); frm_Dataradix.Close(); openFrmShowchart(msg.sender); break; case Messages.MSG_LOADCASE: // handle // openFrm_Loadcase(msg.sender); break; case Messages.MSG_SAVECASE: // handle; break; case Messages.MSG_SHOWCONFIG: openFrmConfiguration(msg.sender); break; case Messages.MSG_SHOWSETTINGS: openFrmSettings(msg.sender); break; case Messages.MSG_SHOWABOUT: openFrmAbout(msg.sender); break; case Messages.MSG_SHOWHELP: // handle; (obsolete ?) break; case Messages.MSG_CALCCASE: // handle; (obsolete ?) break; case Messages.MSG_SHOWCHART: openFrmShowchart(msg.sender); break; case Messages.MSG_SHOWPOSITIONS: openFrmShowpositions(msg.sender); break; case Messages.MSG_SHOWANALYSIS: // handle; break; case Messages.MSG_SHOWASPECTS: openFrmAnalysisAspects(msg.sender); break; case Messages.MSG_SHOWMIDPOINTS: openFrmAnalysisMidpoints(msg.sender); break; case Messages.MSG_NEWEVENT: // handle; break; case Messages.MSG_CALCEVENT: openFrmDataprog(msg.sender); break; case Messages.MSG_SHOWPROGTRANSITS: // handle; break; case Messages.MSG_SHOWPROGSECUNDARY: // handle; break; default: success = false; break; } return(success); }