Example #1
0
 public ApprovalDetalisListAdapter(ApprovalDetailList approvalList, AnimatedExpandableListView _lvApprovalDetailList, ApprovalDetailActivity _activity) : base(_activity)
 {
     MatchItems           = _approvalList = approvalList;
     _context             = _activity;
     lvApprovalDetailList = _lvApprovalDetailList;
     bitopiApplication    = (BitopiApplication)_context.ApplicationContext;
 }
Example #2
0
 public TNAMyTaskListAdapter(MyTaskList myTaskList, AnimatedExpandableListView _lvMyTask,
                             TNAMyTaskActivity _activity) : base(_activity)
 {
     MatchItems        = _MyTaskList = myTaskList;
     _context          = _activity;
     lvMyTask          = _lvMyTask;
     bitopiApplication = (BitopiApplication)_context.ApplicationContext;
     adapter           = this;
 }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     //BitopiSingelton.Instance.CurrentActivity = "Login Activity";
     base.OnCreate(savedInstanceState);
     repo = new AccountRepository(ShowLoader, HideLoader);
     bitopiApplication = (BitopiApplication)this.ApplicationContext;
     bitopiApplication.CurrentActivity = "Login Activity";
     SetContentView(Resource.Layout.layout_login);
     SupportActionBar.SetDisplayShowCustomEnabled(true);
     SupportActionBar.SetCustomView(Resource.Layout.custom_actionbar);
     etUserName       = FindViewById <EditText>(Resource.Id.etUserName);
     etPwd            = FindViewById <EditText>(Resource.Id.etPassword);
     btnLogin         = FindViewById <Button>(Resource.Id.ButLogInToApp);
     tvMsg            = FindViewById <TextView>(Resource.Id.tvMsg);
     tvMsg.Visibility = ViewStates.Gone;
     FindViewById <ImageButton>(Resource.Id.btnDrawermenu).Visibility = ViewStates.Gone;
     //indRotator = FindViewById<AVLoadingIndicatorView>(Resource.Id.indLoader);
     FindViewById <TextView>(Resource.Id.tvPropiretory).Text = "© " + DateTime.Now.Year + " Bitopi Group. All Rights Reserved";
 }
Example #4
0
 public ApprovalDetailList(Activity activity)
 {
     bitopiApplication = (BitopiApplication)activity.ApplicationContext;
 }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     bitopiApplication = (BitopiApplication)this.ApplicationContext;
 }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            bitopiApplication = (BitopiApplication)this.ApplicationContext;
            //BitopiSingelton.Instance.CurrentActivity = "Startup Activity";
            bitopiApplication.CurrentActivity = "Startup Activity";
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.layout_startup);
            tvMsg            = FindViewById <TextView>(Resource.Id.tvMsg);
            tvMsg.Visibility = ViewStates.Gone;
            webView          = (WebView)FindViewById(Resource.Id.wvLoader);
            webView.SetInitialScale(1);
            webView.Settings.JavaScriptEnabled    = true;
            webView.Settings.LoadWithOverviewMode = true;
            webView.Settings.UseWideViewPort      = true;
            webView.Settings.SetLayoutAlgorithm(WebSettings.LayoutAlgorithm.SingleColumn);
            webView.ScrollBarStyle         = ScrollbarStyles.OutsideOverlay;
            webView.ScrollbarFadingEnabled = false;
            webView.LoadUrl("file:///android_asset/loading/loader.html");
            WifiManager wifiMan = (WifiManager)this.GetSystemService(Context.WifiService);
            WifiInfo    wifiInf = wifiMan.ConnectionInfo;

            //BitopiSingelton.Instance.MacAddress= UID.id(this);
            //bitopiApplication.MacAddress = UID.id(this);
            PushNotificationSingleton.Instance.SaveNotification("");
            //BitopiSingelton.Instance.CurrentVersion = this.PackageManager.GetPackageInfo(this.PackageName,
            //    Android.Content.PM.PackageInfoFlags.MetaData).VersionName;
            bitopiApplication.CurrentVersion = this.PackageManager.GetPackageInfo(this.PackageName,
                                                                                  Android.Content.PM.PackageInfoFlags.MetaData).VersionCode;
            //StartService(new Intent(this, typeof(BitopiRegistrationIntentService)));
            //StartService(new Intent(this, typeof(BitopiInstanceIDListenerService)));
            //StartService(new Intent(this, typeof(BitopiGcmListenerService)));
            //StartService(new Intent(this, typeof(BitopiNotification)));
            StartService(new Intent(this, typeof(BitopiNotificationService)));
            AppDomain.CurrentDomain.UnhandledException += (s, e) =>
            {
                try
                {
                    typeof(System.Exception).GetField("stack_trace", BindingFlags.NonPublic | BindingFlags.Instance)
                    .SetValue(e.ExceptionObject, null);


                    throw  new Exception("CurrentDomainOnUnhandledException", e.ExceptionObject as Exception);
                }
                catch (Exception ex)
                {
                    string str = ex.Message;
                    CustomLogger.VersionName = bitopiApplication.CurrentVersion;
                    CustomLogger.CustomLog("From Activity: " + bitopiApplication.CurrentActivity + "\nMessage: " + ex.Message + "\nStack Trace: " + ex.StackTrace + "\n\n", "", bitopiApplication.User != null ?
                                           bitopiApplication.User.UserName : "");
                }
            };
            AndroidEnvironment.UnhandledExceptionRaiser += delegate(object sender, RaiseThrowableEventArgs args)
            {
                try
                {
                    typeof(System.Exception).GetField("stack_trace", BindingFlags.NonPublic | BindingFlags.Instance)
                    .SetValue(args.Exception, null);
                    args.Handled = true;

                    throw args.Exception;
                }
                catch (Exception ex)
                {
                    string s = ex.Message;
                    CustomLogger.VersionName = bitopiApplication.CurrentVersion;
                    CustomLogger.CustomLog("From Activity: " + bitopiApplication.CurrentActivity + "\nMessage: " + ex.Message + "\nStack Trace: " + ex.StackTrace + "\n\n", "", bitopiApplication.User != null ?
                                           bitopiApplication.User.UserName : "");
                }
            };
        }
Example #7
0
 public MyTaskList(Activity activity)
 {
     bitopiApplication = (BitopiApplication)activity.ApplicationContext;
 }