public ShellOperation(
     IActionCenter actionCenter,
     IAudio audio,
     INotificationInfo aboutInfo,
     INotificationController aboutController,
     ClientContext context,
     IKeyboard keyboard,
     ILogger logger,
     INotificationInfo logInfo,
     INotificationController logController,
     IPowerSupply powerSupply,
     ISystemInfo systemInfo,
     ITaskbar taskbar,
     ITaskview taskview,
     IText text,
     IUserInterfaceFactory uiFactory,
     IWirelessAdapter wirelessAdapter) : base(context)
 {
     this.aboutInfo       = aboutInfo;
     this.aboutController = aboutController;
     this.actionCenter    = actionCenter;
     this.audio           = audio;
     this.keyboard        = keyboard;
     this.logger          = logger;
     this.logInfo         = logInfo;
     this.logController   = logController;
     this.powerSupply     = powerSupply;
     this.systemInfo      = systemInfo;
     this.text            = text;
     this.taskbar         = taskbar;
     this.taskview        = taskview;
     this.uiFactory       = uiFactory;
     this.wirelessAdapter = wirelessAdapter;
 }
示例#2
0
        internal WirelessNetworkControl(IWirelessAdapter wirelessAdapter, IText text)
        {
            this.wirelessAdapter = wirelessAdapter;
            this.text            = text;

            InitializeComponent();
            InitializeWirelessNetworkControl();
        }
 public ISystemControl CreateWirelessNetworkControl(IWirelessAdapter wirelessAdapter, Location location)
 {
     if (location == Location.ActionCenter)
     {
         return(new ActionCenterWirelessNetworkControl(wirelessAdapter, text));
     }
     else
     {
         return(new TaskbarWirelessNetworkControl(wirelessAdapter, text));
     }
 }
示例#4
0
 public ServerProxy(
     AppConfig appConfig,
     ILogger logger,
     IPowerSupply powerSupply         = default(IPowerSupply),
     IWirelessAdapter wirelessAdapter = default(IWirelessAdapter))
 {
     this.api       = new ApiVersion1();
     this.appConfig = appConfig;
     this.cancellationTokenSource = new CancellationTokenSource();
     this.httpClient      = new HttpClient();
     this.logContent      = new ConcurrentQueue <ILogContent>();
     this.logger          = logger;
     this.powerSupply     = powerSupply;
     this.timer           = new Timer();
     this.wirelessAdapter = wirelessAdapter;
 }
 public ServerProxy(
     AppConfig appConfig,
     ILogger logger,
     IPowerSupply powerSupply         = default(IPowerSupply),
     IWirelessAdapter wirelessAdapter = default(IWirelessAdapter))
 {
     this.api       = new ApiVersion1();
     this.appConfig = appConfig;
     this.cancellationTokenSource = new CancellationTokenSource();
     this.fileSystem = new FileSystem(appConfig, logger);
     this.httpClient = new HttpClient();
     this.instructionConfirmations = new ConcurrentQueue <string>();
     this.logger          = logger;
     this.logContent      = new ConcurrentQueue <ILogContent>();
     this.parser          = new Parser(logger);
     this.powerSupply     = powerSupply;
     this.timer           = new Timer();
     this.wirelessAdapter = wirelessAdapter;
 }
 public ShellOperation(
     IActionCenter actionCenter,
     IEnumerable <IActionCenterActivator> activators,
     ActionCenterSettings actionCenterSettings,
     IAudio audio,
     INotificationInfo aboutInfo,
     INotificationController aboutController,
     IKeyboard keyboard,
     ILogger logger,
     INotificationInfo logInfo,
     INotificationController logController,
     IPowerSupply powerSupply,
     ISystemInfo systemInfo,
     ITaskbar taskbar,
     TaskbarSettings taskbarSettings,
     ITerminationActivator terminationActivator,
     IText text,
     IUserInterfaceFactory uiFactory,
     IWirelessAdapter wirelessAdapter)
 {
     this.aboutInfo            = aboutInfo;
     this.aboutController      = aboutController;
     this.actionCenter         = actionCenter;
     this.activators           = activators;
     this.actionCenterSettings = actionCenterSettings;
     this.audio                = audio;
     this.keyboard             = keyboard;
     this.logger               = logger;
     this.logInfo              = logInfo;
     this.logController        = logController;
     this.powerSupply          = powerSupply;
     this.systemInfo           = systemInfo;
     this.taskbarSettings      = taskbarSettings;
     this.terminationActivator = terminationActivator;
     this.text            = text;
     this.taskbar         = taskbar;
     this.uiFactory       = uiFactory;
     this.wirelessAdapter = wirelessAdapter;
 }
        internal void BuildObjectGraph(Action shutdown)
        {
            ValidateCommandLineArguments();

            InitializeLogging();
            InitializeText();

            context         = new ClientContext();
            uiFactory       = BuildUserInterfaceFactory();
            actionCenter    = uiFactory.CreateActionCenter();
            messageBox      = BuildMessageBox();
            nativeMethods   = new NativeMethods();
            powerSupply     = new PowerSupply(ModuleLogger(nameof(PowerSupply)));
            runtimeProxy    = new RuntimeProxy(runtimeHostUri, new ProxyObjectFactory(), ModuleLogger(nameof(RuntimeProxy)), Interlocutor.Client);
            systemInfo      = new SystemInfo();
            taskbar         = uiFactory.CreateTaskbar(ModuleLogger("Taskbar"));
            taskview        = uiFactory.CreateTaskview();
            wirelessAdapter = new WirelessAdapter(ModuleLogger(nameof(WirelessAdapter)));

            var processFactory     = new ProcessFactory(ModuleLogger(nameof(ProcessFactory)));
            var applicationMonitor = new ApplicationMonitor(TWO_SECONDS, ModuleLogger(nameof(ApplicationMonitor)), nativeMethods, processFactory);
            var applicationFactory = new ApplicationFactory(applicationMonitor, ModuleLogger(nameof(ApplicationFactory)), nativeMethods, processFactory);
            var displayMonitor     = new DisplayMonitor(ModuleLogger(nameof(DisplayMonitor)), nativeMethods, systemInfo);
            var explorerShell      = new ExplorerShell(ModuleLogger(nameof(ExplorerShell)), nativeMethods);
            var fileSystemDialog   = BuildFileSystemDialog();
            var hashAlgorithm      = new HashAlgorithm();
            var splashScreen       = uiFactory.CreateSplashScreen();
            var systemMonitor      = new SystemMonitor(ModuleLogger(nameof(SystemMonitor)));

            var operations = new Queue <IOperation>();

            operations.Enqueue(new I18nOperation(logger, text));
            operations.Enqueue(new RuntimeConnectionOperation(context, logger, runtimeProxy, authenticationToken));
            operations.Enqueue(new ConfigurationOperation(context, logger, runtimeProxy));
            operations.Enqueue(new DelegateOperation(UpdateAppConfig));
            operations.Enqueue(new LazyInitializationOperation(BuildClientHostOperation));
            operations.Enqueue(new ClientHostDisconnectionOperation(context, logger, FIVE_SECONDS));
            operations.Enqueue(new LazyInitializationOperation(BuildKeyboardInterceptorOperation));
            operations.Enqueue(new LazyInitializationOperation(BuildMouseInterceptorOperation));
            operations.Enqueue(new ApplicationOperation(context, applicationFactory, applicationMonitor, logger, text));
            operations.Enqueue(new DisplayMonitorOperation(context, displayMonitor, logger, taskbar));
            operations.Enqueue(new SystemMonitorOperation(context, systemMonitor, logger));
            operations.Enqueue(new LazyInitializationOperation(BuildShellOperation));
            operations.Enqueue(new LazyInitializationOperation(BuildBrowserOperation));
            operations.Enqueue(new LazyInitializationOperation(BuildServerOperation));
            operations.Enqueue(new LazyInitializationOperation(BuildProctoringOperation));
            operations.Enqueue(new ClipboardOperation(context, logger, nativeMethods));

            var sequence = new OperationSequence(logger, operations);

            ClientController = new ClientController(
                actionCenter,
                applicationMonitor,
                context,
                displayMonitor,
                explorerShell,
                fileSystemDialog,
                hashAlgorithm,
                logger,
                messageBox,
                sequence,
                runtimeProxy,
                shutdown,
                splashScreen,
                systemMonitor,
                taskbar,
                text,
                uiFactory);
        }
 public ISystemControl CreateWirelessNetworkControl(IWirelessAdapter wirelessAdapter, Location location)
 {
     return(new Controls.Taskbar.WirelessNetworkControl(wirelessAdapter, text));
 }