Exemplo n.º 1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            //  UserDialogs.Init();


            AppProvider.Log          = new Conarh_2016.iOS.Services.Log();
            AppProvider.IOManager    = new IOManager();
            AppProvider.PopUpFactory = new PopUpFactory();

            AppProvider.Screen       = new ScreenOptions();
            AppProvider.MediaPicker  = new MediaPicker();
            AppProvider.ImageService = new ImageServiceIOS();
            AppProvider.ShareService = new ShareServiceIOS();
            AppProvider.Initialize();

            Forms.Init();

            window = new UIWindow(UIScreen.MainScreen.Bounds);

            /*
             *          CrossPushNotification.Initialize<CrossPushNotificationListener> ();
             *          CrossPushNotification.Current.Register ();
             */
            window.RootViewController = (new App()).MainPage.CreateViewController();
            window.MakeKeyAndVisible();

            DbClient.Instance.Initialize(new SQLitePlatformIOS());
            AppController.Instance.Start();

            UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;

            return(true);
        }
        private async Task BindDDLAsync()
        {
            List <string> state = AppProvider.EnableStates;

            CloudUploadComboBox.ItemsSource     = state;
            LanguageComboBox.ItemsSource        = state;
            FTPComboBox.ItemsSource             = state;
            CheckUpdateComboBox.ItemsSource     = state;
            EmailAlertComboBox.ItemsSource      = state;
            EmailAfterResetComboBox.ItemsSource = state;
            EmailReportComboBox.ItemsSource     = state;

            MonthComboBox.ItemsSource = AppProvider.Months;

            UTCComboBox.ItemsSource = AppProvider.UTCs;

            DayComboBox.ItemsSource = AppProvider.NumericDays;

            DateComboBox.ItemsSource = AppProvider.WordDays;

            AlarmTypeComboBox.ItemsSource = AppProvider.AlarmTypes;

            HourComboBox.ItemsSource = AppProvider.HourString();

            MinuteComboBox.ItemsSource = AppProvider.MinuteString();

            SecondComboBox.ItemsSource = AppProvider.SecondString();

            LogTimeComboBox.ItemsSource = AppProvider.MinuteString();

            var buildings = await new BuildingProvider().GetBuildingsAsync();

            AreaCombobox.ItemsSource = buildings;
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
#if DEBUG
            //args = new string[] { "--telegram", "--api-key", "1064203680:AAGB9o2QGQLljkaBYC36Wxx3sVEb8MRO9aU" };
#endif

            AppProvider.Initialize();

            Logs.Instance.AddLogErrorNotify((s, e) => {
                var tuple      = s as Tuple <DateTime, string, bool>;
                CultureInfo en = new CultureInfo("en-US");
                Console.Error.WriteLine($"[{tuple.Item1.ToString(en)}] [Error] {tuple.Item2}");
            });

            try
            {
                Runnable.Start(args);
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occured! " + e.Message);
                Console.WriteLine(e.StackTrace);
                Console.WriteLine("Please, check log.txt file.");
            }

            AppProvider.Deinitialize();

            Environment.Exit(0);
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

            AppProvider.Initialize();

            Logs.Instance.AddLogErrorNotify((s, e) => {
                var tuple      = s as Tuple <DateTime, string, bool>;
                CultureInfo en = new CultureInfo("en-US");
                System.Console.Error.WriteLine($"[{tuple.Item1.ToString(en)}] [Error] {tuple.Item2}");
            });

            try
            {
                Runnable.Start(args);
            }
            catch (Exception e)
            {
                System.Console.WriteLine("An error occured! " + e.Message);
                System.Console.WriteLine(e.StackTrace);
                System.Console.WriteLine("Please, check log.txt file.");
            }

            AppProvider.Deinitialize();

            Environment.Exit(0);
        }
Exemplo n.º 5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            AppProvider.Log          = new Conarh_2016.Android.Services.Log();
            AppProvider.IOManager    = new IOManager();
            AppProvider.PopUpFactory = new PopUpFactory();

            AppProvider.Screen      = new ScreenOptions();
            AppProvider.MediaPicker = new MediaPicker();

            AppProvider.ShareService  = new ShareServiceAndroid();
            AppProvider.ImageService  = new ImageServiceAndroid();
            AppProvider.ImageCache    = new ImageLoaderCache();
            AppProvider.LinkedinLogin = new LinkedinLogin();
            AppProvider.FastCellCache = FastCellCache.Instance;
            AppProvider.Initialize();

            Forms.Init(this, bundle);
            UserDialogs.Init(() => (Activity)Forms.Context);


            CrossPushNotification.Initialize <CrossPushNotificationListener>("241198731184");
            CrossPushNotification.Current.Register();

            StartPushService();

            LoadApplication(new App());

            ActionBar.SetIcon(new ColorDrawable(global::Android.Graphics.Color.Transparent));

            DbClient.Instance.Initialize(new SQLitePlatformAndroid());

            AppController.Instance.Start();
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
#if DEBUG
            //args = new string[] { "net", "--download-html", "https://naver.com", /*"--disable-auto-redirection"*/ };
            //args = new string[] { "--test", "pixiv" };
            //args = new string[] { "https://e-hentai.org/g/1491793/45f9e85e48/", "--extract-info", "--print-process" };
            //args = new string[] { "https://e-hentai.org/g/1491793/45f9e85e48/",  };
            //args = new string[] { "https://gall.dcinside.com/board/view/?id=programming&no=1132197&page=1", "--print-process" };
            //args = new string[] { "https://hitomi.la/galleries/1344592.html", "--print-process" };
            //args = new string[] { "https://gall.dcinside.com/mgallery/board/lists?id=purikone_redive", "--gaenyum" };
            //args = new string[] { "https://www.instagram.com/parlovetati/" };
            //args = new string[] { "https://www.instagram.com/zennyrt/", "-p" };
            //args = new string[] { "https://www.instagram.com/haneul__haneul/", "-p" };
            //args = new string[] { "https://exhentai.org/g/1495578/5568045b16/", "-p" };
            //args = new string[] { "https://manamoa15.net/bbs/board.php?bo_table=manga&wr_id=1994867", "-p" };
            //args = new string[] { "https://manamoa15.net/bbs/page.php?hid=manga_detail&manga_id=11000", "-p" };
            //args = new string[] { "https://twitter.com/hashtag/%EB%A1%9C%EB%A6%AC", "-p" };
            //args = new string[] { "https://twitter.com/sCQ5fV6ocBfxyQS/media", "-p" };
            //args = new string[] { "https://twitter.com/priconne_redive", "-p" };
            //args = new string[] { "https://www.instagram.com/ravi.me/", "-p" };
            //args = new string[] { "https://xn--9w3b15m8vo.asia/reader/1496049#1-", "-p" };
            //args = new string[] { "https://danbooru.donmai.us/posts?tags=oryou", "-p", "--end-page", "3" };
            //args = new string[] { "https://funbe19.com/왕의-딸로-태어났다고-합니다", "-p"  };
            //args = new string[] { "https://www.pixiv.net/member.php?id=115051", "-p" };
            //args = new string[] { "https://comic.naver.com/webtoon/list.nhn?titleId=626907&weekday=wed" };
            //args = new string[] { "https://manamoa.net/bbs/page.php?hid=manga_detail&manga_id=10953" };
            //args = new string[] { "https://www.instagram.com/chuu__chloe/?hl=ko" };
            //args = new string[] { "https://jmana25.com/book/패러렐 파라다이스" };
            //args = new string[] { "https://hitomi.la/doujinshi/mofurefre-%ED%95%9C%EA%B5%AD%EC%96%B4-1542081.html" };
            //args = new string[] { "http://www.hn-hn.co.kr/shop/shopbrand.html?xcode=013&type=N&mcode=003" };
            args = new string[] { "https://attrangs.co.kr/shop/list.php?cate=2301" };
#endif

            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

            AppProvider.Initialize();

            Logs.Instance.AddLogErrorNotify((s, e) => {
                var tuple      = s as Tuple <DateTime, string, bool>;
                CultureInfo en = new CultureInfo("en-US");
                System.Console.Error.WriteLine($"[{tuple.Item1.ToString(en)}] [Error] {tuple.Item2}");
            });

            try
            {
                Runnable.Start(args);
            }
            catch (Exception e)
            {
                System.Console.WriteLine("An error occured! " + e.Message);
                System.Console.WriteLine(e.StackTrace);
                System.Console.WriteLine("Please, check log.txt file.");
            }

            AppProvider.Deinitialize();

            Environment.Exit(0);
        }
Exemplo n.º 7
0
        public static IAppProvider CreateAppProvider(
            IAccountRepository adminRepository,
            ISessionRepository adminSessionRepository,
            int adminAccountSessionCollectionCapacity,
            IActionRightResolver adminActionRightResolver,

            IAccountRepository userRepository,
            ISessionRepository userSessionRepository,
            int userAccountSessionCollectionCapacity,
            IActionRightResolver userActionRightResolver)
        {
            // todo1[ak] check args

            RegisterMappings();

            IAppProvider appProvider = new AppProvider();

            ITimeSource timeSource = CreateTimeSource();

            if (adminAccountSessionCollectionCapacity == 0)
            {
                adminAccountSessionCollectionCapacity = Constants.DEFAULT_ADMIN_ACCOUNT_SESSION_COLLECTION_CAPACITY;
            }

            if (userAccountSessionCollectionCapacity == 0)
            {
                userAccountSessionCollectionCapacity = Constants.DEFAULT_USER_ACCOUNT_SESSION_COLLECTION_CAPACITY;
            }

            IAccountManager adminManager = CreateAdminManager(
                timeSource,
                adminRepository,
                adminSessionRepository,
                adminAccountSessionCollectionCapacity,
                adminActionRightResolver);

            IAccountManager userManager = CreateUserManager(
                timeSource,
                userRepository,
                userSessionRepository,
                userAccountSessionCollectionCapacity,
                userActionRightResolver);

            appProvider.RegisterService<IGuestService>(new GuestService(adminManager, userManager));
            appProvider.RegisterService<IAdminService>(new AdminService(adminManager, userManager));
            appProvider.RegisterService<IUserService>(new UserService(userManager));

            return appProvider;
        }
Exemplo n.º 8
0
 public RefundAgreeEventHandle(
     IRepository <RefundLog, Guid> refundLogRepository,
     IRepository <PayOrder, Guid> payOrderRepository,
     IRepository <ProductOrder, Guid> productOrderRepository,
     IMediator mediator,
     AppProvider appProvider,
     ISettingProvider settingProvider,
     IPayApi payApi
     )
 {
     _refundLogRepository    = refundLogRepository;
     _payOrderRepository     = payOrderRepository;
     _productOrderRepository = productOrderRepository;
     _mediator        = mediator;
     _appProvider     = appProvider;
     _settingProvider = settingProvider;
     _payApi          = payApi;
 }
Exemplo n.º 9
0
        public App()
        {
            Logs.Instance.AddLogNotify((s, e) =>
            {
                var ss = s as Tuple <DateTime, string, bool>;
                var en = new CultureInfo("en-US");
                lock (log_recored)
                    log_recored.Append($"[{ss.Item1.ToString(en)}] {ss.Item2}\r\n");
            });
            Logs.Instance.AddLogErrorNotify((s, e) =>
            {
                var ss = s as Tuple <DateTime, string, bool>;
                var en = new CultureInfo("en-US");
                lock (log_recored)
                    log_recored.Append($"[{ss.Item1.ToString(en)}] [Error] {ss.Item2}\r\n");
            });

            AppProvider.ApplicationPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);

            InitializeComponent();

            MainPage = new MainPage();
            Task.Run(() => AppProvider.Initialize());
        }
Exemplo n.º 10
0
 public static void AppInitialize()
 {
     AppProvider appProvider = new AppProvider();
     appProvider.Initialize();
 }
Exemplo n.º 11
0
 protected override void OnSleep()
 {
     // Handle when your app sleeps
     AppProvider.Deinitialize();
 }