////////////////////////////////////////////////////////////////////
        // Constructor
        // Default page is Letter, Legal or A4
        // Default page orientation is portrait or landscape
        // Unit of measure is: Point, Inch, cm, mm
        ////////////////////////////////////////////////////////////////////

        public PdfDocument
        (
            PaperType PaperType,                // Letter, Legal, A4
            Boolean Landscape,                  // if true width > height, if false height >= width
            UnitOfMeasure UnitOfMeasure         // Point, Inch, Cm, mm
        )
            : this()
        {
            // set scale factor (user units to points)
            ScaleFactor = UnitInPoints[(Int32)UnitOfMeasure];

            // get standard paper size
            PageSize.Width  = PaperTypeSize[(Int32)PaperType].Width;
            PageSize.Height = PaperTypeSize[(Int32)PaperType].Height;

            // for landscape swap width and height
            if (Landscape)
            {
                Double Temp = PageSize.Width;
                PageSize.Width  = PageSize.Height;
                PageSize.Height = Temp;
            }

            // exit
            return;
        }
예제 #2
0
 public ActionResult ADD(PaperType te)
 {
     try
     {
         if (ef.PaperTypes.FirstOrDefault(x => x.TypeName == te.TypeName && x.Shan == true) != null)
         {
             PaperType ta = ef.PaperTypes.FirstOrDefault(x => x.TypeName == te.TypeName);
             ta.Shan            = false;
             ef.Entry(ta).State = EntityState.Modified;
             if (ef.SaveChanges() > 0)
             {
                 return(Content("添加成功"));
             }
         }
         else
         {
             te.Shan            = false;
             ef.Entry(te).State = EntityState.Added;
             if (ef.SaveChanges() > 0)
             {
                 return(Content("添加成功"));
             }
         }
         return(Content(""));
     }
     catch
     {
         return(Content("出现错误"));
     }
 }
예제 #3
0
        private void InitPaperType(PaperType paperType)
        {
            CbPaperType1.Content = CurrentApp.GetLanguageInfo("3601T00070", "1");
            CbPaperType2.Content = CurrentApp.GetLanguageInfo("3601T00071", "2");
            CbPaperType3.Content = CurrentApp.GetLanguageInfo("3601T00072", "3");
            CbPaperType4.Content = CurrentApp.GetLanguageInfo("3601T00073", "4");
            CbPaperType5.Content = CurrentApp.GetLanguageInfo("3601T00074", "5");
            switch (paperType)
            {
            case PaperType.TypeOne:
                CbPaperType.SelectedIndex = 0;
                break;

            case PaperType.TypeTwo:
                CbPaperType.SelectedIndex = 1;
                break;

            case PaperType.TypeThree:
                CbPaperType.SelectedIndex = 2;
                break;

            case PaperType.TypeFour:
                CbPaperType.SelectedIndex = 3;
                break;

            case PaperType.TypeFive:
                CbPaperType.SelectedIndex = 4;
                break;
            }
        }
예제 #4
0
        public Ret <Entity> ExecuteAndRenderResult(HttpContext httpContext)
        {
            var action = (string)httpContext.Request.Query["action"];

            if (string.IsNullOrWhiteSpace(action))
            {
                var self   = httpContext.Request.GetRequestUri();
                var entity = HttpEntity.Create(self, HttpStatusCode.BadRequest,
                                               $"Nenhuma ação foi indicada. Faltou definir o parâmetro \"action\"?"
                                               );
                return(entity);
            }

            var method = PaperType.GetMethodIgnoreCase(action);

            if (method == null)
            {
                var self   = httpContext.Request.GetRequestUri();
                var entity = HttpEntity.Create(self, HttpStatusCode.NotImplemented,
                                               $"A ação solicitada não está disponível: \"{action}\""
                                               );
                return(entity);
            }

            return(ExecuteMethod(httpContext, method));
        }
예제 #5
0
        public VOAPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "VOA tiếng Việt", Type = PaperType.VOA, HomePage = "http://www.voatiengviet.com/", ImageSource = "ms-appx:///Assets/Logo/logo-voa.png" });
            Title = "VOA tiếng Việt";
            HomePage = "http://www.voatiengviet.com/";
            ImageSource = "ms-appx:///Assets/Logo/logo-voa.png";

            Categories.Add(new Category("Trang chủ", "http://www.voatiengviet.com/api/epiqq"));
            Categories.Add(new Category("Tin Tức", "http://www.voatiengviet.com/api/zkvypemovm"));
            Categories.Add(new Category("Việt Nam", "http://www.voatiengviet.com/api/z$uyietpv_"));
            Categories.Add(new Category("Thế giới", "http://www.voatiengviet.com/api/z_ty_erivy"));
            Categories.Add(new Category("Kinh tế", "http://www.voatiengviet.com/api/zquyvekivr"));
            Categories.Add(new Category("Nghệ thuật - giải trí", "http://www.voatiengviet.com/api/zguyre_pvo"));
            Categories.Add(new Category("Sức khỏe", "http://www.voatiengviet.com/api/z-tymevivy"));
            Categories.Add(new Category("Đời sống", "http://www.voatiengviet.com/api/zouytegivq"));
            Categories.Add(new Category("Giáo dục", "http://www.voatiengviet.com/api/ziuyrejivo"));
            Categories.Add(new Category("Phụ nữ", "http://www.voatiengviet.com/api/zrkypeupvy"));
            Categories.Add(new Category("Khoa học công nghệ", "http://www.voatiengviet.com/api/zkuytempvq"));
            Categories.Add(new Category("Thể thao", "http://www.voatiengviet.com/api/zjuyqeypvi"));
            Categories.Add(new Category("Người Việt hải ngoại", "http://www.voatiengviet.com/api/zruyyeuivt"));
            Categories.Add(new Category("Châu Á", "http://www.voatiengviet.com/api/z$qvvetkvr"));
            Categories.Add(new Category("Châu Âu", "http://www.voatiengviet.com/api/zmuyoe$ivm"));
            Categories.Add(new Category("Trung Đông", "http://www.voatiengviet.com/api/zvuy_eopvv"));
            Categories.Add(new Category("Châu Phi", "http://www.voatiengviet.com/api/zytyyeqivv"));
            Categories.Add(new Category("Châu Mỹ", "http://www.voatiengviet.com/api/zutyrepivi"));
            Categories.Add(new Category("Hoa Kỳ", "http://www.voatiengviet.com/api/z-uyoevpvm"));
            Categories.Add(new Category("Học tiếng Anh", "http://www.voatiengviet.com/api/zotyqegovi"));
            Categories.Add(new Category("Blog", "http://www.voatiengviet.com/api/zgvyme_ov_"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #6
0
        public ZingPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Zing news", Type = PaperType.Zing, HomePage = "http://news.zing.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-zing.png" });
            Title = "Zing news";
            HomePage = "http://news.zing.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-zing.png";

            Categories.Add(new Category("Tin tức mới nhất", "http://news.zing.vn/rss/tin-moi.rss"));
            Categories.Add(new Category("Trang chủ", "http://news.zing.vn/rss/trang-chu.rss"));
            Categories.Add(new Category("Xã hội", "http://feeds.feedburner.com/zingnews/xa-hoi"));
            Categories.Add(new Category("Thế giới", "http://feeds.feedburner.com/zingnews/the-gioi"));
            Categories.Add(new Category("Thị trường", "http://feeds.feedburner.com/zingnews/thi-truong"));
            Categories.Add(new Category("Pháp luật", "http://feeds.feedburner.com/zingnews/phap-luat"));
            Categories.Add(new Category("Thế giới sạch", "http://feeds.feedburner.com/zingnews/the-gioi-sach"));
            Categories.Add(new Category("Thể thao", "http://feeds.feedburner.com/zingnews/the-thao"));
            Categories.Add(new Category("Công nghệ", "http://feeds.feedburner.com/zingnews/cong-nghe"));
            Categories.Add(new Category("Ô tô - xe máy", "http://feeds.feedburner.com/zingnews/oto-xe-may"));
            Categories.Add(new Category("Giải trí", "http://feeds.feedburner.com/zingnews/giai-tri"));
            Categories.Add(new Category("Âm nhạc", "http://feeds.feedburner.com/zingnews/am-nhac"));
            Categories.Add(new Category("Phim ảnh", "http://feeds.feedburner.com/zingnews/phim-anh"));
            Categories.Add(new Category("Thời trang", "http://feeds.feedburner.com/zingnews/thoi-trang"));
            Categories.Add(new Category("Sống trẻ", "http://feeds.feedburner.com/zingnews/song-tre"));
            Categories.Add(new Category("Giáo dục", "http://feeds.feedburner.com/zingnews/giao-duc"));
            Categories.Add(new Category("Sức khỏe", "http://feeds.feedburner.com/zingnews/suc-khoe"));
            Categories.Add(new Category("Du lịch", "http://feeds.feedburner.com/zingnews/du-lich"));
            Categories.Add(new Category("Ẩm thực", "http://feeds.feedburner.com/zingnews/am-thuc"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #7
0
        public TienPhongPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Tiền phong", Type = PaperType.TienPhong, HomePage = "http://www.tienphong.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-tienphong.png" });
            Title = "Tiền phong";
            HomePage = "http://www.tienphong.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-tienphong.png";

            Categories.Add(new Category("Xã hội", "http://www.tienphong.vn/rss/xa-hoi-2.rss"));
            Categories.Add(new Category("Kinh tế", "http://www.tienphong.vn/rss/kinh-te-3.rss"));
            Categories.Add(new Category("Thế giới", "http://www.tienphong.vn/rss/the-gioi-5.rss"));
            Categories.Add(new Category("Giới trẻ", "http://www.tienphong.vn/rss/gioi-tre-4.rss"));
            Categories.Add(new Category("Pháp luật", "http://www.tienphong.vn/rss/phap-luat-12.rss"));
            Categories.Add(new Category("Thể thao", "http://www.tienphong.vn/rss/the-thao-11.rss"));
            Categories.Add(new Category("Văn nghệ", "http://www.tienphong.vn/rss/van-nghe-7.rss"));
            Categories.Add(new Category("Giải trí", "http://www.tienphong.vn/rss/giai-tri-36.rss"));
            Categories.Add(new Category("Giáo dục", "http://www.tienphong.vn/rss/giao-duc-71.rss"));
            Categories.Add(new Category("Khoa học", "http://www.tienphong.vn/rss/cong-nghe-45.rss"));
            Categories.Add(new Category("Người lính", "http://www.tienphong.vn/rss/hanh-trang-nguoi-linh-182.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #8
0
        public Kenh14Paper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Kênh 14", Type = PaperType.Kenh14, HomePage = "http://kenh14.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-kenh14.png" });
            Title = "Kênh 14";
            HomePage = "http://kenh14.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-kenh14.png";

            Categories.Add(new Category("Trang chủ", "http://kenh14.vn/home.rss"));
            Categories.Add(new Category("Star", "http://kenh14.vn/star.rss"));
            Categories.Add(new Category("Musik", "http://kenh14.vn/musik.rss"));
            Categories.Add(new Category("Cine", "http://kenh14.vn/cine.rss"));
            Categories.Add(new Category("Tv Show", "http://kenh14.vn/tv-show.rss"));
            Categories.Add(new Category("Fashion", "http://kenh14.vn/fashion.rss"));
            Categories.Add(new Category("Đời sống", "http://kenh14.vn/doi-song.rss"));
            Categories.Add(new Category("Xã hội", "http://kenh14.vn/xa-hoi.rss"));
            Categories.Add(new Category("Thế giới", "http://kenh14.vn/the-gioi.rss"));
            Categories.Add(new Category("Sức khỏe giới tính", "http://kenh14.vn/suc-khoe-gioi-tinh.rss"));
            Categories.Add(new Category("Made by me", "http://kenh14.vn/made-by-me.rss"));
            Categories.Add(new Category("Sport", "http://kenh14.vn/sport.rss"));
            Categories.Add(new Category("Khám phá", "http://kenh14.vn/kham-pha.rss"));
            Categories.Add(new Category("2-Tek", "http://kenh14.vn/2-tek.rss"));
            Categories.Add(new Category("Lạ & cool", "http://kenh14.vn/la-cool.rss"));
            Categories.Add(new Category("Học đường", "http://kenh14.vn/hoc-duong.rss"));
            Categories.Add(new Category("Video", "http://kenh14.vn/video.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #9
0
        /// <summary>
        /// 通过Id查询
        /// </summary>
        /// <param name="Id">主键Id</param>
        /// <returns>PaperType实体类对象</returns>
        public PaperType SelectById(int Id)
        {
            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@PaperTypeId", Id)
            };
            PaperType model = new PaperType();

            using (SqlDataReader dr = DBHelper.RunProcedure("PaperType_SelectById", param))
            {
                if (dr.Read())
                {
                    model.PaperTypeId = Convert.ToInt32(dr["PaperTypeId"]);
                    if (DBNull.Value != dr["PaperTypeName"])
                    {
                        model.PaperTypeName = dr["PaperTypeName"].ToString();
                    }
                    if (DBNull.Value != dr["OrderIndex"])
                    {
                        model.OrderIndex = Convert.ToInt32(dr["OrderIndex"]);
                    }
                    if (DBNull.Value != dr["ParentId"])
                    {
                        model.ParentId = Convert.ToInt32(dr["ParentId"]);
                    }
                    model.IsDelete = Convert.ToBoolean(dr["IsDelete"]);
                }
            }
            return(model);
        }
예제 #10
0
        /// <summary>
        /// 查看全部
        /// </summary>
        /// <returns>list集合</returns>
        public List <PaperType> SelectAll()
        {
            List <PaperType> list  = new List <PaperType>();
            PaperType        model = null;

            using (SqlDataReader dr = DBHelper.RunProcedure("PaperType_SelectAll", null))
            {
                while (dr.Read())
                {
                    model             = new PaperType();
                    model.PaperTypeId = Convert.ToInt32(dr["PaperTypeId"]);
                    if (DBNull.Value != dr["PaperTypeName"])
                    {
                        model.PaperTypeName = dr["PaperTypeName"].ToString();
                    }
                    if (DBNull.Value != dr["OrderIndex"])
                    {
                        model.OrderIndex = Convert.ToInt32(dr["OrderIndex"]);
                    }
                    if (DBNull.Value != dr["ParentId"])
                    {
                        model.ParentId = Convert.ToInt32(dr["ParentId"]);
                    }
                    model.IsDelete = Convert.ToBoolean(dr["IsDelete"]);
                    list.Add(model);
                }
            }
            return(list);
        }
예제 #11
0
        public BaoMoiPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Báo mới", Type = PaperType.BaoMoi, HomePage = "http://www.baomoi.com/", ImageSource = "ms-appx:///Assets/Logo/logo-baomoi.png" });
            Title = "Báo mới";
            HomePage = "http://www.baomoi.com/";
            ImageSource = "ms-appx:///Assets/Logo/logo-baomoi.png";

            Categories.Add(new Category("Xã hội", "http://www.baomoi.com/xahoi.rss"));
            Categories.Add(new Category("Thế giới", "http://www.baomoi.com/thegioi.rss"));
            Categories.Add(new Category("Văn hóa", "http://www.baomoi.com/vanhoa.rss"));
            Categories.Add(new Category("Kinh tế", "http://www.baomoi.com/kinhte.rss"));
            Categories.Add(new Category("Giáo dục", "http://www.baomoi.com/giaoduc.rss"));
            Categories.Add(new Category("Thể thao", "http://www.baomoi.com/thethao.rss"));
            Categories.Add(new Category("Giải trí", "http://www.baomoi.com/giaitri.rss"));
            Categories.Add(new Category("Pháp luật", "http://www.baomoi.com/phapluat.rss"));
            Categories.Add(new Category("Khoa học - công nghệ", "http://www.baomoi.com/khcn.rss"));
            Categories.Add(new Category("Sức khỏe", "http://www.baomoi.com/suckhoe.rss"));
            Categories.Add(new Category("Ô tô - Xe máy", "http://www.baomoi.com/otoxemay.rss"));
            Categories.Add(new Category("Nhà đất", "http://www.baomoi.com/nhadat.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #12
0
        public DSPLPaper(PaperType type)
            : base(type)
        {
            Title = "Dân trí";
            HomePage = "http://dantri.com.vn";
            ImageSource = "ms-appx:///Assets/Logo/logo-dantri.png";

            Categories.Add(new Category("Trang chủ", "http://dantri.com.vn/trangchu.rss"));
            Categories.Add(new Category("Sức khỏe", "http://dantri.com.vn/suc-khoe.rss"));
            Categories.Add(new Category("Xã hội", "http://dantri.com.vn/xa-hoi.rss"));
            Categories.Add(new Category("Giải trí", "http://dantri.com.vn/giai-tri.rss"));
            Categories.Add(new Category("Giáo dục - Khuyến học", "http://dantri.com.vn/giao-duc-khuyen-hoc.rss"));
            Categories.Add(new Category("Thể thao", "http://dantri.com.vn/the-thao.rss"));
            Categories.Add(new Category("Thế giới", "http://dantri.com.vn/the-gioi.rss"));
            Categories.Add(new Category("Kinh doanh", "http://dantri.com.vn/kinh-doanh.rss"));
            Categories.Add(new Category("Ô tô - Xe máy", "http://dantri.com.vn/o-to-xe-may.rss"));
            Categories.Add(new Category("Sức mạnh số", "http://dantri.com.vn/suc-manh-so.rss"));
            Categories.Add(new Category("Tình yêu - Giới tính", "http://dantri.com.vn/tinh-yeu-gioi-tinh.rss"));
            Categories.Add(new Category("Chuyện lạ", "http://dantri.com.vn/chuyen-la.rss"));
            Categories.Add(new Category("Việc làm", "http://dantri.com.vn/viec-lam.rss"));
            Categories.Add(new Category("Nhịp sống trẻ", "http://dantri.com.vn/nhip-song-tre.rss"));
            Categories.Add(new Category("Tấm lòng nhân ái", "http://dantri.com.vn/tam-long-nhan-ai.rss"));
            Categories.Add(new Category("Pháp luật", "http://dantri.com.vn/phap-luat.rss"));
            Categories.Add(new Category("Bạn đọc", "http://dantri.com.vn/ban-doc.rss"));
            Categories.Add(new Category("Diễn đàn", "http://dantri.com.vn/dien-dan.rss"));
            Categories.Add(new Category("Blog", "http://dantri.com.vn/blog.rss"));
            Categories.Add(new Category("Văn hóa", "http://dantri.com.vn/van-hoa.rss"));
            Categories.Add(new Category("Du học", "http://dantri.com.vn/du-hoc.rss"));
            Categories.Add(new Category("Đời sống", "http://dantri.com.vn/doi-song.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #13
0
        /// <summary>
        /// 通过条件查询
        /// </summary>
        /// <param name="WhereString">查询条件</param>
        /// <returns>PaperType实体类对象</returns>
        public List <PaperType> SelectByWhere(string WhereString)
        {
            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@where", WhereString)
            };
            List <PaperType> list  = new List <PaperType>();
            PaperType        model = null;

            using (SqlDataReader dr = DBHelper.RunProcedure("PaperType_SelectByWhere", param))
            {
                while (dr.Read())
                {
                    model             = new PaperType();
                    model.PaperTypeId = Convert.ToInt32(dr["PaperTypeId"]);
                    if (DBNull.Value != dr["PaperTypeName"])
                    {
                        model.PaperTypeName = dr["PaperTypeName"].ToString();
                    }
                    if (DBNull.Value != dr["OrderIndex"])
                    {
                        model.OrderIndex = Convert.ToInt32(dr["OrderIndex"]);
                    }
                    if (DBNull.Value != dr["ParentId"])
                    {
                        model.ParentId = Convert.ToInt32(dr["ParentId"]);
                    }
                    model.IsDelete = Convert.ToBoolean(dr["IsDelete"]);
                    list.Add(model);
                }
            }
            return(list);
        }
예제 #14
0
        /// <summary>
        /// set section pagesize to portrait of given paper type
        /// </summary>
        public static void SetPaper(this SectionProperties section, PaperType paper)
        {
            var pageSize = section.Descendants <PageSize>().FirstOrDefault();

            if (pageSize == null)
            {
                pageSize = section.AppendChild(new PageSize());
            }
            int w = 0;
            int h = 0;

            switch (paper)
            {
            case PaperType.A4:
            {
                w = 210;
                h = 297;
            }
            break;

            default: throw new Exception($"unsupported paper type {paper}");
            }
            pageSize.Width  = (uint)w.MMToTwip();
            pageSize.Height = (uint)h.MMToTwip();
            pageSize.Orient = new EnumValue <PageOrientationValues>(PageOrientationValues.Portrait);
        }
예제 #15
0
    protected void Save_Btn(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(base.Request.QueryString["tid"]))
        {
            PaperTypeInfo paperTypeInfo = this.ViewState["sd"] as PaperTypeInfo;
            paperTypeInfo.Notes    = this.Notes.Value;
            paperTypeInfo.TypeName = this.TypeName.Value.Replace("#", "").Replace(",", "");
            paperTypeInfo.Orders   = Convert.ToInt32(this.Orders.Value);
            if (Convert.ToInt32(this.parentID.SelectedValue) != paperTypeInfo.id)
            {
                paperTypeInfo.ParentID = Convert.ToInt32(this.parentID.SelectedValue);
            }
            PaperType.Init().Update(paperTypeInfo);
        }
        else
        {
            PaperTypeInfo paperTypeInfo = new PaperTypeInfo();
            paperTypeInfo.TypeName = this.TypeName.Value.Replace("#", "").Replace(",", "");
            paperTypeInfo.Notes    = this.Notes.Value;
            paperTypeInfo.Orders   = Convert.ToInt32(this.Orders.Value);
            paperTypeInfo.ParentID = Convert.ToInt32(this.parentID.SelectedValue);
            PaperType.Init().Add(paperTypeInfo);
        }
        string str = HttpContext.Current.Server.HtmlEncode("您好!档案分类保存成功!");

        base.Response.Redirect("~/InfoTip/Operate_Success.aspx?returnpage=../Manage/Paper/PaperType_List.aspx&tip=" + str);
    }
예제 #16
0
        PaperType GetPaperType(double dHeight, double dWidth)
        {
            PaperType type = PaperType.Custom;

            if (dHeight == 841 && dWidth == 1189)
            {
                type = PaperType.A0;
            }
            else if (dHeight == 594 && dWidth == 841)
            {
                type = PaperType.A1;
            }
            else if (dHeight == 420 && dWidth == 594)
            {
                type = PaperType.A2;
            }
            else if (dHeight == 297 && dWidth == 420)
            {
                type = PaperType.A3;
            }
            else if (dHeight == 210 && dWidth == 297)
            {
                type = PaperType.A4;
            }

            return(type);
        }
예제 #17
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,Name")] PaperType paperType)
        {
            if (id != paperType.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(paperType);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PaperTypeExists(paperType.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(paperType));
        }
예제 #18
0
    /// <summary>
    /// 获取纸张大小,单位:Twip
    /// <para>换算关系:1英寸=1440缇  1厘米=567缇  1磅=20缇  1像素=15缇</para>
    /// </summary>
    /// <param name="type"></param>
    /// <returns></returns>
    public static Tuple <int, int> GetPaperSize(PaperType type)
    {
        Tuple <int, int> res = null;

        switch (type)
        {
        case PaperType.A4_V:
            res = new Tuple <int, int>(11906, 16838);
            break;

        case PaperType.A4_H:
            res = new Tuple <int, int>(16838, 11906);
            break;

        case PaperType.A5_V:
            res = new Tuple <int, int>(8390, 11906);
            break;

        case PaperType.A5_H:
            res = new Tuple <int, int>(11906, 8390);
            break;

        case PaperType.A6_V:
            res = new Tuple <int, int>(5953, 8390);
            break;

        case PaperType.A6_H:
            res = new Tuple <int, int>(8390, 5953);
            break;
        }
        return(res);
    }
예제 #19
0
        public VietnamnetPaper(PaperType type)
            : base(type)
        {
            Title = "Vietnamnet";
            HomePage = "http://vietnamnet.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-vietnamnet.png";

            Categories.Add(new Category("Trang chủ", "http://vietnamnet.vn/rss/home.rss"));
            Categories.Add(new Category("Xã hội", "http://vietnamnet.vn/rss/xa-hoi.rss"));
            Categories.Add(new Category("Công nghệ", "http://vietnamnet.vn/rss/cong-nghe-thong-tin-vien-thong.rss"));
            Categories.Add(new Category("Kinh doanh", "http://vietnamnet.vn/rss/kinh-doanh.rss"));
            Categories.Add(new Category("Giáo dục", "http://vietnamnet.vn/rss/giao-duc.rss"));
            Categories.Add(new Category("Chính trị", "http://vietnamnet.vn/rss/chinh-tri.rss"));
            Categories.Add(new Category("Giải trí", "http://vietnamnet.vn/rss/giai-tri.rss"));
            Categories.Add(new Category("Sức khỏe", "http://vietnamnet.vn/rss/suc-khoe.rss"));
            Categories.Add(new Category("Thể thao", "http://vietnamnet.vn/rss/the-thao.rss"));
            Categories.Add(new Category("Đời sống", "http://vietnamnet.vn/rss/doi-song.rss"));
            Categories.Add(new Category("Quốc tế", "http://vietnamnet.vn/rss/quoc-te.rss"));
            Categories.Add(new Category("Bất động sản", "http://vietnamnet.vn/rss/bat-dong-san.rss"));
            Categories.Add(new Category("Bạn đọc", "http://vietnamnet.vn/rss/ban-doc-phap-luat.rss"));
            Categories.Add(new Category("Tin mới nóng", "http://vietnamnet.vn/rss/moi-nong.rss"));
            Categories.Add(new Category("Tin nổi bật", "http://vietnamnet.vn/rss/tin-noi-bat.rss"));
            Categories.Add(new Category("Tuần Việt Nam", "http://vietnamnet.vn/rss/tuanvietnam.rss"));
            Categories.Add(new Category("Góc nhìn thẳng", "http://vietnamnet.vn/rss/goc-nhin-thang.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #20
0
        public async Task <IActionResult> Edit(int id, [Bind("PaperTypeID,Name,Description,IsActive,AddedDate,UpdatedDate,AddedUserID,UpdatedUserID")] PaperType paperType)
        {
            if (id != paperType.PaperTypeID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    paperType.UpdatedDate   = DateTime.Now;
                    paperType.UpdatedUserID = Int32.Parse(HttpContext.Session.GetString("UserID"));
                    _context.Update(paperType);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PaperTypeExists(paperType.PaperTypeID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["AddedUserID"]   = new SelectList(_context.Users, "UserID", "Login", paperType.AddedUserID);
            ViewData["UpdatedUserID"] = new SelectList(_context.Users, "UserID", "Login", paperType.UpdatedUserID);
            return(View(paperType));
        }
예제 #21
0
        public PageDimensions(PaperType paperType, PageOrientation orientation, int dpi = 72)
        {
            _paperType   = paperType;
            _orientation = orientation;
            _dpi         = dpi;

            _unitInPoints = new float[]
            {
                1.0f,                   // Point
                dpi,                    // Inch
                dpi / 2.54f,            // cm
                dpi / 25.4f,            // mm
            };

            _size = PaperTypeSize.GetSize(_paperType, _dpi);

            if (_orientation == PageOrientation.Landscape)
            {
                _size = new Size(_size.Height, _size.Width);
            }

            _marginTop    = (int)ConvertUnits(0.15f, UnitOfMeasure.Inch, UnitOfMeasure.Point);
            _marginBottom = _marginTop;

            _marginLeft  = (int)ConvertUnits(0.5f, UnitOfMeasure.Inch, UnitOfMeasure.Point);
            _marginRight = _marginLeft;
        }
예제 #22
0
        /// <summary>
        /// create new empty doc
        /// </summary>
        public static void Create(string pathfilename,
                                  PaperType paperType = PaperType.A4,
                                  PageOrientationValues orientation = PageOrientationValues.Portrait,
                                  double marginLeftMM   = 0,
                                  double marginTopMM    = 0,
                                  double marginRightMM  = 0,
                                  double marginBottomMM = 0)
        {
            using (var doc = WordprocessingDocument.Create(pathfilename, WordprocessingDocumentType.Document))
            {
                var main = doc.AddMainDocumentPart();
                main.Document = new Document();

                var body = main.Document.AppendChild(new Body());

                /*var p = body.AppendChild(new Paragraph());
                 * var r = p.AppendChild(new Run());
                 * r.AppendChild(new Text(DateTime.Now.ToString()));*/

                var sect = body.AppendChild(new SectionProperties());
                sect.SetPaper(paperType);
                sect.SetOrientation(orientation);
                sect.SetMargin(marginLeftMM, marginTopMM, marginRightMM, marginBottomMM);

                doc.Save();
            }
        }
예제 #23
0
        private IEnumerable <MethodInfo> MakeActions()
        {
            var knownMethods = IndexMethod.AsSingle().Concat(Formatters);
            var methods      = PaperType.GetMethods(BindingFlags.Public | BindingFlags.Instance).Except(knownMethods);

            foreach (var method in methods)
            {
                if (method.DeclaringType.Namespace.StartsWith("System"))
                {
                    continue;
                }

                if (typeof(void).IsAssignableFrom(method.ReturnType) ||
                    typeof(Ret).IsAssignableFrom(method.ReturnType)

                    || typeof(string).IsAssignableFrom(method.ReturnType) ||
                    typeof(Href).IsAssignableFrom(method.ReturnType) ||
                    typeof(Uri).IsAssignableFrom(method.ReturnType) ||
                    typeof(UriString).IsAssignableFrom(method.ReturnType)

                    || typeof(Ret <string>).IsAssignableFrom(method.ReturnType) ||
                    typeof(Ret <Href>).IsAssignableFrom(method.ReturnType) ||
                    typeof(Ret <Uri>).IsAssignableFrom(method.ReturnType) ||
                    typeof(Ret <UriString>).IsAssignableFrom(method.ReturnType))
                {
                    yield return(method);
                }
            }
        }
예제 #24
0
        public VietnamPlusPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "VietnamPlus", Type = PaperType.VietnamPlus, HomePage = "http://www.vietnamplus.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-vnp.png" });
            Title = "VietnamPlus";
            HomePage = "http://www.vietnamplus.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-vnp.png";

            Categories.Add(new Category("Trang chủ", "http://www.vietnamplus.vn/rss/news.rss"));
            Categories.Add(new Category("Kinh tế", "http://www.vietnamplus.vn/rss/kinhte.rss"));
            Categories.Add(new Category("Chính trị", "http://www.vietnamplus.vn/rss/chinhtri.rss"));
            Categories.Add(new Category("Xã hội", "http://www.vietnamplus.vn/rss/xahoi.rss"));
            Categories.Add(new Category("Thế giới", "http://www.vietnamplus.vn/rss/thegioi.rss"));
            Categories.Add(new Category("Đời sống", "http://www.vietnamplus.vn/rss/doisong.rss"));
            Categories.Add(new Category("Văn hóa", "http://www.vietnamplus.vn/rss/vanhoa.rss"));
            Categories.Add(new Category("Thể thao", "http://www.vietnamplus.vn/rss/thethao.rss"));
            Categories.Add(new Category("Khoa học", "http://www.vietnamplus.vn/rss/khoahoc.rss"));
            Categories.Add(new Category("Công nghệ", "http://www.vietnamplus.vn/rss/congnghe.rss"));
            Categories.Add(new Category("Chuyện lạ", "http://www.vietnamplus.vn/rss/chuyenla.rss"));
            Categories.Add(new Category("Rao vặt", "http://www.vietnamplus.vn/rss/raovat.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #25
0
        public VnExpressPaper(PaperType type)
            : base(type)
        {
            Title = "VnExpress";
            HomePage = "http://vnexpress.net";
            ImageSource = "ms-appx:///Assets/Logo/logo-vne.png";

            Categories = new ObservableCollection<Category>();
            Categories.Add(new Category("Trang chủ", "http://vnexpress.net/rss/tin-moi-nhat.rss"));
            Categories.Add(new Category("Thời sự", "http://vnexpress.net/rss/thoi-su.rss"));
            Categories.Add(new Category("Thế giới", "http://vnexpress.net/rss/the-gioi.rss"));
            Categories.Add(new Category("Kinh doanh", "http://vnexpress.net/rss/kinh-doanh.rss"));
            Categories.Add(new Category("Giải trí", "http://vnexpress.net/rss/giai-tri.rss"));
            Categories.Add(new Category("Thể thao", "http://vnexpress.net/rss/the-thao.rss"));
            Categories.Add(new Category("Pháp luật", "http://vnexpress.net/rss/phap-luat.rss"));
            Categories.Add(new Category("Giáo dục", "http://vnexpress.net/rss/giao-duc.rss"));
            Categories.Add(new Category("Sức khỏe", "http://vnexpress.net/rss/suc-khoe.rss"));
            Categories.Add(new Category("Gia đình", "http://vnexpress.net/rss/gia-dinh.rss"));
            Categories.Add(new Category("Du lịch", "http://vnexpress.net/rss/du-lich.rss"));
            Categories.Add(new Category("Khoa học", "http://vnexpress.net/rss/khoa-hoc.rss"));
            Categories.Add(new Category("Số hóa", "http://vnexpress.net/rss/so-hoa.rss"));
            Categories.Add(new Category("Xe", "http://vnexpress.net/rss/oto-xe-may.rss"));
            Categories.Add(new Category("Cộng đồng", "http://vnexpress.net/rss/cong-dong.rss"));
            Categories.Add(new Category("Tâm sự", "http://vnexpress.net/rss/tam-su.rss"));
            Categories.Add(new Category("Cười", "http://vnexpress.net/rss/cuoi.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #26
0
        public BBCPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "BBC tiếng Việt", Type = PaperType.BBC, HomePage = "http://www.bbc.com/vietnamese", ImageSource = "ms-appx:///Assets/Logo/logo-bbc.png" });
            Title = "BBC tiếng Việt";
            HomePage = "http://www.bbc.com/vietnamese";
            ImageSource = "ms-appx:///Assets/Logo/logo-bbc.png";

            Categories.Add(new Category("Trang chủ", "http://www.bbc.com/vietnamese/index.xml"));
            Categories.Add(new Category("Việt Nam", "http://www.bbc.com/vietnamese/vietnam/index.xml"));
            Categories.Add(new Category("Thế giới", "http://www.bbc.com/vietnamese/world/index.xml"));
            Categories.Add(new Category("Diễn đàn", "http://www.bbc.com/vietnamese/topics/forum/index.xml"));
            Categories.Add(new Category("Kinh tế", "http://www.bbc.com/vietnamese/business/index.xml"));
            Categories.Add(new Category("Nhịp sống mới", "http://www.bbc.com/vietnamese/topics/magazine/index.xml"));
            Categories.Add(new Category("Thể thao", "http://www.bbc.com/vietnamese/sport/index.xml"));
            Categories.Add(new Category("Học tiếng Anh", "http://www.bbc.com/vietnamese/english/index.xml"));
            Categories.Add(new Category("Hình ảnh", "http://www.bbc.com/vietnamese/topics/photo/index.xml"));
            Categories.Add(new Category("Audio", "http://www.bbc.com/vietnamese/topics/audio/index.xml"));
            Categories.Add(new Category("Video", "http://www.bbc.com/vietnamese/topics/video/index.xml"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #27
0
 public GenkPaper(PaperType type)
     : base(type)
 {
     //FrontPagePaper.Add(new VnExpressPaper() { Title = "Genk", Type = PaperType.Genk, HomePage = "http://genk.vn", ImageSource = "ms-appx:///Assets/Logo/logo-genk.png" });
     Title = "Genk";
     HomePage = "http://genk.vn";
     ImageSource = "ms-appx:///Assets/Logo/logo-genk.png";
 }
예제 #28
0
        private void _typesView_UserDeletedRow(object sender, DataGridViewRowEventArgs e)
        {
            PaperType type = e.Row.Tag as PaperType;

            PriceManager.RemovePaperType(type);

            ValidateCells(null);
        }
예제 #29
0
        public ChangeOrderParams()
        {
            InitializeComponent();

            _currentOrder   = (Order)ExecutionEngine.Context[Constants.OrderContextName];
            _orderPaperType = _currentOrder == null ? ExecutionEngine.Instance.PaperTypes[0] : _currentOrder.OrderPaperType;
            _orderCropMode  = _currentOrder == null ? Constants.CropToFillModeName : _currentOrder.CropMode;
        }
예제 #30
0
 private void InitPaperType(PaperType paperType)
 {
     TypeItem1.Content          = CurrentApp.GetLanguageInfo("3603T00103", "1");
     TypeItem2.Content          = CurrentApp.GetLanguageInfo("3603T00104", "2");
     TypeItem3.Content          = CurrentApp.GetLanguageInfo("3603T00105", "3");
     TypeItem4.Content          = CurrentApp.GetLanguageInfo("3603T00106", "4");
     TypeItem5.Content          = CurrentApp.GetLanguageInfo("3603T00107", "5");
     CmbPaperType.SelectedIndex = (int)paperType;
 }
예제 #31
0
    protected void Del_Btn(object sender, EventArgs e)
    {
        LinkButton    linkButton      = sender as LinkButton;
        string        commandArgument = linkButton.CommandArgument;
        PaperTypeInfo byId            = PaperType.Init().GetById(Convert.ToInt32(commandArgument));

        this.DeleteDep(byId);
        this.Show();
    }
예제 #32
0
    private void Show(string did)
    {
        PaperTypeInfo byId = PaperType.Init().GetById(Convert.ToInt32(did));

        this.ViewState["sd"]        = byId;
        this.parentID.SelectedValue = string.Concat(byId.ParentID);
        this.TypeName.Value         = byId.TypeName;
        this.Notes.Value            = byId.Notes;
        this.Orders.Value           = string.Concat(byId.Orders);
    }
예제 #33
0
        public void CreatePaperType()
        {
            PaperType paperType = new PaperType();

            paperType.Color = Color.Red;
            paperType.Type  = "Karticka";

            paperType.Save();
            paperType.Delete();
        }
예제 #34
0
 /// <summary>
 /// 增加
 /// </summary>
 /// <param name="PaperType">PaperType实体对象</param>
 /// <returns>bool值,判断是否操作成功</returns>
 public bool Add(PaperType model)
 {
     SqlParameter[] param = new SqlParameter[]
     {
         new SqlParameter("@PaperTypeName", model.PaperTypeName),
         new SqlParameter("@OrderIndex", model.OrderIndex),
         new SqlParameter("@ParentId", model.ParentId),
         new SqlParameter("@IsDelete", model.IsDelete)
     };
     return(DBHelper.ExecuteNonQuery("PaperType_Add", param));
 }
예제 #35
0
        public ActionResult Paper(PaperType type = PaperType.LWK, int nowpageNum = 1)
        {
            PaperContext context = new PaperContext()
            {
                Type    = type,
                NowPage = nowpageNum
            };

            context.Init();
            return(View(context));
        }
예제 #36
0
 /// <summary>
 /// 增加
 /// </summary>
 /// <param name="PaperType">PaperType实体对象</param>
 /// <returns>int值,返回自增ID</returns>
 public int AddReturnId(PaperType model)
 {
     SqlParameter[] param = new SqlParameter[]
     {
         new SqlParameter("@PaperTypeName", model.PaperTypeName),
         new SqlParameter("@OrderIndex", model.OrderIndex),
         new SqlParameter("@ParentId", model.ParentId),
         new SqlParameter("@IsDelete", model.IsDelete)
     };
     return(Convert.ToInt32(DBHelper.ExecuteScalar("PaperType_AddReturnId", param)));
 }
예제 #37
0
        public async Task <IActionResult> Create([Bind("ID,Name")] PaperType paperType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(paperType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(paperType));
        }
예제 #38
0
    private void DeleteDep(PaperTypeInfo sdi)
    {
        IList all = PaperType.Init().GetAll("ParentID=" + sdi.id, null);

        for (int i = 0; i < all.Count; i++)
        {
            PaperTypeInfo sdi2 = all[i] as PaperTypeInfo;
            this.DeleteDep(sdi2);
        }
        this.DeletePaper(sdi.id);
        PaperType.Init().Delete(sdi.id);
    }
예제 #39
0
        /// <summary>
        /// 刷新状态栏
        /// </summary>
        /// <param name="paper"></param>
        private void RefreshWallPaper(PaperType paper)
        {
            ((TextBlock)Name.Children[1]).Text   = paper.Name;
            ((TextBlock)Size.Children[1]).Text   = paper.Size.Width.ToString() + "x" + paper.Size.Height.ToString();
            ((TextBlock)Weight.Children[1]).Text = paper.Weight.ToString() + " KB";
            ((TextBlock)Time.Children[1]).Text   = paper.Time.Year.ToString() + "-" +
                                                   paper.Time.Month.ToString() + "-" + paper.Time.Day.ToString();
            Bitmap bmpWallpaper = (Bitmap)System.Drawing.Image.FromFile(paper.Path);

            ImageWallPaper.Source = Imaging.CreateBitmapSourceFromHBitmap(bmpWallpaper.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
            WallPaperNow          = paper;
        }
예제 #40
0
        public AnNinhThuDoPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "An ninh thủ đô", Type = PaperType.AnNinhThuDo, HomePage = "http://anninhthudo.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-antd.png" });
            Title = "An ninh thủ đô";
            HomePage = "http://anninhthudo.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-antd.png";

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #41
0
        public ActionResult Laws(PaperType type = PaperType.LWK, int nowpageNum = 1)
        {
            ViewBag.Title = PaperContext.TypeArrayName[(int)type];

            PaperContext context = new PaperContext()
            {
                Type    = type,
                NowPage = nowpageNum
            };

            context.Init();
            return(View(context));
        }
예제 #42
0
        public DatVietPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Đất Việt", Type = PaperType.DatViet, HomePage = "http://baodatviet.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-datviet.png" });
            Title = "Đất Việt";
            HomePage = "http://baodatviet.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-datviet.png";

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #43
0
        public QDNDPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Quân đội nhân dân", Type = PaperType.QuanDoiNhanDan, HomePage = "http://www.qdnd.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-qdnd.png" });
            Title = "Quân đội nhân dân";
            HomePage = "http://www.qdnd.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-qdnd.png";

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #44
0
        public static Size GetSize(PaperType paperType, int dpi = 72)
        {
            switch (paperType)
            {
            case PaperType.Legal:
                return(new Size((int)(8.5 * dpi), 14 * dpi));

            case PaperType.A4:
                return(new Size((int)(21.0f * 72 / 2.54f), (int)(29.7f * 72 / 2.54f)));

            default:
                return(new Size((int)(8.5 * dpi), 11 * dpi));
            }
        }
예제 #45
0
        public NhipCauDauTuPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Nhịp cầu đầu tư", Type = PaperType.NhipCauDauTu, HomePage = "http://nhipcaudautu.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-ncdt.png" });

            Title = "Nhịp cầu đầu tư";
            HomePage = "http://nhipcaudautu.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-ncdt.png";

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #46
0
        public TinhTePaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Tinh tế", Type = PaperType.TinhTế, HomePage = "http://tinhte.vn", ImageSource = "ms-appx:///Assets/Logo/logo-tinhte.png" });
            Title = "Tinh tế";
            HomePage = "http://tinhte.vn";
            ImageSource = "ms-appx:///Assets/Logo/logo-tinhte.png";

            Categories.Add(new Category("Trang chủ", "https://tinhte.vn/rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #47
0
        public TheGioiGamePaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Thế giới Game", Type = PaperType.TheGioiGame, HomePage = "http://thegioigame.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-thegioigame.png" });
            Title = "Thế giới Game";
            HomePage = "http://thegioigame.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-thegioigame.png";

            Categories.Add(new Category("Trang chủ", "http://thegioigame.vn/feed"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #48
0
        public WebTreThoPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Web trẻ thơ", Type = PaperType.WebTreTho, HomePage = "http://www.webtretho.com/", ImageSource = "ms-appx:///Assets/Logo/logo-webtretho.png" });
            Title = "Web trẻ thơ";
            HomePage = "http://www.webtretho.com/";
            ImageSource = "ms-appx:///Assets/Logo/logo-webtretho.png";

            Categories.Add(new Category("Trang chủ", "http://www.webtretho.com/forum/external.php?type=RSS2"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #49
0
        public SoHoaPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Số hóa", Type = PaperType.SốHóa, HomePage = "http://sohoa.vnexpress.net", ImageSource = "ms-appx:///Assets/Logo/logo-sohoa.png" });
            Title = "Số hóa";
            HomePage = "http://sohoa.vnexpress.net";
            ImageSource = "ms-appx:///Assets/Logo/logo-sohoa.png";

            Categories.Add(new Category("Trang chủ", "http://vnexpress.net/rss/so-hoa.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #50
0
        public QuanTriMangPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Quản trị mạng", Type = PaperType.QuanTriMang, HomePage = "http://quantrimang.com/", ImageSource = "ms-appx:///Assets/Logo/logo-quantrimang.png" });
            Title = "Quản trị mạng";
            HomePage = "http://quantrimang.com/";
            ImageSource = "ms-appx:///Assets/Logo/logo-quantrimang.png";

            Categories.Add(new Category("Trang chủ", "http://quantrimang.com/rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
        public CongAnNhanDanPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Công An Nhân Dân", Type = PaperType.CongAnNhanDan, HomePage = "http://cand.com.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-cand.png" });
            Title = "Công An Nhân Dân";
            HomePage = "http://cand.com.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-cand.png";

            Categories.Add(new Category("Trang chủ", "http://cand.com.vn/rss/trang-chu"));
            Categories.Add(new Category("Thời sự - Chính trị", "http://cand.com.vn/rss/thoi-su"));
            Categories.Add(new Category("Tin tức - Sự kiện", "http://cand.com.vn/rss/Su-kien-Binh-luan-thoi-su"));
            Categories.Add(new Category("Nhịp cầu nhân ái", "http://cand.com.vn/rss/nhip-cau-nhan-ai"));
            Categories.Add(new Category("Kinh tế", "http://cand.com.vn/rss/Kinh-te"));
            Categories.Add(new Category("Địa ốc", "http://cand.com.vn/rss/dia-oc"));
            Categories.Add(new Category("Tài chính - Ngân hàng", "http://cand.com.vn/rss/tai-chinh-ngan-hang"));
            Categories.Add(new Category("Doanh nghiệp", "http://cand.com.vn/rss/doanh-nghiep"));
            Categories.Add(new Category("Khoa học - Công nghệ", "http://cand.com.vn/rss/Khoa-hoc"));
            Categories.Add(new Category("Công nghệ", "http://cand.com.vn/rss/the-gioi-so"));
            Categories.Add(new Category("Thế giới phương tiện", "http://cand.com.vn/rss/the-gioi-phuong-tien"));
            Categories.Add(new Category("Công an trong lòng dân", "http://cand.com.vn/rss/Cong-an"));
            Categories.Add(new Category("Gương sáng", "http://cand.com.vn/rss/Guong-sang"));
            Categories.Add(new Category("Hoạt động LL CAND", "http://cand.com.vn/rss/Hoat-dong-LL-CAND"));
            Categories.Add(new Category("Xã hội", "http://cand.com.vn/rss/Xa-hoi"));
            Categories.Add(new Category("Phóng sự - Tư liệu", "http://cand.com.vn/rss/Phong-su-tu-lieu"));
            Categories.Add(new Category("Y tế", "http://cand.com.vn/rss/y-te"));
            Categories.Add(new Category("Giáo dục", "http://cand.com.vn/rss/giao-duc"));
            Categories.Add(new Category("Giao thông", "http://cand.com.vn/rss/Giao-thong"));
            Categories.Add(new Category("Quốc tế", "http://cand.com.vn/rss/Quoc-te"));
            Categories.Add(new Category("Hồ sơ - Tư liệu", "http://cand.com.vn/rss/tu-lieu-quoc-te"));
            Categories.Add(new Category("Bình luận quốc tế", "http://cand.com.vn/rss/Binh-luan-quoc-te"));
            Categories.Add(new Category("Pháp luật", "http://cand.com.vn/rss/Phap-luat"));
            Categories.Add(new Category("Thông tin pháp luật", "http://cand.com.vn/rss/Thong-tin-phap-luat"));
            Categories.Add(new Category("Bản tin 113", "http://cand.com.vn/rss/ANTT"));
            Categories.Add(new Category("Thể thao", "http://cand.com.vn/rss/The-thao"));
            Categories.Add(new Category("Ống nhòm", "http://cand.com.vn/rss/so-tay-the-thao"));
            Categories.Add(new Category("Thể thao quốc tế", "http://cand.com.vn/rss/The-thao-quoc-te"));
            Categories.Add(new Category("Thư giãn", "http://cand.com.vn/rss/Thu-gian"));
            Categories.Add(new Category("Đời sống", "http://cand.com.vn/rss/doi-song"));
            Categories.Add(new Category("Hôn nhân gia đình", "http://cand.com.vn/rss/hon-nhan-gia-dinh"));
            Categories.Add(new Category("Bạn đọc & CAND", "http://cand.com.vn/rss/Ban-doc-cand"));
            Categories.Add(new Category("Văn hóa - Giải trí", "http://cand.com.vn/rss/van-hoa"));
            Categories.Add(new Category("Video Clip", "http://cand.com.vn/rss/video"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
        public ThongTinCongNghePaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Thông tin công nghệ", Type = PaperType.ThongTinCongNghe, HomePage = "http://www.thongtincongnghe.com/", ImageSource = "ms-appx:///Assets/Logo/logo-ttcn.png" });

            Title = "Thông tin công nghệ";
            HomePage = "http://www.thongtincongnghe.com/";
            ImageSource = "ms-appx:///Assets/Logo/logo-ttcn.png";

            Categories.Add(new Category("Trang chủ", "http://feeds.thongtincongnghe.com/ttcn"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #53
0
        public BongDaPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Bóng đá", Type = PaperType.BongDa, HomePage = "http://www.bongda.com.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-bongda.png" });

            Title = "Bóng đá";
            HomePage = "http://www.bongda.com.vn";
            ImageSource = "ms-appx:///Assets/Logo/logo-bongda.png";

            Categories.Add(new Category("Trang chủ", "http://www.bongda.com.vn/feed/"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #54
0
        public VietBaoPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Việt báo", Type = PaperType.VietBao, HomePage = "http://vietbao.vn", ImageSource = "ms-appx:///Assets/Logo/logo-vietbao.png" });
            Title = "Việt báo";
            HomePage = "http://dantri.com.vn";
            ImageSource = "ms-appx:///Assets/Logo/logo-vietbao.png";

            Categories.Add(new Category("Trang Nhất", "http://vietbao.vn/rss2/trang-nhat.rss"));
            Categories.Add(new Category("Tin Mới Nhất trên Việt Báo", "http://vietbao.vn/rss2/tinmoi.rss"));
            Categories.Add(new Category("An Ninh - Pháp Luật", "http://vietbao.vn/live/An-ninh-Phap-luat/rss.xml"));
            Categories.Add(new Category("Blog Hay", "http://vietbao.vn/live/Blog/rss.xml"));
            Categories.Add(new Category("Bóng Đá", "http://vietbao.vn/live/Bong-da/rss.xml"));
            Categories.Add(new Category("Chiêm Tinh", "http://vietbao.vn/live/Chiem-tinh/rss.xml"));
            Categories.Add(new Category("Công Nghệ", "http://vietbao.vn/live/Cong-nghe/rss.xml"));
            Categories.Add(new Category("Du Lịch", "http://vietbao.vn/live/Du-lich/rss.xml"));
            Categories.Add(new Category("Đời Sống-Gia Đình", "http://vietbao.vn/live/Doi-song-Gia-dinh/rss.xml"));
            Categories.Add(new Category("Game", "http://vietbao.vn/live/Game/rss.xml"));
            Categories.Add(new Category("Giáo Dục", "http://vietbao.vn/live/Giao-duc/rss.xml"));
            Categories.Add(new Category("Khám Phá Việt Nam", "http://vietbao.vn/live/Kham-pha-Viet-Nam/rss.xml"));
            Categories.Add(new Category("Khoa Học", "http://vietbao.vn/live/Khoa-hoc/rss.xml"));
            Categories.Add(new Category("Kinh Tế", "http://vietbao.vn/live/Kinh-te/rss.xml"));
            Categories.Add(new Category("Người Việt Bốn Phương", "http://vietbao.vn/live/Nguoi-Viet-bon-phuong/rss.xml"));
            Categories.Add(new Category("Nhà Đất", "http://vietbao.vn/live/Nha-dat/rss.xml"));
            Categories.Add(new Category("Ô tô - Xe Máy", "http://vietbao.vn/live/O-to-xe-may/rss.xml"));
            Categories.Add(new Category("Phóng Sự", "http://vietbao.vn/live/Phong-su/rss.xml"));
            Categories.Add(new Category("Sống Đẹp", "http://vietbao.vn/live/Dep/rss.xml"));
            Categories.Add(new Category("Sức Khỏe", "http://vietbao.vn/live/Suc-khoe/rss.xml"));
            Categories.Add(new Category("Tết", "http://vietbao.vn/live/Tet/rss.xml"));
            Categories.Add(new Category("Thế Giới", "http://vietbao.vn/live/The-gioi/rss.xml"));
            Categories.Add(new Category("Thế Giới Giải Trí", "http://vietbao.vn/live/The-gioi-giai-tri/rss.xml"));
            Categories.Add(new Category("Thế Giới Trẻ", "http://vietbao.vn/live/The-gioi-tre/rss.xml"));
            Categories.Add(new Category("Thể Thao", "http://vietbao.vn/live/The-thao/rss.xml"));
            Categories.Add(new Category("Trang Ban Đọc", "http://vietbao.vn/live/Trang-ban-doc/rss.xml"));
            Categories.Add(new Category("Tuyển Sinh", "http://vietbao.vn/live/Tuyen-sinh/rss.xml"));
            Categories.Add(new Category("Văn Hóa", "http://vietbao.vn/live/Van-hoa/rss.xml"));
            Categories.Add(new Category("Việc Làm", "http://vietbao.vn/live/Viec-lam/rss.xml"));
            Categories.Add(new Category("Vui Cười", "http://vietbao.vn/live/Cuoi/rss.xml"));
            Categories.Add(new Category("Xã Hội", "http://vietbao.vn/live/Xa-hoi/rss.xml"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #55
0
        public NgoiSaoPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Ngôi sao", Type = PaperType.NgôiSao, HomePage = "http://ngoisao.net", ImageSource = "ms-appx:///Assets/Logo/logo-ngoisao.png" });

            Title = "Ngôi sao";
            HomePage = "http://ngoisao.net";
            ImageSource = "ms-appx:///Assets/Logo/logo-ngoisao.png";

            Categories.Add(new Category("Hậu trường", "http://ngoisao.net/rss/hau-truong.rss"));
            Categories.Add(new Category("Bên lề", "http://ngoisao.net/rss/ben-le.rss"));
            Categories.Add(new Category("Thời cuộc", "http://ngoisao.net/rss/thoi-cuoc.rss"));
            Categories.Add(new Category("Phong cách", "http://ngoisao.net/rss/phong-cach.rss"));
            Categories.Add(new Category("Thư giãn", "http://ngoisao.net/rss/thu-gian.rss"));
            Categories.Add(new Category("Cưới", "http://ngoisao.net/rss/cuoi-hoi.rss"));
            Categories.Add(new Category("Showbiz Việt", "http://ngoisao.net/rss/showbiz-viet.rss"));
            Categories.Add(new Category("Châu Á", "http://ngoisao.net/rss/chau-a.rss"));
            Categories.Add(new Category("Hollywood", "http://ngoisao.net/rss/hollywood.rss"));
            Categories.Add(new Category("Clip", "http://ngoisao.net/rss/clip.rss"));
            Categories.Add(new Category("Khỏe đẹp", "http://ngoisao.net/rss/khoe-dep.rss"));
            Categories.Add(new Category("24h", "http://ngoisao.net/rss/24h.rss"));
            Categories.Add(new Category("Chuyện lạ", "http://ngoisao.net/rss/chuyen-la.rss"));
            Categories.Add(new Category("Hình sự", "http://ngoisao.net/rss/hinh-su.rss"));
            Categories.Add(new Category("Thương trường", "http://ngoisao.net/rss/thuong-truong.rss"));
            Categories.Add(new Category("Thời trang", "http://ngoisao.net/rss/thoi-trang.rss"));
            Categories.Add(new Category("Làm đẹp", "http://ngoisao.net/rss/lam-dep.rss"));
            Categories.Add(new Category("Trắc nghiệm", "http://ngoisao.net/rss/trac-nghiem.rss"));
            Categories.Add(new Category("Ăn chơi", "http://ngoisao.net/rss/an-choi.rss"));
            Categories.Add(new Category("Dân chơi", "http://ngoisao.net/rss/dan-choi.rss"));
            Categories.Add(new Category("Cười", "http://ngoisao.net/rss/cuoi.rss"));
            Categories.Add(new Category("Game", "http://ngoisao.net/rss/game.rss"));
            Categories.Add(new Category("Chơi blog", "http://ngoisao.net/rss/choi-blog.rss"));
            Categories.Add(new Category("Thi ảnh", "http://ngoisao.net/rss/thi-anh.rss"));
            Categories.Add(new Category("Miss", "http://ngoisao.net/rss/miss.rss"));
            Categories.Add(new Category("Cô dâu", "http://ngoisao.net/rss/co-dau.rss"));
            Categories.Add(new Category("Cẩm nang", "http://ngoisao.net/rss/cam-nang.rss"));
            Categories.Add(new Category("Ảnh cưới", "http://ngoisao.net/rss/anh-cuoi.rss"));
            Categories.Add(new Category("Chia sẻ", "http://ngoisao.net/rss/chia-se.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #56
0
        public GameThuPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "Game thủ", Type = PaperType.Gamethu, HomePage = "http://gamethu.vnexpress.net/", ImageSource = "ms-appx:///Assets/Logo/logo-gamethu.png" });
            Title = "Game thủ";
            HomePage = "http://gamethu.vnexpress.net/";
            ImageSource = "ms-appx:///Assets/Logo/logo-gamethu.png";

            Categories.Add(new Category("Trang chủ", "http://gamethu.net/rss/tin-moi-nhat.rss"));
            Categories.Add(new Category("eSport", "http://gamethu.net/rss/esport.rss"));
            Categories.Add(new Category("Mobile", "http://gamethu.net/rss/mobile.rss"));
            Categories.Add(new Category("Làng Game", "http://gamethu.net/rss/lang-game.rss"));
            Categories.Add(new Category("Online", "http://gamethu.net/rss/online.rss"));
            Categories.Add(new Category("Offline", "http://gamethu.net/rss/offline.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #57
0
        public Hai4hPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "24h", Type = PaperType.Báo24H, HomePage = "http://24h.com.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-24h.png"});
            Title = "24h";
            HomePage = "http://24h.com.vn";
            ImageSource = "ms-appx:///Assets/Logo/logo-24h.png";

            Categories.Add(new Category("Tin tức trong ngày", "http://www.24h.com.vn/upload/rss/tintuctrongngay.rss"));
            Categories.Add(new Category("Bóng đá", "http://www.24h.com.vn/upload/rss/bongda.rss"));
            Categories.Add(new Category("An ninh - Hình sự", "http://www.24h.com.vn/upload/rss/anninhhinhsu.rss"));
            Categories.Add(new Category("Thời trang", "http://www.24h.com.vn/upload/rss/thoitrang.rss"));
            Categories.Add(new Category("Thời trang Hi-tech", "http://www.24h.com.vn/upload/rss/thoitranghitech.rss"));
            Categories.Add(new Category("Tài chính – Bất động sản", "http://www.24h.com.vn/upload/rss/taichinhbatdongsan.rss"));
            Categories.Add(new Category("Ẩm thực", "http://www.24h.com.vn/upload/rss/amthuc.rss"));
            Categories.Add(new Category("Làm đẹp", "http://www.24h.com.vn/upload/rss/lamdep.rss"));
            Categories.Add(new Category("Phim", "http://www.24h.com.vn/upload/rss/phim.rss"));
            Categories.Add(new Category("Giáo dục - du học", "http://www.24h.com.vn/upload/rss/giaoducduhoc.rss"));
            Categories.Add(new Category("Bạn trẻ - Cuộc sống", "http://www.24h.com.vn/upload/rss/bantrecuocsong.rss"));
            Categories.Add(new Category("Ca nhạc - MTV", "http://www.24h.com.vn/upload/rss/canhacmtv.rss"));
            Categories.Add(new Category("Thể thao", "http://www.24h.com.vn/upload/rss/thethao.rss"));
            Categories.Add(new Category("Phi thường - kỳ quặc", "http://www.24h.com.vn/upload/rss/phithuongkyquac.rss"));
            Categories.Add(new Category("Công nghệ thông tin", "http://www.24h.com.vn/upload/rss/congnghethongtin.rss"));
            Categories.Add(new Category("Ô tô - Xe máy", "http://www.24h.com.vn/upload/rss/otoxemay.rss"));
            Categories.Add(new Category("Thị trường - Tiêu dùng", "http://www.24h.com.vn/upload/rss/thitruongtieudung.rss"));
            Categories.Add(new Category("Du lịch", "http://www.24h.com.vn/upload/rss/dulich.rss"));
            Categories.Add(new Category("Sức khỏe đời sống", "http://www.24h.com.vn/upload/rss/suckhoedoisong.rss"));
            Categories.Add(new Category("Cười 24h", "http://www.24h.com.vn/upload/rss/cuoi24h.rss"));
            Categories.Add(new Category("Thế giới", "http://www.24h.com.vn/upload/rss/tintucquocte.rss"));
            Categories.Add(new Category("Đời sống Showbiz", "http://www.24h.com.vn/upload/rss/doisongshowbiz.rss"));
            Categories.Add(new Category("Giải trí", "http://www.24h.com.vn/upload/rss/giaitri.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #58
0
        public VnEconomyPaper(PaperType type)
            : base(type)
        {
            //FrontPagePaper.Add(new VnExpressPaper() { Title = "VnEconomy", Type = PaperType.VnEconomy, HomePage = "http://vneconomy.vn/", ImageSource = "ms-appx:///Assets/Logo/logo-vneconomy.png" });

            Title = "VnEconomy";
            HomePage = "http://vneconomy.vn/";
            ImageSource = "ms-appx:///Assets/Logo/logo-vneconomy.png";

            Categories.Add(new Category("Thời sự", "http://vneconomy.vn/rss/thoi-su.rss"));
            Categories.Add(new Category("Doanh nhân", "http://vneconomy.vn/rss/doanh-nhan.rss"));
            Categories.Add(new Category("Tài chính", "http://vneconomy.vn/rss/tai-chinh.rss"));
            Categories.Add(new Category("Chứng khoán", "http://vneconomy.vn/rss/chung-khoan.rss"));
            Categories.Add(new Category("Thị trường", "http://vneconomy.vn/rss/thi-truong.rss"));
            Categories.Add(new Category("Bất động sản", "http://vneconomy.vn/rss/bat-dong-san.rss"));
            Categories.Add(new Category("Thế giới", "http://vneconomy.vn/rss/the-gioi.rss"));
            Categories.Add(new Category("Cuộc sống số", "http://vneconomy.vn/rss/cuoc-song-so.rss"));
            Categories.Add(new Category("Xe 360°", "http://vneconomy.vn/rss/xe-360.rss"));

            foreach (var item in Categories)
            {
                item.Owner = this;
            }
        }
예제 #59
0
 public void SetBlankPaperType(int blankMarker, PaperType type)
 {
     var args = new ConfigUpdatedEventArgs(
         Name, "BlankPaperType: " + blankMarker, BlanksPaperType[blankMarker], type);
     _scannerConfig.BlankPaperTypes.Cast<BlankPaperTypeConfig>().
         Where(pc => pc.BlankMarker == blankMarker).First().PaperType = type;
     RaiseConfigUpdatedEvent(args);
 }
예제 #60
0
        ////////////////////////////////////////////////////////////////////
        /// <summary>
        /// PDF document constructor
        /// </summary>
        /// <param name="PaperType">Paper type</param>
        /// <param name="Landscape">True for landscape, false for portrait.</param>
        /// <param name="UnitOfMeasure">Unit of measure code.</param>
        /// <param name="Stream">File or memory stream.</param>
        /// <remarks>
        /// <para>This constructor generates a document with default page size
        /// of Letter, Leagal, A3, A4 or A5.</para>
        /// <para>Page orientation is determined by the landscape argument.</para>
        /// <para>Unit of measure is a an enumeration constant (Point, Inch, cm, mm)</para>
        /// <para>The PDF document will be saved in the stream argument. The stream can 
        /// be either a MemoryStream or a FileStream. It is the calling program
        /// responsibiliy to close the stream after CreateFile() method
        /// is called.</para>
        /// </remarks>
        ////////////////////////////////////////////////////////////////////
        public PdfDocument(
			PaperType		PaperType,
			Boolean			Landscape,
			UnitOfMeasure	UnitOfMeasure,
			Stream			Stream
			)
        {
            // set scale factor (user units to points)
            Double Scale = UnitInPoints[(Int32) UnitOfMeasure];
            Double Width = PaperTypeSize[(Int32) PaperType].Width;
            Double Height = PaperTypeSize[(Int32) PaperType].Height;

            // for landscape swap width and height
            if(Landscape) ConstructorHelper(Height, Width, Scale, null, Stream);
            else ConstructorHelper(Width, Height, Scale, null, Stream);
            return;
        }