Beispiel #1
0
        public ListEntertainment()
        {
            LoggerUtil.HandleLogPath();
            Logs.Info($"[WPFBigRemGUI.ListEntertainment] Starting ListEntertainment wpf GUI.");
            InitializeComponent();

            entertainmentUtil = new EntertainmentUtil();

            // list total
            GetAllRecordEntertainments = entertainmentUtil.GetListEntertainments();

            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            lblListEt.Foreground  = Brushes.Green;

            var LiveTime = new DispatcherTimer
            {
                Interval = TimeSpan.FromSeconds(1)
            };

            LiveTime.Tick += Timer_Tick;
            LiveTime.Start();

            // Disable resize
            ResizeMode = ResizeMode.CanMinimize;

            listviewEt.ItemsSource = entertainmentUtil.GetfirstEntertainment(30);
            ListObjectEt.Content   = entertainmentUtil.GetListEntertainment(30, GetAllRecordEntertainments).Count;
        }
Beispiel #2
0
        public EntertainemntMain()
        {
            LoggerUtil.HandleLogPath();
            Logs.Info($"[WPFBigRemGUI.Entertainment] Starting Entertainment wpf gui.");
            InitializeComponent();
            entertainmentUtil                = new EntertainmentUtil();
            txtEtName.Text                   = "";
            txtLink.Text                     = "";
            txtAuthorEnter.Text              = "";
            WindowStartupLocation            = WindowStartupLocation.CenterScreen;
            Application.Current.ShutdownMode = ShutdownMode.OnLastWindowClose;

            lstListEtCategory.Visibility   = Visibility.Visible;
            txtBtnCustomTextBox.Visibility = Visibility.Hidden;
            btnCancelCustom.Visibility     = Visibility.Hidden;

            var listConstantValue = typeof(CategoriesEntertainmentConstant).GetAllPublicConstantValues <string>();

            listConstantValue.Sort();
            lstListEtCategory.ItemsSource = listConstantValue;

            // Disable resize
            ResizeMode = ResizeMode.CanMinimize;

            // Backup Database
            DoBackupAsync();
        }
 public ShowOutputET()
 {
     InitializeComponent();
     entertainmentUtil = new EntertainmentUtil();
     showOutputSSH.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
     showOutputSSH.IsReadOnly = true;
 }
Beispiel #4
0
        private static void Main()
        {
            var etUtil = new EntertainmentUtil();
            int choose;

            Console.OutputEncoding = Encoding.UTF8;
            do
            {
                Console.WriteLine("1. Get list entertainments");
                Console.WriteLine("2. Add entertainment");
                Console.WriteLine("3. Find entertainment");
                Console.WriteLine("4. Update entertainment");
                Console.WriteLine("5. Delete entertainment");
                Console.WriteLine("6. Export to excel");
                Console.WriteLine("0. Exit");
                Console.Write("Choose: ");
                choose = int.Parse(Console.ReadLine() ?? throw new InvalidOperationException());

                switch (choose)
                {
                case 1:     // This time it will be the test program
                    Console.WriteLine(WebHealthCheck.TestWebSite("http://genk.vn/nghien-cuu-ve-600-trieu-phu-cho-thay-muc-do-giau-co-cua-ban-phu-thuoc-vao-6-yeu-to-bat-ke-tuoi-tac-hay-thu-nhap-20190127113348631.chn"));
                    break;
                }
            } while (choose != 0);

            HandleRandom.ChooseColorForString(choose == 0 ? "Goodbye" : "There is no any option you choose.",
                                              ConsoleColor.Blue);
            Thread.Sleep(1500);
        }
Beispiel #5
0
        public FindEt()
        {
            InitializeComponent();
            entertainmentUtil = new EntertainmentUtil();

            // Disable resize
            ResizeMode = ResizeMode.CanMinimize;

            WindowStartupLocation = WindowStartupLocation.CenterScreen;

            var listConstantValue = typeof(TypeEntertainmentsConstant).GetAllPublicConstantValues <string>();

            listConstantValue.Sort();
            comboxBoxEnterLink.ItemsSource   = listConstantValue;
            comboxBoxEnterLink.SelectedIndex = 0;
        }
Beispiel #6
0
        public UpdateEt()
        {
            LoggerUtil.HandleLogPath();
            InitializeComponent();
            EntertainmentUtil                = new EntertainmentUtil();
            entertainment                    = new RememberUtility.Model.Entertainment();
            WindowStartupLocation            = WindowStartupLocation.CenterScreen;
            Application.Current.ShutdownMode = ShutdownMode.OnLastWindowClose;

            // Disable resize
            ResizeMode = ResizeMode.CanMinimize;

            var listConstantValue = typeof(CategoriesEntertainmentConstant).GetAllPublicConstantValues <string>();

            listConstantValue.Sort();
            cbbListEtUpdateCategory.ItemsSource = listConstantValue;

            txtUpdateEtName.IsEnabled = true;
            txtLink.IsEnabled         = true;
            btnUpadte.IsEnabled       = false;
        }
 public EntertainmentController()
 {
     _entertainmentUtil = new EntertainmentUtil();
 }