Exemple #1
0
        private async Task Login(string login, string password, bool newUser)
        {
            //TODO: try to move it to Shared logic

            LoadingView.Hidden = false;
            View.BringSubviewToFront(LoadingView);
            LoadingView.StartAnimating();


            var configurationProvider = ServiceLocator.Current.GetInstance <ISyncConfigurationsProvider>();
            var result = await configurationProvider.DoLogin(login, password, newUser);

            if (result)
            {
                var syncingManager = ServiceLocator.Current.GetInstance <ISyncingManager>();
                await syncingManager.Sync();

                SyncCompleted();
            }
            else
            {
                var popup = new UIAlertController {
                    Title = "Some shit happened"
                };
                popup.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Cancel, obj => {
                    popup.DismissViewController(true, null);
                }));
                PresentViewController(popup, true, null);

                LoadingView.Hidden = true;
                LoadingView.StopAnimating();
            }
        }
Exemple #2
0
        void ReleaseDesignerOutlets()
        {
            if (ContentView != null)
            {
                ContentView.Dispose();
                ContentView = null;
            }

            if (ActivityIndicator != null)
            {
                ActivityIndicator.Dispose();
                ActivityIndicator = null;
            }

            if (LoadingView != null)
            {
                LoadingView.Dispose();
                LoadingView = null;
            }

            if (MessageLabel != null)
            {
                MessageLabel.Dispose();
                MessageLabel = null;
            }

            if (ProgressLabel != null)
            {
                ProgressLabel.Dispose();
                ProgressLabel = null;
            }
        }
Exemple #3
0
        void SyncCompleted()
        {
            var unityContainer    = ServiceLocator.Current.GetInstance <IUnityContainer>();
            var navigationService = ServiceLocator.Current.GetInstance <INavigationService>() as NavigationService;

            var locator = new iOSLocator(unityContainer);

            locator.RegisterTypes();

            navigationService?.Configure(Pages.LoadingViewControllerKey, typeof(LoadingVIewController));
            navigationService?.Configure(Pages.NewSummaryViewControllerKey, typeof(SummaryViewController));
            navigationService?.Configure(Pages.AddRecordViewControllerKey, typeof(AddRecordViewController));
            navigationService?.Configure(Pages.TransactionsViewControllerKey, typeof(TransactionsViewController));
            navigationService?.Configure(Pages.AccountCreationViewControllerKey, typeof(AccountCreationViewController));
            navigationService?.Configure(Pages.CategoryCreationViewControllerKey, typeof(CategoryCreationViewController));
            navigationService?.Configure(Pages.AccountSelectionViewControllerKey, typeof(AccountSelectionViewController));
            navigationService?.Configure(Pages.CategorySelectionViewControllerKey, typeof(CategorySelectionViewController));
            navigationService?.Configure(Pages.TransactionDetailsViewControllerKey, typeof(TransactionDetailsViewController));
            navigationService?.Configure(Pages.AccountTransactionsViewControllerKey, typeof(AccountTransactionsViewController));

            LoadingView.Hidden = true;
            LoadingView.StopAnimating();

            navigationService?.NavigateTo(Pages.NewSummaryViewControllerKey);
        }
Exemple #4
0
        void initDophotoButton()
        {
            var img = new UIImageView(new CGRect(900, 60, 18, 26));

            img.Image = UIImage.FromFile(filepath + "check.png");
            photoView.Add(img);

            photoDoBT = new UIButton(UIButtonType.Custom)
            {
                Frame = new CGRect(890, 50, 38, 46)
            };
            photoView.Add(photoDoBT);
            photoDoBT.TouchUpInside += (sender, e) => {
                photoLoading = new LoadingView(View.Bounds);
                View.Add(photoLoading);

                if (isNewPhotoReady)
                {
                    photo2register();
                    activeView = 3;
                }
                else
                {
                    isNewPhotoReady = true;
                }
            };
        }
Exemple #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);


            // Create your application here

            SetContentView(Resource.Layout.Locations);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            //initializing components
            set_location  = FindViewById <Button>(Resource.Id.btn_set_1);
            imgsearchicon = (Button)FindViewById(Resource.Id.btnsearchimg);
            Button view = FindViewById <Button>(Resource.Id.pinid);

            loader = FindViewById <LoadingView>(Resource.Id.loading_view);

            worker         = new BackgroundWorker();
            worker.DoWork += Worker_DoWork;
            worker.RunWorkerAsync();



            //setting on click events
            set_location.Click  += Set_location_Click;
            imgsearchicon.Click += Imgsearchicon_Click;
        }
Exemple #6
0
        public override Android.Views.View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment

            var RootView = inflater.Inflate(Resource.Layout.Home, container, false);



            loader                = RootView.FindViewById <LoadingView>(Resource.Id.loading_view_button);
            loader.Visibility     = ViewStates.Visible;
            recycler              = RootView.FindViewById <RecyclerView>(Resource.Id.recyclerView1);
            recycler.HasFixedSize = true;
            //  layoutManager = new LinearLayoutManager(this);
            layoutManager = new GridLayoutManager(Application.Context, 1, GridLayoutManager.Horizontal, false);
            recycler.SetLayoutManager(layoutManager);



            byte[] arr = Convert.FromBase64String(UserInfoHolder.Profile_pic);

            imgwriteIssue        = (ImageView)RootView.FindViewById(Resource.Id.imgwriteIssue);
            imgwriteIssue.Click += delegate
            {
                var i = new Intent(Application.Context, typeof(CreateIssue));
                this.StartActivity(i);
            };
            //CircleImageView img = RootView.FindViewById<CircleImageView>(Resource.Id.circleImageView1);
            //Android.Graphics.Bitmap bitmap = BitmapFactory.DecodeByteArray(arr, 0, arr.Length);
            //img.SetImageBitmap(bitmap);

            return(RootView);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            //Create your application here
            SetContentView(Resource.Layout.VerificationEmail);
            loader = FindViewById <LoadingView>(Resource.Id.loading_view);


            //send OTP to email
            BackgroundWorker worker = new BackgroundWorker();

            worker.DoWork += Worker_DoWork;
            worker.RunWorkerAsync();



            //UI SETTING CODE FOR GOOD UI
            verifybutton        = FindViewById <ImageView>(Resource.Id.imgbtn);
            verifybutton.Click += Verifybutton_Click;

            codetext = FindViewById <EditText>(Resource.Id.edt1);
            tf       = Typeface.CreateFromAsset(Assets, "Quicksand-Bold.otf");
            codetext.SetTypeface(tf, TypefaceStyle.Bold);

            heading = FindViewById <TextView>(Resource.Id.tv1);
            tf      = Typeface.CreateFromAsset(Assets, "Quicksand-Bold.otf");
            heading.SetTypeface(tf, TypefaceStyle.Bold);

            textx = FindViewById <TextView>(Resource.Id.tv2);
            tf    = Typeface.CreateFromAsset(Assets, "Quicksand-Bold.otf");
            textx.SetTypeface(tf, TypefaceStyle.Bold);
            //UI CODE ENDS HERE
        }
Exemple #8
0
        public override Android.App.Dialog OnCreateDialog(Bundle savedInstanceState)
        {
            base.OnCreateDialog(savedInstanceState);

            System.Diagnostics.Debug.WriteLine("OnCreateDialog");

            var payload = Arguments.GetSerializable(LoadingDialogPayload.PayloadKey) as LoadingDialogPayload;

            _loadingView = payload.LoadingView;
            _contentView = payload.ContentView;
            var isShowTcs = payload.IsShownTcs;

            payload.Dispose();

            var dialog = Dialogs.CreateFullScreenTransparentDialog(_contentView);

            Cancelable = false;
            dialog.SetCancelable(false);
            dialog.SetCanceledOnTouchOutside(false);

            DestroyTcs = new TaskCompletionSource <bool>();

            try
            {
                return(dialog);
            }
            finally
            {
                isShowTcs.SetResult(true);
            }
        }
Exemple #9
0
        void Start()
        {
            Debug.Log("Main:Start()");

            AppConfig.Init();

            GameObject.DontDestroyOnLoad(this.gameObject);

            if (IsNeedPrintConcole)
            {
                if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.Android)
                {
                    this.gameObject.AddComponent <LogHandler>();
                }
            }

            this.gameObject.AddComponent <ThreadManager>();//for download or extract assets
            this.gameObject.AddComponent <ResourceManager>();
            this.gameObject.AddComponent <NetworkManager>();
            this.gameObject.AddComponent <XLuaManager>();
            UnityMMO.NetMsgDispatcher.GetInstance().Init();
            Debug.Log("loading view active in main");
            var loadingViewTrans = GameObject.Find("UICanvas/Top/LoadingView");

            loadingViewTrans.gameObject.SetActive(true);
            loadingView = loadingViewTrans.GetComponent <LoadingView>();
            JumpToState(State.CheckExtractResource);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here

            SetContentView(Resource.Layout.Locations);
            //initializing components
            set_location = FindViewById <Button>(Resource.Id.btn_set_1);
            //srch_button = FindViewById<Button>(Resource.Id.btn_srch_1);
            //srch_text = FindViewById<EditText>(Resource.Id.search_text);
            loader = FindViewById <LoadingView>(Resource.Id.loading_view);


            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            map1 = MapFragment.NewInstance();
            var ft = FragmentManager.BeginTransaction();

            ft.Add(Resource.Id.map_placeholder, map1).Commit();
            map1.GetMapAsync(this);

            imgsearchicon = (Button)FindViewById(Resource.Id.btnsearchimg);



            //setting on click events
            set_location.Click  += Set_location_Click;
            imgsearchicon.Click += Imgsearchicon_Click;
        }
Exemple #11
0
    IEnumerator LoadScene(LoadSceneData data)
    {
        LoadingView loadingView = null;

        ViewManager.Instance.SwitchView(ViewIndex.LoadingView, null, () =>
        {
            loadingView = ViewManager.Instance.currentView as LoadingView;
        });
        yield return(new WaitUntil(() => loadingView != null));

        AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(data.sceneName, LoadSceneMode.Single);

        while (!asyncLoad.isDone)
        {
            loadingView.progress.fillAmount = asyncLoad.progress;
            yield return(null);
        }

        if (data.callBack != null)
        {
            data.callBack("Hi");
        }
        if (ViewManager.Instance.currentView.viewIndex == ViewIndex.LoadingView)
        {
            ViewManager.Instance.SwitchView(ViewIndex.EmptyView);
        }
    }
Exemple #12
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.photoupload);
            loader        = FindViewById <LoadingView>(Resource.Id.loading_view);
            button_loader = FindViewById <LoadingView>(Resource.Id.loading_view_button);



            upload = (TextView)FindViewById(Resource.Id.tvupload);
            tf     = Typeface.CreateFromAsset(Assets, "Quicksand-Bold.otf");
            upload.SetTypeface(tf, TypefaceStyle.Bold);

            gallery  = (ImageView)FindViewById(Resource.Id.imggallery);
            newimage = (CircleImageView)FindViewById(Resource.Id.imgaccount);

            gallery.Click += Gallery_Click;

            go        = (ImageView)FindViewById(Resource.Id.imglogin);
            go.Click += Go_Click;
        }
Exemple #13
0
 private void InitUi()
 {
     if (abLoading != null)
     {
         GameObject prefab = abLoading.LoadAsset("LoadingView") as GameObject;
         LoadingUI = Instantiate(prefab);
         Scene        scene  = SceneManager.GetActiveScene();
         GameObject[] gos    = scene.GetRootGameObjects();
         Transform    parent = null;
         Camera       camera = null;;
         for (int i = 0; i < gos.Length; i++)
         {
             if (gos[i].name == "LoadingPart")
             {
                 parent = gos[i].transform;
             }
             if (gos[i].name == "MainCamera" || gos[i].name == "Main Camera")
             {
                 camera = gos[i].GetComponent <Camera>();
             }
         }
         Canvas can = LoadingUI.GetComponent <Canvas>();
         can.worldCamera = camera;
         LoadingUI.transform.SetParent(parent);
         LoadingUI.transform.localPosition = Vector3.zero;
         LoadingUI.transform.localRotation = Quaternion.Euler(Vector3.zero);
         LoadingUI.transform.localScale    = Vector3.one;
         LoadingUI.name = "Load";
         FirstUtil.RefreshShaderInEditor(LoadingUI);
         ChangeLayerAll(LoadingUI, gameObject.layer);
         load = LoadingUI.AddComponent <LoadingView>();
     }
 }
Exemple #14
0
        private void UploadMedia(UIImage image, NSUrl referenceUrl, NSUrl mediaUrl)
        {
            byte[] mediaByteArray;
            if (image != null)
            {
                ByteHelper.ImageToByteArray(image, out mediaByteArray);
            }
            else if (mediaUrl != null)
            {
                ByteHelper.VideoToByteArray(mediaUrl, out mediaByteArray);
            }
            else
            {
                Console.Out.WriteLine("No media to upload!");
                return;
            }

            LoadingView loading = new LoadingView();

            loading.Show("Uploading file, please wait ...");

            server.UploadFileAsync(
                referenceUrl.AbsoluteString,
                mediaByteArray,
                delegate {
                loading.Hide();
            }
                );
        }
Exemple #15
0
        void MainView_Loaded(object sender, RoutedEventArgs e)
        {
            ListGrid.Background   = new SolidColorBrush(ColorHelper.FromArgb(220, 246, 240, 234));
            DetailGrid.Background = new SolidColorBrush(ColorHelper.FromArgb(200, 255, 255, 255));

            BackgroundImage.BackSource   = new BitmapImage(new Uri(StaticStyles.DefaultMuroBackground));
            BackgroundImage.BrushOpacity = 0.1;

            LogoFadeImage.BackSource = new BitmapImage(new Uri(StaticStyles.DefaultLogoUri));

            inituserproperties();
            initCircleScroll();
            initPeopleScroll();
            resetMLOs();
            if ((ViewModel as MainViewModel).PostsList != null)
            {
                resetComments();
            }
            if ((ViewModel as MainViewModel).LOCommentsList != null)
            {
                resetMLOComments();
            }
            if ((ViewModel as MainViewModel).PendingQuizzesList != null)
            {
                resetPendingQuizzes();
            }
            if ((ViewModel as MainViewModel).CompletedQuizzesList != null)
            {
                resetCompleteQuizzes();
            }

            _loadingview = new LoadingView();
            MainGrid.Children.Add(_loadingview);
            Canvas.SetZIndex(_loadingview, -10);
        }
Exemple #16
0
        public static void Start(Type type, bool savePrevious, params object[] parameters)
        {
            Container.Dispatcher.SafelyInvoke((() => {
                var parametersCopy = new object[parameters.Length];
                Array.Copy(parameters, parametersCopy, parameters.Length);

                LoadingView?.Invoke(Container.Content.GetType(), type, parametersCopy);

                if (savePrevious && Container.Content.GetType() != Wait.GetType() && Container.Content is Page)
                {
                    PreviousContent = (Page)Container.Content;
                }

                if (Container == null)
                {
                    throw new ApplicationException("Container hasn't been defined yet");
                }
                if (!type.IsSubclassOf(typeof(Page)))
                {
                    throw new ApplicationException($"{type} has to be a Page");
                }

                Container.Content = Activator.CreateInstance(type, parameters);
            }));
        }
Exemple #17
0
        public static UIImage GetImageFromWebPage(UIWebView webPage, LoadingView lv)
        {
            var oldFrame = webPage.Frame;

            try
            {
                lv.Show();
                var frame       = webPage.Frame;
                var fittingSize = webPage.SizeThatFits(new SizeF());
                frame.Size    = fittingSize;
                webPage.Frame = frame;

                UIGraphics.BeginImageContext(new SizeF(webPage.Bounds.Width, webPage.Bounds.Height));
                webPage.Layer.RenderInContext(UIGraphics.GetCurrentContext());

                var viewImage = UIGraphics.GetImageFromCurrentImageContext();

                UIGraphics.EndImageContext();

                return(viewImage);
            }
            finally
            {
                webPage.Frame = oldFrame;
                lv.Hide();
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.newPass);
            submit        = FindViewById <ImageView>(Resource.Id.imgbtn);
            submit.Click += Submit_Click;

            newPass = (EditText)FindViewById(Resource.Id.eddt1);
            loader  = FindViewById <LoadingView>(Resource.Id.loading_view);
            cn_pass = (EditText)FindViewById(Resource.Id.eddt5);



            tv1 = (TextView)FindViewById(Resource.Id.tv1);
            tf  = Typeface.CreateFromAsset(Assets, "Quicksand-Bold.otf");
            tv1.SetTypeface(tf, TypefaceStyle.Bold);

            tv2 = (TextView)FindViewById(Resource.Id.tv2);
            tf  = Typeface.CreateFromAsset(Assets, "Quicksand-Bold.otf");
            tv2.SetTypeface(tf, TypefaceStyle.Bold);

            tv5 = (TextView)FindViewById(Resource.Id.tv5);
            tf  = Typeface.CreateFromAsset(Assets, "Quicksand-Bold.otf");
            tv5.SetTypeface(tf, TypefaceStyle.Bold);
        }
Exemple #19
0
 void DoHideLoadingScreen()
 {
     if (LoadingView.Instance.IsVisible)
     {
         LoadingView.SharedInstance().HideTransition();
     }
 }
        public App()
        {
            InitializeComponent();

            AdministrativeRegionCache.Init();

            MainPage = new LoadingView();
        }
Exemple #21
0
 private void EnterGame()
 {
     if (m_view != null)
     {
         m_view.Destroy();
         m_view = null;
     }
 }
 public IReusableLoading Create(LoadingView view, object viewModel = null)
 {
     if (viewModel != null)
     {
         view.BindingContext = viewModel;
     }
     return(new ReusableLoading(view, LoadingDialog));
 }
 // Start is called before the first frame update
 public void Init(Func <Dictionary <string, string> > getPaths, LoadingView loadingView)
 {
     GetComponent <Button>().onClick.AddListener(() =>
     {
         loadingView.SetActiveState(true);
         AssetPackerMgr.Instance.GentatorNewAltas("Test", getPaths(), () => loadingView.SwitchScene(SceneName.Game.ToString()));
     });
 }
 public void SetUp()
 {
     _loading                 = new GameObject();
     _loadingView             = _loading.AddComponent <LoadingView>();
     _loadingView.CanvasGroup = _loading.AddComponent <CanvasGroup>();
     _loadingViewModel        = new LoadingViewModel();
     _loadingView.SetModel(_loadingViewModel);
 }
Exemple #25
0
        public App()
        {
            Kemorave.Threading.MainUIThreadIInvoker = new SSHAA.Services.MainUIThreadIInvoker();
            Device.SetFlags(new string[] { "Brush_Experimental" });

            InitializeComponent();
            // DLToolkit.Forms.Controls.FlowListView.Init();
            MainPage = new LoadingView();
        }
		public void ShowLoadingScreen(OverlayDetails details)
		{	
			if (IsActive(this.LoadingOverLay) == false) {
				WriteMessage ("ShowLoadingScreen");
				var view = new LoadingView (details);
				view.Tag = LoadingOverLay;
				MainWindow.AddSubview(view);
				HideAll (this.LoadingOverLay);				
			}
		}
Exemple #27
0
        public override void OnDestroyView()
        {
            base.OnDestroyView();

            _loadingView = null;
            _contentView = null;
            Dialog?.Dispose();
            DestroyTcs.SetResult(true);
            DestroyTcs = null;
        }
        protected override void SetValueImpl(object target, object value)
        {
            try
            {
                if (!(target is EmptyDataSet emptyDataSet) || value == null)
                {
                    return;
                }

                States state     = (States)Enum.Parse(typeof(States), value.ToString());
                UIView stateView = new UIView()
                {
                    TranslatesAutoresizingMaskIntoConstraints = false
                };

                foreach (UIView view in emptyDataSet.ContentView.Subviews)
                {
                    view.RemoveFromSuperview();
                }

                emptyDataSet.ContentView.Alpha = 1f;
                var _frame = new CGRect(0, 0, UIScreen.MainScreen.Bounds.Width, UIScreen.MainScreen.Bounds.Height);

                switch (state)
                {
                case States.Normal:
                    emptyDataSet.ContentView.Alpha = 0f;
                    break;

                case States.Loading:
                    stateView = new LoadingView(_frame);
                    break;

                case States.NoData:
                    stateView = new NoDataView(_frame);
                    break;

                case States.NoInternet:
                    stateView = new NoInternetView(_frame, emptyDataSet.RefreshCommand);
                    break;

                case States.Error:
                    stateView = new ErrorView(_frame);
                    break;
                }
                emptyDataSet.ContentView.AddSubview(stateView);
                stateView.SetCenterContraintTo(emptyDataSet.ContentView);
                stateView.SetLeftContraintTo(emptyDataSet.ContentView, 0);
                stateView.SetRightContraintTo(emptyDataSet.ContentView, 0);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.Message);
            }
        }
Exemple #29
0
        public static void BackToPrevious()
        {
            if (!Container.Dispatcher.CheckAccess())
            {
                Container.Dispatcher.BeginInvoke(new Action(BackToPrevious));
                return;
            }

            LoadingView?.Invoke(Container.Content.GetType(), PreviousContent.GetType(), new object[] { });
            Container.Content = PreviousContent;
        }
Exemple #30
0
 public void ShowLoadingScreen(OverlayDetails details)
 {
     if (IsActive(this.LoadingOverLay) == false)
     {
         WriteMessage("ShowLoadingScreen");
         var view = new LoadingView(details);
         view.Tag = LoadingOverLay;
         MainWindow.AddSubview(view);
         HideAll(this.LoadingOverLay);
     }
 }
Exemple #31
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.SignupFinal);

            imgGo        = (ImageView)FindViewById(Resource.Id.imgGO);
            imgGo.Click += ImgGo_Click;
            loadingView  = FindViewById <LoadingView>(Resource.Id.loading_view);
        }