public VirtualZone( ICKReadOnlyList<IHighlightableElement> elements, int start, int length ) { List<IHighlightableElement> children = new List<IHighlightableElement>(); for( int i = start; i < elements.Count && i < length + start; i++ ) { children.Add( elements[i] ); } Children = new CKReadOnlyListOnIList<IHighlightableElement>( children ); }
internal VMLogMethodConfig( VMLogServiceConfig holder, string name, string returnType, List<ILogParameterInfo> parameters, bool isBound ) : base(name, isBound) { _holder = holder; Config = _holder.Config; _returnType = returnType; _parameters = parameters; _parametersEx = new CKReadOnlyListOnIList<ILogParameterInfo>( _parameters ); _dataPath = _holder.Name + "-" + FullSignature; _doLogDataPath = _dataPath + "-MethodDoLog"; _logOptionsDataPath = _dataPath + "-MethodLogOptions"; }
public VMLogEventConfig( VMLogServiceConfig holder, string name, List<ILogParameterInfo> parameters, ServiceLogEventOptions logOptions, bool isBound ) : base(name, isBound) { _holder = holder; Config = _holder.Config; _dataPath = _holder.Name + "-" + Name; _doLogDataPath = _dataPath + "-EventDoLog"; _logOptionsDataPath = _dataPath + "-EventLogOptions"; _parameters = parameters; _parametersEx = new CKReadOnlyListOnIList<ILogParameterInfo>( _parameters ); _doLogErrors = ( ( logOptions & ServiceLogEventOptions.LogErrors ) == ServiceLogEventOptions.LogErrors ); _doLogStartRaise = ( ( logOptions & ServiceLogEventOptions.StartRaise ) == ServiceLogEventOptions.StartRaise ); _doLogParameters = ( ( logOptions & ServiceLogEventOptions.LogParameters ) == ServiceLogEventOptions.LogParameters ); _doLogEndRaise = ( ( logOptions & ServiceLogEventOptions.EndRaise ) == ServiceLogEventOptions.EndRaise ); _doCatchEventWhenServiceStopped = ( ( logOptions & ServiceLogEventOptions.SilentEventRunningStatusError ) == ServiceLogEventOptions.SilentEventRunningStatusError ); _doLogCaughtEventWhenServiceStopped = ( ( logOptions & ServiceLogEventOptions.LogSilentEventRunningStatusError ) == ServiceLogEventOptions.LogSilentEventRunningStatusError ); _doCatchBadEventHandling = ( ( logOptions & ServiceLogEventOptions.SilentEventError ) == ServiceLogEventOptions.SilentEventError ); }
public void SendCommands( object sender, ICKReadOnlyList<string> commands ) { if( _runningCommands == null ) _runningCommands = new Queue<DictionaryEntry>(); bool isRunning = _runningCommands.Count > 0; foreach( string cmd in commands ) _runningCommands.Enqueue( new DictionaryEntry( sender, cmd ) ); if( !isRunning ) { while( _runningCommands.Count > 0 ) { DictionaryEntry e = _runningCommands.Dequeue(); DoSendCommand( e.Key, (string)e.Value ); } } }
internal void OnAvailableModeRemoved( ICKReadOnlyList<IKeyboardMode> modes ) { if( _layouts == null ) _defaultLayout.OnAvailableModeRemoved( modes ); else { foreach( Layout l in _layouts.Values ) { l.OnAvailableModeRemoved( modes ); } } }
public void OnGroupClose( IActivityLogGroup g, ICKReadOnlyList<ActivityLogGroupConclusion> conclusions ) { LoggerContent.Add( new String( '-', g.Depth ) + String.Join( ", ", conclusions.Select( c => c.Text ) ) ); }
public void OpenEditor( string template ) { _viewModel.Template = Template.Load( template, this ); if( _editor != null ) _editor.Close(); _editor = new TemplateEditor( _viewModel ); var list = _viewModel.Template.TextFragments.Where( t => t.IsEditable == true ) .Cast<IHighlightableElement>() .Distinct() .ToList(); //Cancel button list.Add( _viewModel.Cancel ); //Ok Button list.Add( _viewModel.ValidateTemplate ); _children = new CKReadOnlyListOnIList<IHighlightableElement>( list ); Skip = SkippingBehavior.None; _editor.Show(); _editor.Activate(); _editor.Closed += ( o, e ) => { Skip = SkippingBehavior.Skip; }; if( _isHighlightable && Highlighter.Status == InternalRunningStatus.Started ) Highlighter.Service.HighlightImmediately( this ); }
protected virtual IHighlightableElement GetStayOnTheSame( ICKReadOnlyList<IHighlightableElement> elements ) { _actionType = ActionType.Normal; return elements[_currentId]; }
protected virtual IHighlightableElement GetEnterChild( ICKReadOnlyList<IHighlightableElement> elements ) { // if the current element does not have any children ... go to the normal next element if( elements[_currentId].Children.Count == 0 ) return GetNextElement( ActionType.Normal ); // otherwise we just push the element as a parent and set the the first child as the current element _currentElementParents.Push( elements[_currentId] ); int tmpId = _currentId; _currentId = 0; return elements[tmpId].Children[0]; }