static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { InitializeTraceLevel(); AppContainer container = new AppContainer(); MainForm form = new MainForm(); container.Add(form); logger.Info("Starting CodeBuilder"); Application.Run(form); logger.Info("CodeBuilder Exit"); } catch (Exception ex) { logger.Error("Startup", ex); MessageBoxHelper.DisplayFailure(ex.Message); } InternalTrace.Close(); }
/// <summary> /// Default constructor. /// </summary> public Windows8MailHelper() { AppList = PINetworkIsolationEnumAppContainers(); AppListConfig = PINetworkIsolationGetAppContainerConfig(); foreach (InetFirewallAppContainer PIApp in AppList) { AppContainer app = new AppContainer(PIApp.AppContainerName, PIApp.DisplayName, PIApp.WorkingDirectory, PIApp.AppContainerSid); List<SidAndAttributes> AppCapabilities = GetCapabilites(PIApp.Capabilities); app.LoopbackEnabled = CheckLoopback(PIApp.AppContainerSid); Apps.Add(app); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { AppContainer container = new AppContainer(); MainForm form = new MainForm(); container.Add(form); //Logger.Instance.Write("程序启动", LogLevel.Info); Application.Run(form); //Logger.Instance.Write("程序退出", LogLevel.Info); } catch (Exception ex) { //Logger.Instance.Write(ex.ToString(), LogLevel.Error); MessageBoxHelper.DisplayFailure(ex.Message); } }
public void LoadApps() { Apps.Clear(); _pACs = IntPtr.Zero; //Full List of Apps _AppList = PI_NetworkIsolationEnumAppContainers(); //List of Apps that have LoopUtil enabled. _AppListConfig = PI_NetworkIsolationGetAppContainerConfig(); foreach (var PI_app in _AppList) { AppContainer app = new AppContainer(PI_app.appContainerName, PI_app.displayName, PI_app.workingDirectory, PI_app.appContainerSid); var app_capabilities = LoopUtil.getCapabilites(PI_app.capabilities); if (app_capabilities.Count > 0) { //var sid = new SecurityIdentifier(app_capabilities[0], 0); IntPtr arrayValue = IntPtr.Zero; //var b = LoopUtil.ConvertStringSidToSid(app_capabilities[0].Sid, out arrayValue); //string mysid; //var b = LoopUtil.ConvertSidToStringSid(app_capabilities[0].Sid, out mysid); } app.LoopUtil = CheckLoopback(PI_app.appContainerSid); Apps.Add(app); } }
public override void Register <T>(T Object) { AppContainer.Register <T>(() => Object); }
public override void Register <T>(Func <T> Function) { AppContainer.Register <T>(Function); }
protected override async void OnStart() { var navigationService = AppContainer.Resolve <INavigationService>(); await navigationService.NavigateToAsync <SimpleDrumSequencerViewModel>(); }
public MainViewModel() { StudentQuizzesListViewModel = AppContainer.Resolve <StudentQuizzesListViewModel>(); NavigationListViewModel = AppContainer.Resolve <NavigationListViewModel>(); }
public MealsHistoryView() { InitializeComponent(); BindingContext = AppContainer.Resolve <MealHistoryViewModel>(); }
public ShoppingBagView() { InitializeComponent(); this.BindingContext = AppContainer.Resolve <ShoppingBagViewModel>(); }
protected override void OnExit(ExitEventArgs e) { base.OnExit(e); AppContainer.Stop(); }
public App() { AppContainer.Start(); }
public static int Main(string[] args) { // Create SettingsService early so we know the trace level right at the start SettingsService settingsService = new SettingsService(); InternalTrace.Initialize("nunit-gui_%p.log", (InternalTraceLevel)settingsService.GetSetting("Options.InternalTraceLevel", InternalTraceLevel.Default)); log.Info("Starting NUnit GUI"); GuiOptions guiOptions = new GuiOptions(args); GuiAttachedConsole attachedConsole = null; if (guiOptions.console) { log.Info("Creating attached console"); attachedConsole = new GuiAttachedConsole(); } if (guiOptions.help) { MessageDisplay.Display(guiOptions.GetHelpText()); return(0); } if (!guiOptions.Validate()) { string message = "Error in command line"; MessageDisplay.Error(message + Environment.NewLine + Environment.NewLine + guiOptions.GetHelpText()); log.Error(message); return(2); } if (guiOptions.cleanup) { log.Info("Performing cleanup of shadow copy cache"); DomainManager.DeleteShadowCopyPath(); return(0); } if (!guiOptions.NoArgs) { if (guiOptions.lang != null) { log.Info("Setting culture to " + guiOptions.lang); Thread.CurrentThread.CurrentUICulture = new CultureInfo(guiOptions.lang); } } try { // Add Standard Services to ServiceManager log.Info("Adding Services"); ServiceManager.Services.AddService(settingsService); ServiceManager.Services.AddService(new DomainManager()); ServiceManager.Services.AddService(new RecentFilesService()); ServiceManager.Services.AddService(new ProjectService()); ServiceManager.Services.AddService(new TestLoader(new GuiTestEventDispatcher())); ServiceManager.Services.AddService(new AddinRegistry()); ServiceManager.Services.AddService(new AddinManager()); ServiceManager.Services.AddService(new TestAgency()); // Initialize Services log.Info("Initializing Services"); ServiceManager.Services.InitializeServices(); } catch (Exception ex) { MessageDisplay.FatalError("Service initialization failed.", ex); log.Error("Service initialization failed", ex); return(2); } // Create container in order to allow ambient properties // to be shared across all top-level forms. log.Info("Initializing AmbientProperties"); AppContainer c = new AppContainer(); AmbientProperties ambient = new AmbientProperties(); c.Services.AddService(typeof(AmbientProperties), ambient); log.Info("Constructing Form"); NUnitForm form = new NUnitForm(guiOptions); c.Add(form); try { log.Info("Starting Gui Application"); Application.Run(form); log.Info("Application Exit"); } catch (Exception ex) { log.Error("Gui Application threw an excepion", ex); throw; } finally { log.Info("Stopping Services"); ServiceManager.Services.StopAllServices(); } if (attachedConsole != null) { Console.WriteLine("Press Enter to exit"); Console.ReadLine(); attachedConsole.Close(); } log.Info("Exiting NUnit GUI"); InternalTrace.Close(); return(0); }
public RegisterPage() { InitializeComponent(); BindingContext = this.viewModel = new RegisterViewModel(AppContainer.Resolve <IBackendService>()); }
public RoundOverviewPage() { InitializeComponent(); viewModel = new RoundOverviewViewModel(AppContainer.Resolve <INavigationService>(), AppContainer.Resolve <IRoundRepository>()); BindingContext = viewModel; }
public Handler(AppContainer appContainer) { _appContainer = appContainer; }
public HomeView() { InitializeComponent(); BindingContext = AppContainer.Resolve <HomeViewModel>(); }
private async Task InitializeNavigation() { //Resolve : casos em que eh necessario instancia, e nao ha injecao de dependencia no construtor(casos VM) var navigationService = AppContainer.Resolve <INavigationService>(); await navigationService.InitializeAsync();// Inicia a pagina Inicial }
public PedidoController() { bll = AppContainer.ObterPedidoBLL(); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { AppContainer.RegisterDependencies(); this.InitializeComponent(); this.Suspending += OnSuspending; }
public ScanResultView() { InitializeComponent(); BindingContext = AppContainer.Resolve <ScanResultViewModel>(); }
static void Main(string[] args) { AppContainer.ConfigureContainer(); new EarthCalculatorUI().StartCalculation(); }
public LogHandlerUI() { FileStorage = AppContainer.Resolve <IFileStorage>(); }
public MainWindow() { InitializeComponent(); this.dbConnection = AppContainer.GetDatabaseConnection(); }
private void InitializeApp() { AppContainer.RegisterDependencies(); }
public QuestionOverviewPage() { InitializeComponent(); viewModel = new QuestionOverviewViewModel(AppContainer.Resolve <IQuestionRepository>(), AppContainer.Resolve <IAnswerRepository>(), AppContainer.Resolve <IBackendService>()); BindingContext = viewModel; }
public override void Register <T>(string Name) { AppContainer.Register <T>(); }
public RoundStartPage(int id = 0) { InitializeComponent(); viewModel = new RoundStartViewModel(AppContainer.Resolve <INavigationService>(), AppContainer.Resolve <IBackendService>(), id); BindingContext = viewModel; }
public override void Register <T>() { AppContainer.Register <T>(); }
private async Task InitializeNavigation() { var navigationManager = AppContainer.Resolve <INavigationManager>(); await navigationManager.InitializeAsync(); }
private async void InitializeNavigation() { var _navigationService = AppContainer.Resolve <INavigationService>(); await _navigationService.InitializeAsync(); }
private void InitializeApp() { AppContainer.RegisterDependencies(); RegisterDeviceInternetAlertCallback(); }
public EmployeeHelpView() { InitializeComponent(); BindingContext = AppContainer.Resolve <EmployeeHelpViewModel>(); }
private void InitializeApp() { Akavache.Registrations.Start("TopMovies"); //Necessario para que akavache faca seu trabalho AppContainer.RegisterDependencies(); // Registro VM, Interfaces e Servicos }