Ejemplo n.º 1
0
 private void StreamPositionDecremented(object sender, PositionChangedEventArgs e)
 {
     if (PositionDecremented != null)
     {
         PositionDecremented(this, e);
     }
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    private void Update()
    {
        var currentPositon = transform.position.ToVector2();

        if (Math.Abs(_previousPosition.x - currentPositon.x) > 0.01f || Math.Abs(_previousPosition.y - currentPositon.y) > 0.01f)
        {
            _detectingMovement = true;
            var e = new PositionChangedEventArgs {NewPosition = currentPositon, PreviousPosition = _previousPosition};
            if (Math.Abs(_previousPosition.x - currentPositon.x) > ComparisonTolerance && X_PositionChanged != null)
            {
                X_PositionChanged(this, e);
            }
            if (Math.Abs(_previousPosition.y - currentPositon.y) > ComparisonTolerance && Y_PositionChanged != null)
            {
                Y_PositionChanged(this, e);
            }
            if (PositionChanged != null) PositionChanged(this, e);
        }
        else if(_detectingMovement)
        {
            _detectingMovement = false;
            if (MovementStopped != null) MovementStopped(this, EventArgs.Empty);
        }
        _previousPosition = currentPositon;
    }
 private void GroundMoverOnPositionChanged(object sender, PositionChangedEventArgs e)
 {
     if (_subscribedCollider != null)
     {
         if (_subscribedCollider.IsExplosive) OnMovingExplosiveObject();
         else OnMovingNonExplosiveObject();
     }
 }
		private void OutlookBar_ItemPositionChanged(object sender, PositionChangedEventArgs e)
		{
			if (Convert.ToBoolean(this.PositionChangedEventSubscription))
			{
				string header = this.GetHeader(e.OriginalSource);
				string message = String.Format("{0}'s position: {1}", header, e.NewPosition.ToString());
				this.WriteToLog(message);
			}
		}
		private void OutlookBar_ItemPositionChanged(object sender, PositionChangedEventArgs e)
		{
			RadOutlookBarItem obItem = e.OriginalSource as RadOutlookBarItem;
			string header = obItem.Header.ToString();
			string newPosition = e.NewPosition.ToString();
			string oldPosition = e.OldPosition.ToString();

			LogItem logItem = new LogItem(header, newPosition, oldPosition, DateTime.Now.TimeOfDay);
			Dispatcher.BeginInvoke(new Action<LogItem>(AddLogItem), logItem);
		}
Ejemplo n.º 6
0
        private void OnGeolocatorPositionChanged(Geolocator sender, PositionChangedEventArgs e)
        {
#if WIN80
            var coordinate = e.Position.Coordinate;
            _lastKnownPosition = new Location(coordinate.Latitude, coordinate.Longitude, coordinate.Altitude ?? 0d);
#else
            var position = e.Position.Coordinate.Point.Position;
            _lastKnownPosition = new Location(position.Latitude, position.Longitude, position.Altitude);
#endif

            RaiseLocationChanged();
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Event handler for PositionChanged events. It is raised when
 /// a location is available for the tracking session specified.
 /// </summary>
 /// <param name="sender">Geolocator instance</param>
 /// <param name="e">Position data</param>
 async private void OnPositionChanged(Geolocator sender, PositionChangedEventArgs e)
 {
     await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         if (e.Position == null)
         {
             ShowStatus("No Data");
         }
         else
         {
             CurrentPosition = e.Position.Coordinate;
         }
     });
 }
Ejemplo n.º 8
0
 private void Carousel_PositionChanged(object sender, PositionChangedEventArgs e)
 {
     if (Carousel.Position > position)
     {
         currentMonth    = currentMonth.AddMonths(1);
         monthTitle.Text = currentMonth.ToString("MMMM yyyy");
     }
     else if (Carousel.Position < position)
     {
         currentMonth    = currentMonth.AddMonths(-1);
         monthTitle.Text = currentMonth.ToString("MMMM yyyy");
     }
     position = Carousel.Position;
 }
Ejemplo n.º 9
0
        private void OnPositionChanged(PositionChangedEventArgs eventArgs)
        {
            if (eventArgs.Position.IsClosedPosition)
            {
                Position.SyncWithAnotherPosition(eventArgs.Position);
                UnsubscribeTradingEvents();
            }

            PositionChanged?.Invoke(this, eventArgs);
            if (eventArgs.Position.IsClosedPosition)
            {
                PositionChanged = null;
            }
        }
Ejemplo n.º 10
0
        private async void GeolocatorOnPositionChanged(Geolocator sender, PositionChangedEventArgs args)
        {
            if (args == null)
            {
                return;
            }

            CurrentPosition = args.Position;

            await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                PositionChanged?.Invoke(this, CurrentPosition);
            });
        }
Ejemplo n.º 11
0
 void geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
 {
     Dispatcher.BeginInvoke(() =>
     {
         mapacentral.Center = new GeoCoordinate(args.Position.Coordinate.Latitude, args.Position.Coordinate.Longitude);
         centrox            = args.Position.Coordinate.Latitude;
         centroy            = args.Position.Coordinate.Longitude;
         pinchosmapa();
         ReverseGeocodeQuery query = new ReverseGeocodeQuery();
         query.GeoCoordinate       = new GeoCoordinate(args.Position.Coordinate.Latitude, args.Position.Coordinate.Longitude);
         query.QueryCompleted     += ReverseGeocodeQuery_QueryCompleted;
         query.QueryAsync();
     });
 }
Ejemplo n.º 12
0
        /// <summary>
        /// Handles the PositionChanged event of the Media control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="PositionChangedEventArgs"/> instance containing the event data.</param>
        private void OnMediaPositionChanged(object sender, PositionChangedEventArgs e)
        {
            var media = sender as MediaElement;

            if (!media.IsSeekable)
            {
                ViewModel.PlaybackProgress = 0;
                return;
            }

            ViewModel.PlaybackProgress = media.NaturalDuration.HasValue
                ? (double)e.Position.Ticks / media.NaturalDuration.Value.Ticks
                : 1;
        }
Ejemplo n.º 13
0
        void AudioPlayer_PositionChanged(object sender, PositionChangedEventArgs e)
        {
            var word = this.Document.GetSyncable <SyncableWord>(e.CurrentPosition);

            if (word != null)
            {
                word.SetIsCurrent(true);

                if (word.Sentence != null)
                {
                    word.Sentence.SetIsCurrent(true);
                }
            }
        }
Ejemplo n.º 14
0
        // if the users location changes
        private async void Geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
        {
            if (args == null)
            {
                return;
            }

            CurrentPosition = args.Position;

            // update changed locations
            await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                PositionChanged?.Invoke(this, CurrentPosition);
            });
        }
Ejemplo n.º 15
0
        void OnGeolocatorPositionChanged(Geolocator sender, PositionChangedEventArgs args)
        {
            BasicGeoposition coordinate = args.Position.Coordinate.Point.Position;

            Device.BeginInvokeOnMainThread(() =>
            {
                EventHandler <GeographicLocation> handler = LocationChanged;

                if (handler != null)
                {
                    handler(this, new GeographicLocation(coordinate.Latitude,
                                                         coordinate.Longitude));
                }
            });
        }
Ejemplo n.º 16
0
 private async void Geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
 {
     try
     {
         await CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, delegate
         {
             if (Map == null || UserLocation == null)
             {
                 return;
             }
             UserLocation.Location = args.Position.Coordinate.Point;
         });
     }
     catch { }
 }
Ejemplo n.º 17
0
        private async void OnPositionChanged(Geolocator sender, PositionChangedEventArgs args)
        {
#if NETFX_CORE
            await this.Dispatcher.RunAsync(
                CoreDispatcherPriority.Normal,
                async () =>
#endif
#if WINDOWS_PHONE
            this.Dispatcher.BeginInvoke(
                async () =>
#endif
            {
                await this.RefreshData();
            });
        }
Ejemplo n.º 18
0
 private void Geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
 {
     var _ = Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() =>
     {
         if (args.Position.Coordinate.Accuracy < 55)
         {
             var item = new SimpleGeoData
             {
                 Position = args.Position.Coordinate.Point.Position
             };
             App.userLocData.Add(item);
             await LocationDataStore.InsertLocationDataAsync(item);
         }
     });
 }
Ejemplo n.º 19
0
 protected virtual void positionChanged(object locator, PositionChangedEventArgs args)
 {
     lock (lockObject)
     {
         if (state == CounterState.Counting)
         {
             if (args.Position == targetPosition ||
                 (args.Direction == MoveDirection.Forward && args.Position > targetPosition) ||
                 (args.Direction == MoveDirection.Backward && args.Position < targetPosition))
             {
                 onTargetReached();
             }
         }
     }
 }
Ejemplo n.º 20
0
        //PLACEHOLDER 3 : PAGE EVENTS

        private void PageChanged(object sender, PositionChangedEventArgs e)
        {
            //Set all buttons opacity to 0.5 but the selected one, which we set to 1
            for (int i = 0; i < dotLayout.Dots.Length; i++)
            {
                if (e.CurrentPosition == i)
                {
                    dotLayout.Dots[i].Opacity = 1;
                }
                else
                {
                    dotLayout.Dots[i].Opacity = 0.5;
                }
            }
        }
Ejemplo n.º 21
0
        async void geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
        {
            //  this.map.Center = new GeoCoordinate(args.Position.Coordinate.Latitude, args.Position.Coordinate.Longitude);

            lat = args.Position.Coordinate.Latitude;
            lon = args.Position.Coordinate.Longitude;
            if (App.client != null)
            {
                App.client.latitude  = lat;
                App.client.longitude = lon;
                Dictionary <string, string> dict2 = new Dictionary <string, string>();
                dict2.Add("personStr", JsonConvert.SerializeObject(App.client));
                await App.serviceClient.InvokeApiAsync("updateLocation", System.Net.Http.HttpMethod.Get, dict2);
            }
        }
Ejemplo n.º 22
0
        private async void Geolocator_PositionChanged(Geolocator g, PositionChangedEventArgs e)
        {
            await mDispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                if (m_youAreHerePin == null)
                {
                    m_youAreHerePin = new Pushpin();
                    map.Children.Add(m_youAreHerePin);
                }

                Location location = new Location(e.Position.Coordinate.Latitude,
                                                 e.Position.Coordinate.Longitude);
                MapLayer.SetPosition(m_youAreHerePin, location);
            });
        }
Ejemplo n.º 23
0
        /// <summary>
        /// Event Handler for change in Car position
        /// </summary>
        /// <param name="sender"> Object which indicates where the event occured </param>
        /// <param name="e"> An object that contains information about the event </param>
        void CarGeolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
        {
            //CarGeoposition.Coordinate = args.Position.Coordinate; not valid, done already
            // update GUI
            DrawCarPushPin(args);
            Geopoint CarGeopoint = new Geopoint(new BasicGeoposition()
            {
                Latitude  = args.Position.Coordinate.Latitude,
                Longitude = args.Position.Coordinate.Longitude
            });

            //MainSettings.AddOrUpdateValue("CarLocationKeyName", test);
            MainSettings.AddOrUpdateValue("CarLocationLatitudeKeyName", CarGeopoint.Position.Latitude);
            MainSettings.AddOrUpdateValue("CarLocationLongitudeKeyName", CarGeopoint.Position.Longitude);
        }
        private void Player_OnPositionChange(object sender, PositionChangedEventArgs e)
        {
            BeginInvoke((Action)(() =>
            {
                tbTimeline.Maximum = (int)(this._player.Duration.TotalMilliseconds / 1000);

                int value = (int)(this._player.Position.TotalMilliseconds / 1000);
                if ((value > 0) && (value < tbTimeline.Maximum))
                {
                    tbTimeline.Value = value;
                }

                lbTime.Text = this._player.Position.ToString(@"hh\:mm\:ss") + "/" + this._player.Duration.ToString(@"hh\:mm\:ss");
            }));
        }
Ejemplo n.º 25
0
        private void point_PositionChanged(object sender, PositionChangedEventArgs e)
        {
            if (data == null)
            {
                return;
            }

            var verticalSectionDS = CreateVerticalSection(e.Position.X).AsYDataSource();

            verticalSectionChart.DataSource = new CompositeDataSource(dimensionDataSource, verticalSectionDS);

            var horizontalSectionDS = CreateHorizontalSection(e.Position.Y).AsYDataSource();

            horizontalSectionChart.DataSource = new CompositeDataSource(dimensionDataSource, horizontalSectionDS);
        }
Ejemplo n.º 26
0
 /// <summary>
 /// Gathers a new geopoint and datetime to add to the list of geopoints.
 /// <see cref="CoordinatesInterval"/>
 /// </summary>
 /// <param name="loc">The geolocator</param>
 /// <param name="args">Arguments created by the geolocator, including the geopoint</param>
 public static void OnLocationChanged(Geolocator loc, PositionChangedEventArgs args)
 {
     // check that the singleton has been created
     if (_instance == null)
     {
         GetGeolocator();
     }
     else
     {
         // add a new geocoordinate to the locations list for this run
         _instance._run.LocationsList.Add(
             new Tuple <DateTime, Geopoint>(new DateTime(), args.Position.Coordinate.Point));
         Debug.WriteLine(_instance._run.LocationsList.Count);
     }
 }
Ejemplo n.º 27
0
        private void CarouselPositionChanged(object sender, PositionChangedEventArgs e)
        {
            var carousel = sender as CarouselView;
            var views    = carousel.VisibleViews;

            if (views.Count > 0)
            {
                foreach (var view in views)
                {
                    var img = view.FindByName <Image>("MenuImg");
                    ViewExtensions.CancelAnimations(img);

                    Task.Run(async() => await img.RelRotateTo(300, 5000, Easing.BounceOut));
                }
            }
        }
Ejemplo n.º 28
0
        private async void geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
        {
            geoposition = await geolocator.GetGeopositionAsync();

            Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() =>
            {
                latTbl.Text  = geoposition.Coordinate.Latitude.ToString();
                longTbl.Text = geoposition.Coordinate.Longitude.ToString();

                getLat  = geoposition.Coordinate.Latitude.ToString();
                getLong = geoposition.Coordinate.Longitude.ToString();

                myMap.Center        = geoposition.Coordinate.Point;
                currentPin.Location = geoposition.Coordinate.Point;
            });
        }
Ejemplo n.º 29
0
        private async void OnGeopositionReading(PositionChangedEventArgs args)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                Geoposition geo = args.Position;
                double reading  = geo.Coordinate.Timestamp.Second;
                //tbGeo.Text = String.Format("{0,5:0.00}", reading);
            });

            //await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
            //{
            //    Geoposition geo = await geoTask;
            //    double reading = geo.Coordinate.Timestamp.Second;
            //    tbGeo.Text = String.Format("{0,5:0.00}", reading);
            //});
        }
        private void OnLocationChanged(Geolocator sender, PositionChangedEventArgs args)
        {
            this.CurrentPosition = args.Position;

            if (this.OnPositionChanged != null)
            {
                try
                {
                    this.OnPositionChanged(this.CurrentPosition);
                }
                catch (Exception ex)
                {
                    Logger.Log.Debug(ex.Message);
                }
            }
        }
Ejemplo n.º 31
0
        /// <summary>
        /// This is the event handler for PositionChanged events.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        async private void OnPositionChanged(Geolocator sender, PositionChangedEventArgs e)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                Geoposition position = e.Position;

                var locationFound = new Location
                {
                    Latitude  = position.Coordinate.Latitude,
                    Longitude = position.Coordinate.Longitude
                };

                MapLayer.SetPosition(pin, locationFound);
                map.SetView(locationFound, 15.0f);
            });
        }
Ejemplo n.º 32
0
        private void Geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
        {
            var roundedLat = Math.Round(args.Position.Coordinate.Latitude, 6);
            var roundedLon = Math.Round(args.Position.Coordinate.Longitude, 6);
            var altitude   = args.Position.Coordinate.Altitude;
            var speed      = args.Position.Coordinate.Speed != null && Double.IsNaN((double)args.Position.Coordinate.Speed) ? 0 : args.Position.Coordinate.Speed;

            Debug.WriteLine("{0}, {1} altitude: {2}, speed: {3}", roundedLat, roundedLon, altitude, speed);

            SendMessage(roundedLat.ToString(CultureInfo.InvariantCulture),
                        roundedLon.ToString(CultureInfo.InvariantCulture), altitude, speed);

            Dispatcher.BeginInvoke(() =>
                                   TblockLatLonBlock.Text =
                                       String.Format("{0}, {1} altitude: {2}, speed: {3}", roundedLat, roundedLon, altitude, speed));
        }
Ejemplo n.º 33
0
        private void signatureTypeDdList_SelectedIndexChanged(object sender, PositionChangedEventArgs e)
        {
            ClearSignaturePanel();

            var index = signatureTypeDdList.SelectedIndex;

            switch (index)
            {
            case 3:
                ShowBiometricSignature();
                break;

            default:
                break;
            }
        }
Ejemplo n.º 34
0
        void OnReadingChanged(Sensor sender, PositionChangedEventArgs args)
        {
            var handler    = changed;
            var coordinate = args.Position != null ? args.Position.Coordinate : null;

            if (coordinate != null)
            {
                if (handler != null)
                {
                    var value = ConvertToPosition(coordinate);
                    var e     = new GpsEventArgs(value);
                    handler.Invoke(this, e);
                }

                position = coordinate;
            }
        }
Ejemplo n.º 35
0
        public static void GeolocatorPositionChanged(Geolocator sender, PositionChangedEventArgs args, bool isGlobalInitialization = true)
        {
            Debug.WriteLine(DateTime.Now.ToLongTimeString() + " - Executing Global PositionChanged event");

            GeoCoordinate pos = RefineLocation(args.Position.Coordinate.ToGeoCoordinate());

            Debug.WriteLine("    " + DateTime.Now.ToLongTimeString() + " - Refining Location completed");
#if DEBUG
            if (pos == null)
            {
                Debug.WriteLine("    " + DateTime.Now.ToLongTimeString() + " - Location Rejected");
            }
#endif
            if (pos == null)
            {
                return;
            }

            //if (IsGlobalInitialization)
            //{
            //    //TODO: Commented as WP8 is not allowing to modify ReportInterval on the fly
            //    App.geolocator.PositionChanged -= Geolocator_PositionChanged;
            //    App.geolocator.ReportInterval = Algorithms.ReportIntervalCalculator.NextReportInterval(pos.Speed);
            //    App.geolocator.PositionChanged += Geolocator_PositionChanged;
            //}

            var currentLocation = pos.ToGeoLocation();

            if (CurrentProfile.IsTrackingOn || CurrentProfile.IsSOSOn)
            {
                RecentLocation.Coordinate   = pos;
                RecentLocation.CapturedTime = DateTime.Now;

                //Capture Locally
                TagList.Add(currentLocation);

                //Update Server
                if (IsRegisteredUser)
                {
                    //Note last updated time posted to server. If there are multiple previous posts, send them to server when connection is available
                    PostMyLocationWrapperAsync(pos);
                }

                ActiveToastNotifications();
            }
        }
Ejemplo n.º 36
0
 //handler для геолокатора на изменение позиции
 private void MyGeolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
 {
     if (!App.RunningInBackground)
     {
         Dispatcher.BeginInvoke(() =>
         {
             currentLatitude  = args.Position.Coordinate.Latitude;
             currentLongitude = args.Position.Coordinate.Longitude;
             drawPoint("current", currentLatitude, currentLongitude);
             checkDistance(currentLatitude, currentLongitude);
         });
     }
     else
     {
         checkDistance(args.Position.Coordinate.Latitude, args.Position.Coordinate.Longitude);
     }
 }
Ejemplo n.º 37
0
		protected override void OnPoint_PositionChanged(object sender, PositionChangedEventArgs e)
		{
			DraggablePoint marker = (DraggablePoint)sender;

			// adjusting position to fit inside allowed region
			var region = AllowedRegion;
			var position = e.Position;
			if (position.X < region.XMin)
				position.X = region.XMin;
			if (position.Y < region.YMin)
				position.Y = region.YMin;
			if (position.X > region.XMax)
				position.X = region.XMax;
			if (position.Y > region.YMax)
				position.Y = region.YMax;

			marker.Position = position;

			var index = MarkerChartBase.GetIndex(marker);
			if (0 <= index && index < Points.Count && !ProtectedPoints.Changing)
			{
				Points[index] = position;
			}
		}
Ejemplo n.º 38
0
 private void LangSelection_Changed(object sender,
     PositionChangedEventArgs e)
 {
     Program.Lang = LangDropDownList.SelectedItem.Text.Contains("ru")
         ? string.Empty
         : LangDropDownList.SelectedItem.Tag.ToString();
     Thread.CurrentThread.CurrentUICulture = new CultureInfo(Program.Lang);
     if (!_loadedlang) return;
     RadMessageBox.Show(LocRm.GetString("lang.changemessage"), "Language changed", MessageBoxButtons.OK,
         RadMessageIcon.Info);
     Logging.Warning(LocRm.GetString("lang.changemessage"));
 }
Ejemplo n.º 39
0
 private void SelectProfile_SelectedIndexChanged(object sender,
     PositionChangedEventArgs e)
 {
     try
     {
         GetSelectedVersion(SelectProfile.SelectedItem.Text);
         var json = JObject.Parse(File.ReadAllText(Variables.ProfileJsonFile));
         json["selectedProfile"] = SelectProfile.SelectedItem.Text;
         File.WriteAllText(Variables.ProfileJsonFile, json.ToString());
     }
     catch
     {
     }
 }
Ejemplo n.º 40
0
 private void XPositionChanged(object sender, PositionChangedEventArgs positionChangedEventArgs)
 {
     if (!_spawnSparklesRunning)
     {
         StartCoroutine(SpawnSparkles());
     }
 }
 private void NicknameDropDownList_SelectedIndexChanged(object sender, PositionChangedEventArgs e)
 {
     if (NicknameDropDownList.SelectedItem == null) {
         return;
     }
     _userManager.SelectedUsername = NicknameDropDownList.SelectedItem.Text;
     _selectedUser = _userManager.Accounts[NicknameDropDownList.SelectedItem.Text];
     SaveUsers();
 }
 private void profilesDropDownBox_SelectedIndexChanged(object sender,
     PositionChangedEventArgs e)
 {
     if (profilesDropDownBox.SelectedItem == null) {
         return;
     }
     _profileManager.LastUsedProfile = profilesDropDownBox.SelectedItem.Text;
     _selectedProfile = _profileManager.Profiles[profilesDropDownBox.SelectedItem.Text];
     string path = Path.Combine(_applicationContext.McVersions,
         _selectedProfile.SelectedVersion ?? GetLatestVersion(_selectedProfile) + "\\");
     string state = _applicationContext.ProgramLocalization.ReadyToLaunch;
     if (!File.Exists(string.Format("{0}/{1}.json", path, _selectedProfile.SelectedVersion ??
                                                          GetLatestVersion(_selectedProfile)))) {
         state = _applicationContext.ProgramLocalization.ReadyToDownload;
     }
     SelectedVersion.Text = string.Format(state, (_selectedProfile.SelectedVersion ??
                                                  GetLatestVersion(_selectedProfile)));
 }
Ejemplo n.º 43
0
 private void UsersListControl_SelectedIndexChanged(object sender,
     PositionChangedEventArgs e)
 {
     DeleteUserButton.Enabled = UsersListControl.SelectedItem != null;
 }
Ejemplo n.º 44
0
 private void OnPositionChanged(object sender, PositionChangedEventArgs e)
 {
     this.OnPositionChanged(e.Position);
 }
Ejemplo n.º 45
0
        //用户组选择更改
        /// <summary>
        /// 用户组选择更改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ddlUserGroup_SelectedIndexChanged(object sender, PositionChangedEventArgs e)
        {
            CurrentOperationStatus = OperationStatus.Default;

            QueryData();
        }
Ejemplo n.º 46
0
 //Смена типа линии
 //------------ События списков ---------------
 private void radDropDownListType_SelectedIndexChanged(object sender, PositionChangedEventArgs e)
 {
     switch (radDropDownListType.SelectedIndex)
     {
         case 0: Packet.type = 32767;
             break;
         case 1: Packet.type = 1;
             break;
         case 2: Packet.type = 9090;
             break;
         case 3: Packet.type = -1;
             break;
         default: Packet.type = -1;
             break;
     }
 }
Ejemplo n.º 47
0
 //Выбор режима отрисовки
 private void radDropDownListMode_SelectedIndexChanged(object sender, PositionChangedEventArgs e)
 {
     switch (radDropDownListMode.SelectedIndex)
     {
         case 0: Packet.mode = Gl.GL_POINT; break;
         case 1: Packet.mode = Gl.GL_LINE; break;
         case 2: Packet.mode = Gl.GL_FILL; break;
         case 3: Packet.mode = -1; break;
     }
 }
Ejemplo n.º 48
0
		protected virtual void OnPoint_PositionChanged(object sender, PositionChangedEventArgs e)
		{
			FrameworkElement marker = (FrameworkElement)sender;
			var index = MarkerChartBase.GetIndex(marker);

			marker.DataContext = e.Position;

			if (0 <= index && index < points.Count && !points.Changing)
			{
				points[index] = e.Position;
			}
		}
Ejemplo n.º 49
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Called when the position in Libronix changed.
		/// </summary>
		/// <param name="sender">The sender.</param>
		/// <param name="e">The <see cref="T:SIL.Utils.PositionChangedEventArgs"/>
		/// instance containing the event data.</param>
		/// ------------------------------------------------------------------------------------
		private void OnPositionChanged(object sender, PositionChangedEventArgs e)
		{
			if (!TeProjectSettings.ReceiveSyncMessages || m_fIgnoreNextRecvdLibronixSyncMessage ||
				m_fProcessingSyncMessage || m_fIgnoreAnySyncMessages)
			{
				if (m_fProcessingSyncMessage)
					m_queuedReference = new ScrReference(e.BcvRef, ScrVers.English);

				m_fIgnoreNextRecvdLibronixSyncMessage = false;
			}
			else
				ProcessReceivedMessage(new ScrReference(e.BcvRef, ScrVers.English));
		}
Ejemplo n.º 50
0
 private void OnPositionChanged(object sender, PositionChangedEventArgs positionChangedEventArgs)
 {
     this.dispatcher.RaiseEvent(this.positionChangedEvent, this, new PositionChangedEventArgs { Position = this });
 }
        private void LangDropDownList_SelectedIndexChanged(object sender, PositionChangedEventArgs e)
        {
            if (LangDropDownList.SelectedItem.Tag.ToString() == _cfg.SelectedLanguage) {
                return;
            }

            var selectedLocalization = LangDropDownList.SelectedItem.Tag;
            _applicationContext.SetLocalization(LangDropDownList.SelectedIndex == 0
                ? string.Empty
                : selectedLocalization.ToString());

            _cfg.SelectedLanguage = selectedLocalization.ToString();
            AppendLog($"Application language changed to {selectedLocalization}");
            LoadLocalization();
        }
Ejemplo n.º 52
0
 /// <summary>
 /// Handles the position changed event generated by the MIDI clock.
 /// </summary>
 /// <param name="sender">
 /// The MIDI clock responsible for the event.
 /// </param>
 /// <param name="e">
 /// Information about the event.
 /// </param>
 private void PositionChangedHandler(object sender, PositionChangedEventArgs e)
 {
     position = e.Position;
     player.Seek(position);
 }
Ejemplo n.º 53
0
 void CSCoreEngine_PositionChanged(object sender, PositionChangedEventArgs e)
 {
     WriteLine(string.Format("event position {0} {1}", e.NewPosition, e.TrackLength));
 }
		private void outlookBar_ItemPositionChanged(object sender, PositionChangedEventArgs e)
		{

		}
Ejemplo n.º 55
0
Archivo: Map.cs Proyecto: Myvar/Eclang
 private void radListControl1_SelectedIndexChanged(object sender, PositionChangedEventArgs e)
 {
     this.Navigate((int)this.radListControl1.SelectedItem.Tag);
 }