Ejemplo n.º 1
0
 public void StopError(String Error)
 {
     this.ErrorLocation = CurrentTokenLocation;
     this.IsDone        = false;
     this.Error         = true;
     this.ErrorMessage  = Error;
 }
Ejemplo n.º 2
0
        public void Save()
        {
            bool needSave = false;

            if (SortMainId > 0)
            {
                var o = SortMainObject.GetSortMain(SortMainId).OpenNetData;

                if (o == null)
                {
                    o = new OpenNetObject(SortMainId);
                }

                if (o.SortMainId != SortMainId)
                {
                    o.SortMainId = SortMainId;
                }

                if (AccessNumber?.Trim() != o.AccessNumber)
                {
                    o.AccessNumber = AccessNumber?.Trim();
                    needSave       = true;
                }

                if (DocLocation?.Trim() != o.DocLocation)
                {
                    o.DocLocation = DocLocation?.Trim();
                    needSave      = true;
                }

                if (FieldOfficeAym?.Trim() != o.FieldOfficeAym)
                {
                    o.FieldOfficeAym = FieldOfficeAym?.Trim();
                    needSave         = true;
                }

                if (DeclassificationStatus != o.DeclassificationStatus)
                {
                    o.DeclassificationStatus = DeclassificationStatus;
                    needSave = true;
                }

                if (DeclassificationDate != o.DeclassificationDate)
                {
                    o.DeclassificationDate = DeclassificationDate;
                    needSave = true;
                }

                if (Keywords?.Trim() != o.Keywords)
                {
                    o.Keywords = Keywords?.Trim();
                    needSave   = true;
                }

                if (needSave)
                {
                    o.Save();
                }
            }
        }
Ejemplo n.º 3
0
 public Label(DocLocation loc, string labelName, string description, ParserInformation parent)
 {
     LabelName   = labelName;
     Location    = loc;
     Description = description;
     Parent      = parent;
 }
Ejemplo n.º 4
0
 public Equate(DocLocation loc, string labelName, string value, string description, ParserInformation parent)
 {
     LabelName   = labelName;
     Location    = loc;
     Description = description;
     Parent      = parent;
     Value       = value;
 }
Ejemplo n.º 5
0
 public Define(DocLocation loc, string macroName, string contents, string description, ParserInformation parent, int value)
 {
     Location    = loc;
     Name        = macroName;
     Contents    = contents;
     Description = description;
     Parent      = parent;
     Value       = value;
 }
Ejemplo n.º 6
0
        /* Adjust Doctor Location on the Map */
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.navigationHelper.OnNavigatedTo(e);

            var locator = new Geolocator();

            locator.DesiredAccuracyInMeters = 50;

            var position = await locator.GetGeopositionAsync();

            var docPosition = new BasicGeoposition();

            docPosition.Latitude  = db.getDoctorInfo(GetDoctor().doctor_name)[0].latitude;
            docPosition.Longitude = db.getDoctorInfo(GetDoctor().doctor_name)[0].longitude;

            var myPoint = new Geopoint(docPosition);

            if (await DocLocation.TrySetViewAsync(myPoint, 10D))
            {
            }

            DocLocation.ZoomLevel = 16;

            var gl = new Geolocator()
            {
                DesiredAccuracy = PositionAccuracy.High
            };
            var location = await gl.GetGeopositionAsync(TimeSpan.FromMinutes(5), TimeSpan.FromSeconds(5));

            var pin = new MapIcon()
            {
                Location = myPoint,
                Title    = db.getDoctorInfo(GetDoctor().doctor_name)[0].hospital_name,
                Image    = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Pictures/pin.png")),
                NormalizedAnchorPoint = new Point()
                {
                    X = 0.32, Y = 0.78
                },
            };

            DocLocation.MapElements.Add(pin);
        }
Ejemplo n.º 7
0
 public void SetTokenLocation()
 {
     CurrentTokenLocation = Tcr.Current.Location;
 }