Exemplo n.º 1
0
        public static List <Page> StartDownloadPages(String bookID)
        {
            List <Page> pageList = null;

            try
            {
                Core_2 client = GenerateCore_2Client();
                GetPagesInBookReturn[] results = client.GetPagesInBook(bookID);
                if (results != null)
                {
                    pageList = new List <Page>();

                    foreach (GetPagesInBookReturn r in results)
                    {
                        Page page = new Page();
                        page.ID         = r.ID.ToString();
                        page.URL        = r.URL;
                        page.PageNumber = r.PageNumber;
                        page.MD5        = r.MD5;
                        page.Type       = r.Type;
                        page.Version    = r.Version;
                        pageList.Add(page);
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.WriteLineDebugging("eBriefingService - StartDownloadPages: {0}", ex.ToString());
            }

            return(pageList);
        }
Exemplo n.º 2
0
 private void delay_aftherShoot_ON_Tick(object sender, EventArgs e)
 {
     Core_2.Stop();
     Coredeafult.Stop();
     delay_aftherShoot_OFF.Start();
     delay_aftherShoot_ON.Stop();
 }
Exemplo n.º 3
0
        private void holdlocation_Tick(object sender, EventArgs e)
        {
            if (checkBox4.Checked == true)
            {
                pharahHolder();
            }
            if (checkBox3.Checked == true)
            {
                statusreoload();
            }
            ushort down = 32768;
            ushort up   = 32768;

            if (checkBox2.Checked == true)
            {
                if ((GetAsyncKeyState(0X51) & up) == up)
                {
                    ultimatewait.Start();
                    Coredeafult.Stop();
                    Core_2.Stop();
                }
            }

            Process[] pname = Process.GetProcessesByName("Overwatch");
            if (pname.Length == 0)
            {
                Application.Exit();
            }
            decimal dee;

            dee = Shoot_delay.Value;
            Delay_BeforeShoot.Interval = Convert.ToInt32(dee);
        }
Exemplo n.º 4
0
 private void ambiance_CheckBox1_CheckedChanged(object sender, EventArgs e)
 {
     if (ambiance_CheckBox1.Checked == true)
     {
         Coredeafult.Start();
         Core_2.Start();
     }
     else
     {
         Coredeafult.Stop();
         Core_2.Stop();
     }
 }
Exemplo n.º 5
0
        public static Core_2 GenerateCore_2Client()
        {
            var client = new Core_2(URL.Core2URL);

            if (Settings.UseFormsAuth)
            {
                client.CookieContainer = Authenticate.GetCookieContainer();
            }
            else
            {
                client.Credentials = KeychainAccessor.NetworkCredential;
            }
            return(client);
        }
Exemplo n.º 6
0
        public static List <Book> StartDownloadBooks()
        {
            List <Book> bookList = null;

            try
            {
                Core_2           client  = GenerateCore_2Client();
                GetBooksReturn[] results = client.GetBooks();
                if (results != null)
                {
                    bookList = new List <Book>();

                    foreach (GetBooksReturn r in results)
                    {
                        if (!String.IsNullOrEmpty(r.ID))
                        {
                            Book book = new Book();
                            book.ID                 = r.ID.ToString();
                            book.Title              = r.Title.Replace(System.Environment.NewLine, " ");
                            book.Description        = r.Description.Replace(System.Environment.NewLine, " ");
                            book.ChapterCount       = r.ChapterCount;
                            book.PageCount          = r.PageCount;
                            book.SmallImageURL      = r.SmallImageURL;
                            book.LargeImageURL      = r.LargeImageURL;
                            book.ImageVersion       = r.ImageVersion;
                            book.Version            = Convert.ToInt32(r.Version);
                            book.ServerAddedDate    = r.DateAdded;
                            book.ServerModifiedDate = r.DateModified;
                            book.UserAddedDate      = DateTime.UtcNow;
                            book.UserModifiedDate   = DateTime.UtcNow;
                            book.Status             = Book.BookStatus.NONE;
                            book.Removed            = false;
                            book.Viewed             = false;
                            book.LastSyncedDate     = DateTime.MinValue;
                            bookList.Add(book);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.WriteLineDebugging("eBriefingService - StartDownloadBooks: {0}", ex.ToString());
            }

            return(bookList);
        }
Exemplo n.º 7
0
        public static List <Chapter> StartDownloadChapters(String bookID)
        {
            List <Chapter> chapterList = null;

            try
            {
                Core_2 client = GenerateCore_2Client();
                GetChaptersInBookReturn[] results = client.GetChaptersInBook(bookID);
                if (results != null)
                {
                    chapterList = new List <Chapter>();

                    int i = 0;
                    foreach (GetChaptersInBookReturn r in results)
                    {
                        Chapter chapter = new Chapter();
                        chapter.ID            = r.ID.ToString();
                        chapter.Title         = r.Title;
                        chapter.Description   = r.Description;
                        chapter.Pagecount     = r.PageCount;
                        chapter.SmallImageURL = r.SmallImageURL;
                        chapter.LargeImageURL = r.LargeImageURL;
                        chapter.ImageVersion  = r.ImageVersion;
                        chapter.FirstPageID   = r.FirstPageID;
                        chapter.ChapterNumber = ++i;

                        chapterList.Add(chapter);
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.WriteLineDebugging("eBriefingService - StartDownloadChapters: {0}", ex.ToString());
            }

            return(chapterList);
        }