public void GoToMain() { var viewController = new MainViewController(); rootViewController.PushViewController(viewController, true); RemoveMeFromStack(); }
private UIViewController CreateController(string tabTitle, string tabImagePath, TwitterSearcher searcher) { var controller = new MainViewController (tabTitle, searcher); controller.TabBarItem.Image = UIImage.FromFile (tabImagePath); return new UINavigationController (controller); }
private void HandlePanGesture(UIPanGestureRecognizer recognizer) { var translation = recognizer.TranslationInView(recognizer.View); //distance of pan gestire from start position var distance = translation.X / UIScreen.MainScreen.Bounds.Width * -1; switch (recognizer.State) { case UIGestureRecognizerState.Began: _panGestureIsActive = true; MainViewController.DismissViewController(true, null); break; case UIGestureRecognizerState.Changed: var update = Math.Max(Math.Min((float)distance, 1.0f), 0.0f); UpdateInteractiveTransition(update); break; default: _panGestureIsActive = false; var velocity = recognizer.VelocityInView(recognizer.View).X * -1; if (velocity >= 100 || velocity >= -50 && distance >= 0.5) { FinishInteractiveTransition(); } else { CancelInteractiveTransition(); } break; } }
public override void Show(Cirrious.MvvmCross.Touch.Views.IMvxTouchView view) { // When initializing views for the first time, we will setup if (view is LoginViewController) { _loginViewController = (LoginViewController)view; base.Show(view); } else if (view is MainViewController) { _mainViewController = (MainViewController)view; base.Show(view); } else { if (PresentView(view) == false) { // No views can handle presenting this view...just push it on the navigation stack as last resort. base.Show(view); } } _viewPresenters.Add(view); var viewPresenter = view as IViewPresenter; if (viewPresenter != null) { viewPresenter.ViewPresenterAdded(); } }
public void Awake() { if (!_mainViewController) { _mainViewController = BeatSaberUI.CreateViewController <MainViewController>(); } }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { ScanbotSDK.SetLoggingEnabled(true); // TODO: Initialize SDK with correct license //ScanbotSDK.SetLicense(""); UIViewController initial = new MainViewController(); Controller = new UINavigationController(initial); // Navigation bar background color Controller.NavigationBar.BarTintColor = ScanbotRed; // Back button color Controller.NavigationBar.TintColor = UIColor.White; // Title color Controller.NavigationBar.TitleTextAttributes = new UIStringAttributes { ForegroundColor = UIColor.White, Font = UIFont.FromName("HelveticaNeue", 16), }; Controller.NavigationBar.Translucent = false; Window = new UIWindow(UIScreen.MainScreen.Bounds); Window.RootViewController = Controller; Window.MakeKeyAndVisible(); return(true); }
public AppDelegate() { NSUserDefaults.StandardUserDefaults.SetBool(true, "NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints"); NSUserDefaults.StandardUserDefaults.SetBool(true, "WebKitDeveloperExtras"); Locator.CurrentMutable.Register(() => new SharedTimer(), typeof(ITimer)); Locator.CurrentMutable.RegisterConstant(new Settings(), typeof(ISettings)); var windowController = new PlayerWindowController(); var mainViewController = new MainViewController(); //windowController.PresentView (mainViewController.View); Locator.CurrentMutable.RegisterConstant(new IMediaProvider [] { new Spotify(new SpotifyPlayer()), new Youtube(new YoutubePlayer(windowController.Window)), new Soundcloud(new SoundcloudApi("4fea3da6c7cb6807bcd29df897cb303e"), new SoundcloudPlayer()) }, typeof(IMediaProvider [])); var viewModel = new ApplicationViewModel(); //var playlistViewController = new PlaylistsViewController (viewModel); //playlistViewController.View.SetContentHuggingPriorityForOrientation (500, NSLayoutConstraintOrientation.Horizontal); //mainViewController.PresentSidebar (playlistViewController.View); Locator.CurrentMutable.RegisterConstant(viewModel, typeof(ApplicationViewModel)); Locator.CurrentMutable.RegisterConstant(new Navigator(viewModel, windowController, mainViewController), typeof(INavigator)); app = new Application(viewModel); }
public void Setup() { m_logger = A.Fake <ILogger>(); m_view = A.Fake <IMainView>(); m_controllersFactory = A.Fake <IConfiguratorControllersFactory>(); m_repositoryFactory = A.Fake <IGitRepositoryFactory>(); m_controller = new MainViewController(m_view, m_repositoryFactory, m_controllersFactory, m_logger); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); DevExpress.Skins.SkinManager.EnableFormSkins(); IMainViewController mainController = new MainViewController(new MainForm()); Application.Run(mainController.GetAttachedForm().GetAsForm()); }
public MainView() { InitializeComponent(); MainViewController controller = new MainViewController(usersDataGridView); Load += controller.MainView_Load; addToolStripButton.Click += controller.addToolStripButton_Click; changeToolStripButton.Click += controller.changeToolStripButton_Click; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { window = new UIWindow(UIScreen.MainScreen.Bounds); viewController = new MainViewController(); window.RootViewController = viewController; window.MakeKeyAndVisible(); return(true); }
public override bool FinishedLaunching (UIApplication app, NSDictionary options) { _mainCtr = new MainViewController(); _navCtr = new UINavigationController(_mainCtr); _window = new UIWindow(UIScreen.MainScreen.Bounds); _window.Add(_navCtr.View); _window.MakeKeyAndVisible (); return true; }
/// <summary>The on startup.</summary> /// <param name="e">The e.</param> protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); this.InitializeErrorHandler(); NotificationView.Initialize(); var mainView = new WpfView(); this.MainWindow = mainView.Window; this.controller = new MainViewController(mainView, new AggregateCalendar()); this.controller.Query(); }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // Override point for customization after application launch. // If not required for your application you can safely delete this method MainViewController = Window.RootViewController as ContainerViewController; InvokeOnMainThread(async() => await MainViewController.ReplaceViewControllerAsync(new TransitionsViewController(), Transition.None)); return(true); }
protected override void OnLoadSuccess() { base.OnLoadSuccess(); _controller = Controller as MainViewController; if (_controller != null) { _controller.btnGuild.onClick.AddListener(OnClickGuildBtn); _controller.btnTask.onClick.AddListener(OnClickTaskBtn); } }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { window = new UIWindow(UIScreen.MainScreen.Bounds); viewController = new MainViewController(); window.RootViewController = viewController; window.MakeKeyAndVisible(); return true; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainView MainView = new MainView(); TransferFileEngine TransferEngine = new TransferFileEngine(); MainViewController Controller = new MainViewController(MainView, TransferEngine); Application.Run(MainView); }
private void PopToViewControllerIfNeeded(MainViewController mainViewController) { var presentedViewController = (mainViewController?.ParentViewController as SLNavigationController)?.TopViewController; if (presentedViewController is MainViewController) { return; } presentedViewController?.NavigationController?.PopToRootViewController(true); (mainViewController.NavigationController as SLNavigationController)?.NavTitle?.RootMode(); }
public Form1() { if (Properties.Settings.Default.Language == "en-US") { System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(Properties.Settings.Default.Language); System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo(Properties.Settings.Default.Language); } InitializeComponent(); mainViewController = new MainViewController("", this.images, this.view); mainViewController.buildLogicalDrives(); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { DefaultFrames.Initialize(Device.DeviceType); window = new UIWindow(UIScreen.MainScreen.Bounds); _controller = new MainViewController(); window.RootViewController = _controller; window.MakeKeyAndVisible(); return(true); }
// Use this for initialization void Start() { if (mainCtrl == null) { mainCtrl = new MainViewController(); } mainPanel = transform.Find(Constants.MAINPANEL).gameObject; settingsPanel = transform.Find(Constants.SETTINGSPANEL).gameObject; Transform airplanePanels = transform.Find(Constants.AIRPLANEPANELS); showAirplanesPanel = airplanePanels.Find(Constants.SHOWAIRPLANEPANEL).gameObject; insertAirplanePanel = airplanePanels.Find(Constants.INSERTAIRPLANEPANEL).gameObject; }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // Override point for customization after application launch. // If not required for your application you can safely delete this method Window = new UIWindow(UIScreen.MainScreen.Bounds); var homeViewController = new MainViewController(); var navigationController = new UINavigationController(rootViewController: homeViewController); Window.RootViewController = navigationController; Window.MakeKeyAndVisible(); return(true); }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { Window = new UIWindow(UIScreen.MainScreen.Bounds); var controller = new MainViewController { View = { BackgroundColor = UIColor.White }, Title = "Reminders" }; Window.RootViewController = new UINavigationController(controller); Window.MakeKeyAndVisible(); return(true); }
/// <summary>Processes the request.</summary> /// <param name="targets">The targets.</param> /// <param name="view">The view.</param> /// <param name="success">The success.</param> /// <param name="fail">The fail.</param> private void ProcessRequest(IReadOnlyList <string> targets, IView view, ref int success, ref int fail) { var retry = false; for (this.activeIndex = 0; this.activeIndex < targets.Count; this.activeIndex++) { var currentIndex = this.activeIndex; try { var currentFile = targets[this.activeIndex]; if (retry) { retry = false; } else { this.activeController = new MainViewController(currentFile, view, new AggregateDb()); } view.ShowProgress(this.activeIndex, targets.Count); var entryResult = this.activeController.Query(); retry = this.activeIndex != currentIndex; if (entryResult == Status.Success || entryResult == Status.Skipped) { success++; } else if (entryResult == Status.Failure) { fail++; } else if (entryResult == Status.Cancelled) { break; // Users cancel } } catch (Exception ex) { fail++; Trace.TraceError(ex.ToString()); } } }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { Console.WriteLine("Scanbot SDK Example: Initializing Scanbot SDK..."); // Initialization with a custom, public(!) "StorageBaseDirectory" for demo purposes - see comments below! var configuration = new SBSDKConfiguration { EnableLogging = true, StorageBaseDirectory = GetDemoStorageBaseDirectory() }; SBSDK.Initialize(application, LICENSE_KEY, configuration); // Alternative initialization with the default "StorageBaseDirectory" which will be internal and secure (recommended). //SBSDK.Initialize(application, LICENSE_KEY, new SBSDKConfiguration { EnableLogging = true }); UIViewController initial = new MainViewController(); Controller = new UINavigationController(initial); // Navigation bar background color Controller.NavigationBar.BarTintColor = Colors.ScanbotRed; // Back button color Controller.NavigationBar.TintColor = UIColor.White; Controller.NavigationBar.Translucent = false; // Title color Controller.NavigationBar.TitleTextAttributes = new UIStringAttributes { ForegroundColor = UIColor.White, Font = UIFont.FromName("HelveticaNeue", 16) }; Window = new UIWindow(UIScreen.MainScreen.Bounds); Window.RootViewController = Controller; TopInset = Controller.NavigationBar.Frame.Height + UIApplication.SharedApplication.StatusBarFrame.Height; Window.MakeKeyAndVisible(); return(true); }
private void ChangedCulterHandler(object sender, EventArgs eventArgs) { CulturesHelper.ChangedCulterHandler = (EventHandler)Delegate.Remove(CulturesHelper.ChangedCulterHandler, new EventHandler(ChangedCulterHandler)); Utilities.InitialLoger(); Utilities.CopySqlite(Hamastar.DefaultConfig.Config.RootDirectory); NavigationHandler handler = NavigationHandler.Handler; base.Title = $"{Hamastar.DefaultConfig.Config.ProjectName} v{Hamastar.DefaultConfig.Config.AppVersion:F1}"; base.Icon = new BitmapImage(new Uri("pack://application:,,,/MeetingHubLibrary;Component/Images/Project/Icon/" + MeetingHubLibrary.Config.IconName, UriKind.RelativeOrAbsolute)); NavigationController.Controller.ReturnButtonText = "返回"; MainViewController viewController = new MainViewController(); NavigationController.Controller.PushViewController(viewController); base.Left = SystemParameters.PrimaryScreenWidth / 2.0 - 512.0; base.Top = SystemParameters.PrimaryScreenHeight / 2.0 - 384.0; base.Width = 1024.0; base.Height = 768.0; base.Opacity = 1.0; base.WindowStyle = WindowStyle.SingleBorderWindow; base.WindowState = WindowState.Maximized; PopUpDialog.Close(); }
public MainWindow() { InitializeComponent(); //создание вкладок в коде, чтобы было удобние к ним обращаться act = new AllComutersTab(); st = new SettingsTab(); sct = new SelectedComputerTab(); //переменнная в которой хранится путь сохранения текстовых файлов с данными о клиенских ПК st.txt_SavePath.Text = Settings.Default.savePath; // добавление вкладок в список на главный экран sp_Main.Children.Add(act); sp_Main.Children.Add(sct); sp_Main.Children.Add(st); //создание отдального файла для структурирования кода, да mvc = new MainViewController(this); }
private void MainPage_Loaded(object sender, RoutedEventArgs e) { MainViewController.CreateInstance(inkableScene, this); DataContext = MainViewController.Instance.MainModel; _mainPointerManager.Added += mainPointerManager_Added; _mainPointerManager.Moved += mainPointerManager_Moved; _mainPointerManager.Removed += mainPointerManager_Removed; _mainPointerManager.Attach(MainViewController.Instance.InkableScene); HypothesesViewController.CreateInstance(MainViewController.Instance.MainModel, MainViewController.Instance.OperationViewModels); var hypothesesView = new HypothesesView(); hypothesesView.DataContext = HypothesesViewController.Instance.HypothesesViewModel; hypothesisGrid.Children.Add(hypothesesView); AddHandler(PointerPressedEvent, new PointerEventHandler(InkableScene_PointerPressed), true); AddHandler(PointerReleasedEvent, new PointerEventHandler(InkableScene_PointerReleased), true); AddHandler(PointerMovedEvent, new PointerEventHandler(InkableScene_PointerMoved), true); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_UnhandledException); LoginInfo loginInfo = LoginInfo.GetInstance(); if (loginInfo.UserName == "") { MessageBox.Show("Access is denied."); } else { MainView mainView = new MainView(); MainViewController mainController = new MainViewController(mainView); mainController.LoadView(); Application.Run(mainView); } }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { ClientData.Setup(useLocalFiles: true); this.key = ClientData.GetCryptoKeyAsync(); UIViewController rootViewController; if (Settings.Nickname == null) { rootViewController = new UINavigationController(new SetupDialogController()); } else { StartSetup(); rootViewController = new MainViewController(); } window = new UIWindow(UIScreen.MainScreen.Bounds); window.RootViewController = rootViewController; window.MakeKeyAndVisible(); return(true); }
private void CloseViewController(IMvxTouchView viewController) { if (viewController != null) { _viewPresenters.Remove(viewController); bool viewClosed = false; var viewPresenter = viewController as IViewPresenter; if (viewPresenter != null) { viewPresenter.ViewPresenterRemoved(); } if (_loginViewController != null && _loginViewController == viewController) { base.Close(_loginViewController.ViewModel); _loginViewController = null; } else if (_mainViewController != null && _mainViewController == viewController) { base.Close(_mainViewController.ViewModel); _mainViewController = null; } else if (_presentedViews.Contains(viewController)) { // This view is already presented - we don't handle the close for this. They should // have removed themselves on ViewPresenterRemoved _presentedViews.Remove(viewController); } else { // Close another view that was not presented, was not login, or not main view controller base.Close(viewController.ViewModel); } } }
public TableDelegate(MainViewController mvc) { this.mvc = mvc; }
public DataSource(MainViewController mvc) { this.mvc = mvc; }
public ContactTableViewSource(UITableView table, List <Contact> contacts, MainViewController parent) { table.RegisterNibForCellReuse(ContactTableViewCell.Nib, ContactTableViewCell.Key); this.contacts = contacts; this.parent = parent; }
public VTSTableSource (List<VTSModel> items, MainViewController mainController) { _localizer = new Localizer (); _tableItems = items; _parentController = mainController; }
static void Main(string[] args) { var controller = new MainViewController(); controller.RunMainWindow(); }