本文整理汇总了C#中ApplicationManager类的典型用法代码示例。如果您正苦于以下问题:C# ApplicationManager类的具体用法?C# ApplicationManager怎么用?C# ApplicationManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationManager类属于命名空间,在下文中一共展示了ApplicationManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HomeControllerTest
public HomeControllerTest()
{
profileRepository = new EFProfileRepository();
apartmentRepository = new EFApartmentsRepository();
applicationManager = new ApplicationManager(new UserStore<ApplicationUser>(new ApplicationDbContext()));
}
示例2: Initialize
private void Initialize()
{
// wait for loading..
//gameObject.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeAll;
var thirdPersonControll = gameObject.GetComponent<ThirdPersonController>();
_initialGravity = thirdPersonControll.gravity;
thirdPersonControll.gravity = 0;
_appManager = ApplicationManager.Instance;
_messageBus = _appManager.GetService<IMessageBus>();
_appManager.CreateConsole(true);
_messageBus.AsObservable<GameRunner.GameStartedMessage>()
.Where(msg => msg.Tile.RenderMode == RenderMode.Scene)
.Take(1)
.Delay(TimeSpan.FromSeconds(2)) // give extra seconds..
.ObserveOnMainThread()
.Subscribe(_ =>
{
var position = transform.position;
var elevation = _appManager.GetService<IElevationProvider>()
.GetElevation(new MapPoint(position.x, position.z));
transform.position = new Vector3(position.x, elevation + 90, position.z);
thirdPersonControll.gravity = _initialGravity;
});
// ASM should be started from non-UI thread
Observable.Start(() => _appManager.RunGame(), Scheduler.ThreadPool);
}
示例3: Start
void Start()
{
// Caching
userDatamanager = UserDataManager.ins;
if (userDatamanager == null)
{
Debug.LogError("No UserDataManager?!");
}
applicationManager = ApplicationManager.ins;
if (applicationManager == null)
{
Debug.LogError("No ApplicationManager?!");
}
courseManager = CourseManager.ins;
if (courseManager == null)
{
Debug.LogError("No CourseManager?!");
}
modalPanel = ModalPanel.ins;
if (modalPanel == null)
{
Debug.LogError("No ModalPanel?!");
}
courseCompletedOKEvent = new UnityAction(_CourseCompleted);
courseViewCompletedOKEvent = new UnityAction(_CourseViewContinue);
courseViewCompletedCancelEvent = new UnityAction(_CourseViewStay);
audioManager = ASAudioManager.ins;
if (audioManager == null)
{
Debug.LogError("No ASAudioManager?!");
}
}
示例4: OnAppearing
protected override async void OnAppearing()
{
if (applicationManager == null)
{
applicationManager = new ApplicationManager(DependencyService.Get<ITransportResource>(), DependencyService.Get<IDtoSerializer>(), DependencyService.Get<IStorage>(), DependencyService.Get<IDeviceInfo>());
applicationManager.ConnectionManager.ConnectionDropped += () => Navigation.PushAsync(new SplashscreenPage());
}
AuthenticationResponseType autenticacao;
try
{
autenticacao = await applicationManager.AccountManager.ValidateAccount();
}
catch (System.Exception)
{
await DisplayAlert("Aviso!", "Serviço não disponível no momento. Tente novamente mais tarde", "Ok", null);
return;
}
//Se já está autenticado, abre tela principal, senão, envia para tela de login.
if (autenticacao == AuthenticationResponseType.Success)
await Navigation.PushAsync(new HomePage(new HomeViewModel(applicationManager)));
else
await Navigation.PushAsync(new LoginPage(new LoginViewModel(applicationManager)));
base.OnAppearing();
}
示例5: Awake
/// <summary> Performs framework initialization once, before any Start() is called. </summary>
void Awake()
{
AppManager = ApplicationManager.Instance;
AppManager.InitializeFramework(GetConfigBuilder(), GetBootInitAction());
SetStartGeoCoordinate();
}
示例6: Start
void Start()
{
if (title == null)
{
Debug.LogError("No title object referenced");
}
if (desc == null)
{
Debug.LogError("No desc object referenced");
}
if (category == null)
{
Debug.LogError("No category object referenced");
}
if (difficulty == null)
{
Debug.LogError("No difficulty object referenced");
}
courseManager = CourseManager.ins;
if (courseManager == null)
{
Debug.LogError("No courseManager?");
}
applicationManager = ApplicationManager.ins;
if (applicationManager == null)
{
Debug.LogError("Panic... No applicaitonManager found.");
}
}
示例7: Start
void Start()
{
applicationManager = ApplicationManager.ins;
if (applicationManager == null)
{
Debug.LogError("No ApplicationManager found!");
}
}
示例8: RegistrationViewModel
public RegistrationViewModel(ApplicationManager appManager)
{
_appManager = appManager;
_countriesRepository = new CountriesRepository();
SelectedCountry = Countries.First();
SelectedSex = Sexes.First();
SelectedAge = Ages.First();
}
示例9: FormService
/// <summary>
/// Initializes a new instance of the <see cref="FormService"/> class.
/// </summary>
public FormService()
{
this.applicationManager = Global.DependencyInjectionContainer.Resolve<ApplicationManager>();
this.organisationManager = Global.DependencyInjectionContainer.Resolve<OrganisationManager>();
this.securityGateway = Global.DependencyInjectionContainer.Resolve<ISecurityService>();
if (Global.DependencyInjectionContainer.IsRegistered<IApplicationManagerEventHandler>())
{
Global.DependencyInjectionContainer.Resolve<IApplicationManagerEventHandler>()
.Register(this.applicationManager);
}
}
示例10: Start
void Start()
{
CameraScene.enabled = true;
_appManager = ApplicationManager.Instance;
OverviewButton.gameObject.SetActive(true);
SceneButton.gameObject.SetActive(false);
OverviewButton.onClick.AsObservable().Subscribe(_ => SwitchSceneMode(true));
SceneButton.onClick.AsObservable().Subscribe(_ => SwitchSceneMode(false));
}
示例11: TestInitialize
public void TestInitialize()
{
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
{
Formatting = Formatting.None,
Converters = new JsonConverter[] { new JsonKnownTypeConverter() }
};
var container = new UnityContainer().LoadConfiguration();
container.RegisterInstance<ISymmetricCrypto>(new RijndaelSymmetricCrypto("password", "rgb init vector.", 8, 8, 256, "verysalty", 3));
this.ApplicationManager = container.Resolve<ApplicationManager>();
}
示例12: ApplicationForm
public ApplicationForm(
ApplicationManager applicationManager,
AppFormContainer mainForm,
System.Windows.Forms.MenuStrip menuStrip
)
{
m_appFormContainer = mainForm;
m_applicationMainForm = new ApplicationMainForm(this, mainForm);
string ext = applicationManager.APP_DATA.SETTINGS.getProjectFileExtension();
m_projectMenuStrip = new ProjectMenuStrip(this, mainForm, menuStrip, ext);
m_progressBar = new Forms.ProgressBarDialog();
m_applicationManager = applicationManager;
}
示例13: EnsureDependencies
public void EnsureDependencies()
{
EnsureConfigurationFilesAreAvailableDuringTest();
AppManager = new ApplicationManager();
AppInit = new ApplicationInitializer();
Dirs = DirHandler.Instance;
Dirs.CurrentDirectory = Environment.CurrentDirectory;
ProxisHome = ProxyHome.Instance;
ProxisHome.StatisticsProxy = AppInit.InitializeStatisticsComponent(AppManager);
}
示例14: Index
// GET: Default
public async Task<ActionResult> Index()
{
if (User.Identity.IsAuthenticated)
{
using (ApplicationDBContext db = new ApplicationDBContext())
{
var UM = new ApplicationManager(new UserStore<ApplicationUser>(db));
var user = await UM.FindByNameAsync(User.Identity.Name);
ViewBag.Age = user?.Year;
ViewBag.Sex = user?.Sex;
}
}
return View();
}
示例15: Main
static void Main(string[] args)
{
//-- An alternative method for catching unhandled exceptions (also rather flakey)..
//AppDomain.CurrentDomain.UnhandledException += new System.UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
//Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Control.CheckForIllegalCrossThreadCalls = true;
Application.DoEvents();
ApplicationManager applicationManager = new ApplicationManager();
applicationManager.Run(args);
}