void OnZoneCreated( object sender, ZoneEventArgs e ) { //TODO var vmz = Context.Obtain( e.Zone ); if( e.Zone.Name == "Prediction" ) Zones.Insert( 0, vmz ); else Zones.Add( vmz ); }
void OnZoneDestroyed( object sender, ZoneEventArgs e ) { var zone = Context.Obtain( e.Zone ); if( zone != null ) { foreach( var k in e.Zone.Keys ) { var mk = Context.Obtain( k ); Keys.Remove( mk ); Context.OnModelDestroy( k ); } Zones.Remove( zone ); Context.OnModelDestroy( e.Zone ); OnTriggerZoneDestroyed(); } }
void OnZoneCreated( object sender, ZoneEventArgs e ) { Context.SkinDispatcher.Invoke( (Action)( () => { Zones.Add( Context.Obtain( e.Zone ) ); } ) ); }
void OnZoneDestroyed( object sender, ZoneEventArgs e ) { foreach( var k in e.Zone.Keys ) { var mk = Context.Obtain( k ); Context.SkinDispatcher.Invoke( (Action)( () => { Keys.Remove( mk ); } ) ); Context.OnModelDestroy( k ); } Context.SkinDispatcher.Invoke( (Action)( () => { Zones.Remove( Context.Obtain( e.Zone ) ); } ) ); Context.OnModelDestroy( e.Zone ); }
void OnAutonomousZoneCreated( object sender, ZoneEventArgs e ) { DestroySendKey(); CreateSendKeyInSendZone( e.Zone.Keyboard ); }
void OnZoneMoved( object sender, ZoneEventArgs e ) { VMZoneEditable zoneVM = Zones.Where( z => z.Model == e.Zone ).Single(); zoneVM.IndexChanged(); ObservableCollection<VMZoneEditable> temp = new ObservableCollection<VMZoneEditable>(); foreach( var item in Zones.OrderBy<VMZoneEditable, int>( z => z.Index ).ToList() ) { temp.Add( item ); } Zones.Clear(); Zones = temp; OnPropertyChanged( "Zones" ); }
void OnZoneDestroyed( object sender, ZoneEventArgs e ) { if( e.Zone.Name == Feature.PredictionContextFactory.PredictionZoneName ) { DestroySendContextKey(); } }
void OnZoneCreated( object sender, ZoneEventArgs e ) { CreateSendContextKeyInPredictionZone( e.Zone ); }
void OnZoneMoved( object sender, ZoneEventArgs e ) { Debug.Assert( Dispatcher.CurrentDispatcher == Context.NoFocusManager.ExternalDispatcher, "This method should only be called by the ExternalThread." ); VMZoneSimple zoneVM = Zones.Where( z => z.Name == e.Zone.Name ).Single(); ObservableCollection<VMZoneSimple> temp = new ObservableCollection<VMZoneSimple>(); foreach( var item in Zones.OrderBy<VMZoneSimple, int>( z => z.Index ).ToList() ) { temp.Add( item ); } Zones.Clear(); Context.NoFocusManager.NoFocusDispatcher.BeginInvoke( (Action)(() => { Zones = temp; OnPropertyChanged( "Zones" ); }) ); }
void OnZoneDestroyed( object sender, ZoneEventArgs e ) { Debug.Assert( Dispatcher.CurrentDispatcher == Context.NoFocusManager.ExternalDispatcher, "This method should only be called by the ExternalThread." ); foreach( var k in e.Zone.Keys ) { var mk = Context.Obtain( k ); Context.NoFocusManager.NoFocusDispatcher.Invoke( (Action)(() => { Keys.Remove( mk ); }) ); Context.OnModelDestroy( k ); } Context.NoFocusManager.NoFocusDispatcher.Invoke( (Action)(() => { Zones.Remove( Context.Obtain( e.Zone ) ); }) ); Context.OnModelDestroy( e.Zone ); }
void OnZoneCreated( object sender, ZoneEventArgs e ) { Debug.Assert( Dispatcher.CurrentDispatcher == Context.NoFocusManager.ExternalDispatcher, "This method should only be called by the ExternalThread." ); var zvm = Context.Obtain( e.Zone ); Context.NoFocusManager.NoFocusDispatcher.Invoke( (Action)(() => { Zones.Add( zvm ); }) ); }