public MainPage() { this.InitializeComponent(); var nics = NetworkInterface.GetAllNetworkInterfaces(); foreach (var nic in nics) { NetworkInterfaceViewModels.Add(new NetworkInterfaceViewModel { Id = nic.Id, MacAddress = nic.GetPhysicalAddress().ToString(), Name = nic.Name, NetworkInterface = nic }); } var view = ApplicationView.GetForCurrentView(); view.Consolidated += View_Consolidated; _filter = new ShadowFilter(App.RandomAppIdGenerator.Next(), "ShadowDriver Demo"); _filter.StartFilterWatcher(); _filter.FilterReady += Filter_FilterReady; _filter.PacketReceived += Filter_PacketReceived; _dispatcherTimer = new DispatcherTimer() { Interval = new TimeSpan(0, 0, 3) }; _dispatcherTimer.Tick += DispatcherTimer_Tick; System.Diagnostics.Debug.WriteLine(string.Format("Filter {0} loaded.", _filter.AppId)); }
public ShadowLightMap(ShadowFilter SpotShadowFilter = ShadowFilter.PCF7x7SOFT, int SpotShadowBufferSize = 1024, DirectionalShadowFilteringType DirectionalFilteringType = DirectionalShadowFilteringType.PCF7x7, int DirectionalShadowMapSize = 512, float CascadeSplitConstant = 0.95f) { this.shadowFilterSpot = SpotShadowFilter; this.shadownBufferSize = SpotShadowBufferSize; this.filteringType = DirectionalFilteringType; this.shadowMapSize = DirectionalShadowMapSize; this.splitConstant = CascadeSplitConstant; }
public ShadowLightMap(ShadowFilter SpotShadowFilter = ShadowFilter.PCF7x7SOFT, int SpotShadowBufferSize = 1024, DirectionalShadowFilteringType DirectionalFilteringType = DirectionalShadowFilteringType.PCF7x7, int DirectionalShadowMapSize = 512, float CascadeSplitConstant = 0.95f) { this.shadowFilterSpot = SpotShadowFilter; this.shadownBufferSize = SpotShadowBufferSize; this.filteringType = DirectionalFilteringType; this.shadowMapSize = DirectionalShadowMapSize; this.splitConstant = CascadeSplitConstant; }
public MainPage() { this.InitializeComponent(); var view = ApplicationView.GetForCurrentView(); view.Consolidated += View_Consolidated; _filter = new ShadowFilter(App.RandomAppIdGenerator.Next(), App.AppName); _filter.FilterReady += Filter_FilterReady; _filter.PacketReceived += Filter_PacketReceived; }
public MainWindow() { this.InitializeComponent(); var nics = NetworkInterface.GetAllNetworkInterfaces(); foreach (var nic in nics) { NetworkInterfaceViewModels.Add(new NetworkInterfaceViewModel { Id = nic.Id, MacAddress = nic.GetPhysicalAddress().ToString(), Name = nic.Name, NetworkInterface = nic }); } _filter = new ShadowFilter(App.RandomAppIdGenerator.Next(), "ShadowDriverWPFDemo"); _filter.FilterReady += Filter_FilterReady; _filter.StartFilterWatcher(); _filter.PacketReceived += Filter_PacketReceived; _dispatcherTimer = new DispatcherTimer() { Interval = new TimeSpan(0, 0, 3) }; _dispatcherTimer.Tick += DispatcherTimer_Tick; MacAddressBox.ItemsSource = NetworkInterfaceViewModels; LayerBox.ItemsSource = Layers; PacketsView.ItemsSource = NetPacketViewModels; DirectionBox.ItemsSource = Directions; MatchTypeBox.ItemsSource = MatchTypes; LocationBox.ItemsSource = Locations; System.Diagnostics.Debug.WriteLine(string.Format("Filter {0} loaded.", _filter.AppId)); }