public SearchScreen(AssemblyBrowserWindowViewModel windowViewModel)
            : base(windowViewModel)
        {
            InitializeSearchTimer();

            NavigateToHomePageCommand = new DelegateCommand(() => Process.Start(HomePageUri));

            InitializeSearchControl();
        }
        public TypeViewModel(TypeDefinition typeDefinition, AssemblyBrowserWindowViewModel windowViewModel)
        {
            _typeDefinition = typeDefinition;
            _windowViewModel = windowViewModel;

            _name = MainWindow.Instance.CurrentLanguage.FormatTypeName(typeDefinition);
            _fullName = GetFullName(_typeDefinition.Namespace, _name);
            _extendedInfo = IsInternal
                                ? string.Format("{0}\nInternal", FullName)
                                : FullName;

            if (HasBaseType)
            {
                var baseType = _typeDefinition.BaseType.Resolve();

                _baseTypeName = baseType != null ? MainWindow.Instance.CurrentLanguage
                    .FormatTypeName(baseType) : _typeDefinition.BaseType.Name;
                _baseTypeFullName = GetFullName(_typeDefinition.BaseType.Namespace, BaseTypeName);
                if (baseType == null)
                {
                    _baseTypeFullName = _baseTypeFullName + "\nNot available";
                    _isBaseTypeAvailable = false;
                }
            }

            var properties = typeDefinition.Properties
                .Where(p => p.GetMethod != null && p.GetMethod.IsPublic
                            || p.SetMethod != null && p.SetMethod.IsPublic)
                .Select(p => new PropertyViewModel(p))
                .OfType<MemberViewModel>();

            var events = typeDefinition.Events
                .Where(e => e.AddMethod.IsPublic)
                .Select(e => new EventViewModel(e))
                .OfType<MemberViewModel>();

            var methods = typeDefinition.Methods
                .Where(m => m.IsPublic && !m.IsGetter && !m.IsSetter && !m.IsAddOn && !m.IsRemoveOn)
                .Select(m => new MethodViewModel(m))
                .OfType<MemberViewModel>();

            Members = properties.Concat(events).Concat(methods);
            _membersCount = Members.Count();

            VisualizeCommand = new DelegateCommand(VisualizeCommandHandler);
            NavigateCommand = new DelegateCommand(NavigateCommandHandler);
            NavigateToBaseCommand = new DelegateCommand(NavigateToBaseCommandHandler);
            ShowMembersCommand = new DelegateCommand(ShowMembersCommandHandler);
            BrowseAncestryCommand = new DelegateCommand(BrowseAncestryCommandHandler);

            RefreshBackground();
        }
        public AssemblyBrowserWindow(IEnumerable<AssemblyDefinition> assemblyDefinitions)
        {
            InitializeComponent();

            ViewModel = new AssemblyBrowserWindowViewModel(assemblyDefinitions, Dispatcher);

            WindowManager.AddAssemblyBrowser(this);

            CommandBindings.Add(new CommandBinding(NavigationCommands.BrowseForward,
                                                   (s, e) => ViewModel.NavigateForwardCommand.Execute(null)));
            CommandBindings.Add(new CommandBinding(NavigationCommands.BrowseBack,
                                                   (s, e) => ViewModel.NavigateBackCommand.Execute(null)));
        }
        public GraphScreen(AssemblyBrowserWindowViewModel windowViewModel)
            : base(windowViewModel)
        {
            PinCommand = new DelegateCommand(PinCommandHandler);
            HideSearchCommand = new DelegateCommand(HideSearchCommandHandler);
            ShowSearchCommand = new DelegateCommand(ShowSearchCommandHandler);

            _toggleColorizeUserCommand = new UserCommand(WindowViewModel.IsColorized
                                                         	? DecolorizeCaption
                                                         	: ColorizeCaption, ToggleColorizeCommandHandler);

            Commands = new ObservableCollection<UserCommand>
                       	{
                       		new UserCommand("Fill Graph", OnFillGraphRequest),
                       		new UserCommand("Original Size", OnOriginalSizeRequest),
                       		WindowViewModel.ShowSearchUserCommand,
                       		new UserCommand("Search in Graph", ShowSearchCommand),
                       		_toggleColorizeUserCommand
                       	};
        }
 public Screen(AssemblyBrowserWindowViewModel windowViewModel)
 {
     WindowViewModel = windowViewModel;
 }