Пример #1
0
 public override void LoadContent()
 {
     back.Text                = GetText("Back");
     reset.Text               = GetText("Reset");
     title.Text               = GetText("Title");
     exit.Text                = GetText("Exit");
     back.BDText.ForeColor    = System.Drawing.Color.White;
     reset.BDText.ForeColor   = System.Drawing.Color.White;
     title.BDText.ForeColor   = System.Drawing.Color.White;
     exit.BDText.ForeColor    = System.Drawing.Color.White;
     back.TextAlign           = ContentAlignment.MiddleCenter;
     reset.TextAlign          = ContentAlignment.MiddleCenter;
     title.TextAlign          = ContentAlignment.MiddleCenter;
     exit.TextAlign           = ContentAlignment.MiddleCenter;
     back.Image               = ImageManage.GetSImage("button");
     reset.Image              = back.Image;
     title.Image              = back.Image;
     exit.Image               = back.Image;
     back.ImageEntity.Enable  = false;
     reset.ImageEntity.Enable = false;
     title.ImageEntity.Enable = false;
     exit.ImageEntity.Enable  = false;
     Image = ImageManage.GetSImage("window_ui.png");
     base.LoadContent();
 }
Пример #2
0
 protected override void OnPreInit(EventArgs e)
 {
     base.OnPreInit(e);
     imageServerUrl = ImageManage.GetImagerServerUrl(1);
     isLogin        = EyouSoft.Security.Membership.UserProvider.IsUserLogin();
     Model.CompanyStructure.CompanyUser user = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetModel("50caa9ca-f15c-440e-8d91-8d160de3c382");
     _userInfo = new UserInfo()
     {
         CityId      = 1,
         CompanyID   = "1e5edc20-4b83-4c16-8c52-008e0c09bd1e",
         UserName    = user.UserName,
         ContactInfo = user.ContactInfo,
         DepartId    = "1",
         ProvinceId  = 1,
         DepartName  = "432fds",
         IsAdmin     = true,
         ID          = "50caa9ca-f15c-440e-8d91-8d160de3c382",
     };
     Model.CompanyStructure.CompanyRole r = new EyouSoft.Model.CompanyStructure.CompanyRole();
     r.SetRole(EyouSoft.Model.CompanyStructure.CompanyType.专线);
     r.SetRole(EyouSoft.Model.CompanyStructure.CompanyType.组团);
     _userInfo.CompanyRole = r;
     _userInfo.AreaId      = new int[3] {
         1, 2, 3
     };
     //string[] arr = user.AreaList.Split(',');
     //for (int i = 0; i < arr.Length; i++)
     //{
     //    _userInfo.AreaId[i] = Int32.Parse(arr[i]);
     //}
 }
Пример #3
0
 public override void LoadContent()
 {
     image           = ImageManage.GetSImage("button03");
     sounds["click"] = SoundManage.GetSound("click.wav");
     sounds["enter"] = SoundManage.GetSound("enter.wav");
     base.LoadContent();
 }
Пример #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.litImgFrist.Text = "<a href='javascript:void(0);'><img src=" + ImageManage.GetImagerServerUrl(1) + "/images/hotel/main2.jpg" + "  width=\"" + imageWidth + "\"/></a>";
     }
 }
Пример #5
0
        public override void LoadContent()
        {
            Image                = ImageManage.GetSImage("help.png");
            ok.Image             = ImageManage.GetSImage("button01");
            messages[0].Location = Alignment.GetMXFAlignment(ContentAlignment.MiddleRight, size, messages[0].Size);

            /*messages[1].Location = new Point(0, TitleSize + 50);
             * messages[2].Location = new Point(size.Width - messages[2].Size.Width, TitleSize + 50);
             * messages[3].Location = new Point((size.Width - messages[3].Size.Width) / 2, messages[2].Location.Y + messages[2].Size.Height + 10);
             * messages[5].Location = new Point(0, messages[3].Location.Y + messages[3].Size.Height + 10);
             * messages[6].Location = new Point(size.Width - messages[6].Size.Width, messages[3].Location.Y + messages[3].Size.Height + 10);
             * messages[4].Location = new Point((size.Width - messages[4].Size.Width) / 2, messages[6].Location.Y + messages[6].Size.Height + 10);
             * messages[7].Location = new Point(0, messages[4].Location.Y + messages[4].Size.Height + 10);
             * messages[8].Location = new Point(size.Width - messages[8].Size.Width, messages[4].Location.Y + messages[4].Size.Height + 10);
             */

            time.Location = new Point(border_Left.Size.Width + 10, border_Top.Size.Height + 10);
            {
                for (int i = 0; i < Charas.Count; i++)
                {
                    Charas["cursor" + i.ToString()].Location = new Point(50 + 150 * (i % 6), border_Top.Size.Height + time.Size.Height + 50 + 180 * (i / 6));
                    charasDict.Add(new Point(i % 6, i / 6), "cursor" + i.ToString());
                }
            }
            sounds["hacking"] = SoundManage.GetSound("hacking.wav");
            sounds["hacking"].SetSELoopPlay(true);
            sounds["button"] = SoundManage.GetSound("button.wav");
            base.LoadContent();
        }
Пример #6
0
        /// <summary>
        /// 参会人状态更改捕获事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static void contact_ContactInformationChanged(object sender, ContactInformationChangedEventArgs e)
        {
            try
            {
                App.Current.Dispatcher.BeginInvoke(new Action(() =>
                {
                    if (Constant.lyncClient != null && Constant.lyncClient.State == ClientState.SignedIn)
                    {
                        //获取联系人
                        Contact contact = sender as Contact;
                        if (contact != null)
                        {

                            System.Collections.Generic.List<object> list = (System.Collections.Generic.List<object>)contact.GetContactInformation(ContactInformationType.EmailAddresses);
                            if (list.Count > 0 && currentParticipantsEntityList != null)
                            {
                                //double state = Convert.ToDouble(contact.GetContactInformation(ContactInformationType.Availability));

                                List<ParticipantsEntity> participantsEntityTempList = currentParticipantsEntityList.Where(item => item.LoginUri.ToLower().Equals(Convert.ToString(list[0]).ToLower())).ToList<ParticipantsEntity>();

                                if (participantsEntityTempList.Count > 0)
                                {
                                    ParticipantsEntity Participant = participantsEntityTempList[0];

                                    string uriImg = Constant.TreeServiceAddressFront + Constant.FtpServercePersonImgName + Participant.LoginName + ".png";
                                    BitmapImage btimap = new BitmapImage(new Uri(uriImg));
                                    string strState = Convert.ToString(contact.GetContactInformation(ContactInformationType.Activity));
                                    //bool imgIsExit = UriManage.RemoteFileExists(uriImg);
                                    if (strState.Equals("脱机"))
                                    {
                                        Participant.LoginState = "未登录";
                                        Participant.StateForeBrush = App.Current.Resources["NormalColorBrush"] as SolidColorBrush;
                                        Participant.HeadPortrait = ImageManage.ToGray(btimap);
                                    }
                                    else
                                    {
                                        Participant.LoginState = "在线";
                                        Participant.StateForeBrush = App.Current.Resources["GreenColorBrush"] as SolidColorBrush;
                                        Participant.HeadPortrait = btimap;
                                    }
                                    //获取当前人的公司名称
                                    Participant.Company = Convert.ToString(contact.GetContactInformation(ContactInformationType.Company));
                                    ////获取当前人的职位
                                    Participant.Position = Convert.ToString(contact.GetContactInformation(ContactInformationType.Title));
                                }
                                if (BeginRefleshDataGridCallBack != null)
                                {
                                    BeginRefleshDataGridCallBack(currentParticipantsEntityList);
                                }
                            }
                        }
                    }
                }));

            }
            catch (Exception ex)
            {
                LogManage.WriteLog(typeof(LyncHelper), ex);
            }
        }
Пример #7
0
 public override void LoadContent()
 {
     Image = ImageManage.GetSImage("stagefield.png");
     sounds["antiviruswin"] = SoundManage.GetSound("antiviruswin.wav");
     sounds["viruswin"]     = SoundManage.GetSound("viruswin.wav");
     base.LoadContent();
 }
Пример #8
0
 private void SetContentImage()
 {
     backAB.Image = ImageManage.GetSImage("button01");
     title.Image  = ImageManage.GetSImage("button01");
     reset.Image  = ImageManage.GetSImage("button01");
     exitAB.Image = ImageManage.GetSImage("button01");
 }
Пример #9
0
 public override void LoadContent()
 {
     endText.Location = ((size - endText.Size) / 2).ToPoint();
     Image            = ImageManage.GetSImage("login_logout.png");
     sounds["logout"] = SoundManage.GetSound("logout.wav");
     base.LoadContent();
 }
Пример #10
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            CityId = EyouSoft.Common.Function.StringValidate.GetIntValue(Request.QueryString["CityId"]);

            ImageServerPath = ImageManage.GetImagerServerUrl(1);
        }
Пример #11
0
 /// <summary>
 /// 根据--头像编号--得到头像信息
 /// </summary>
 /// <param name="imagemanage"></param>
 /// <param name="tbName"></param>
 /// <returns></returns>
 public DataSet FindPhotoByID(ImageManage imagemanage, string tbName)
 {
     SqlParameter[] prams =
     {
         data.MakeInParam("@photoid", SqlDbType.NVarChar, 20, imagemanage.PhotoID),
     };
     return(data.RunProcReturn("select * from tb_Image where 编号 like @photoid", prams, tbName));
 }
Пример #12
0
 public override void LoadContent()
 {
     ok.Image  = ImageManage.GetSImage("button");
     ok.Click += OK_Click;
     ok.ImageEntity.Enable = false;
     image = ImageManage.GetSImage("window_ui.png");
     base.LoadContent();
 }
Пример #13
0
 public override void LoadContent()
 {
     image        = ImageManage.GetSImage("HeroHp.png");
     size         = new Size(image.Size.Width, image.Size.Height);
     backPa.Image = ImageManage.GetSImage("EnemyHp.png");
     backPa.Size  = new Size(image.Size.Width, image.Size.Height);
     base.LoadContent();
 }
Пример #14
0
 public override void Initialize()
 {
     Visible      = true;
     Image        = ImageManage.GetSImage(wall[rnd.Next(wall.Length)]);
     Size         = Size.Parse(Image.Image.Size);
     Render.Scale = Vector2.One;
     Coordinate   = new Vector2(rnd.Next(Stage.EndOfLeftUp.X, Stage.EndOfRightDown.X - size.Width), rnd.Next(Stage.EndOfLeftUp.Y, Stage.EndOfRightDown.Y - size.Height));
     base.Initialize();
 }
Пример #15
0
 public override void Initialize()
 {
     base.Initialize();
     Boss            = new BossPanel(this);
     Boss.Coordinate = new Vector2(12 * 64, 3 * 64);
     Boss.Size       = new Size(10 * 64, 11 * 64);
     Boss.Image      = ImageManage.GetSImage("boss");
     Boss.CreateHitSpace(3);
 }
Пример #16
0
 public override void LoadContent()
 {
     time.Location = new Point(size.Width - date.Size.Width / 2 - time.Size.Width / 2 - 20, 5);
     date.Location = new Point(size.Width - date.Size.Width - 20, 30);
     menu.Location = new Point(start.Size.Width + 5, (size.Height - menu.Size.Height) / 2);
     Image         = ImageManage.GetSImage("taskbar.png");
     start.Image   = ImageManage.GetSImage("IG");
     base.LoadContent();
 }
Пример #17
0
 public override void LoadContent()
 {
     ok.Image            = ImageManage.GetSImage("button01");
     cancel.Image        = ImageManage.GetSImage("button01");
     sounds["warning01"] = SoundManage.GetSound("warning01.wav");
     sounds["warning02"] = SoundManage.GetSound("warning02.wav");
     sounds["warning02"].SetSELoopPlay(true);
     sounds["button"] = SoundManage.GetSound("button.wav");
     base.LoadContent();
 }
Пример #18
0
 public override void LoadContent()
 {
     ((StageLabel)stageObjs["date"]).TextSize = 24f;
     ((StageLabel)stageObjs["time"]).TextSize = 24f;
     ((StageLabel)stageObjs["date"]).Text     = DateTime.Now.ToString("yyyy/MM/dd");
     ((StageLabel)stageObjs["time"]).Text     = DateTime.Now.ToString("HH:mm");
     stageObjs["date"].Coordinate             = new Vector2(ssize.Width - stageObjs["date"].Size.Width - 40, ssize.Height - 40);
     stageObjs["time"].Coordinate             = new Vector2(ssize.Width - stageObjs["date"].Size.Width / 2 - stageObjs["time"].Size.Width / 2 - 40, ssize.Height - stageObjs["date"].Size.Height - stageObjs["time"].Size.Height - 20);
     stageObjs["stageField0"].Image           = ImageManage.GetSImage("stagefield.png");
     base.LoadContent();
 }
Пример #19
0
 public override void Initialize()
 {
     isDamage     = false;
     selfDamage   = 0;
     MovePriority = 5;
     if (playerControl != null && playerControl.Chara != null)
     {
         Image = ImageManage.GetSImage(playerControl.Chara + ".png");
         Size  = Size.Parse(Image.Image.Size) / 2;
     }
     base.Initialize();
 }
Пример #20
0
 public string RouteList;    //最新发布线路
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Utils.GetQueryStringValue("CityId") != "")
         {
             CityId = Convert.ToInt32(Utils.GetQueryStringValue("CityId"));
         }
         Imagepath = ImageManage.GetImagerServerUrl(1);
         Initialize();
     }
 }
Пример #21
0
        protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);

            _masterUserInfo = new UserProvider().GetMaster();

            if (_masterUserInfo != null)
            {
                if (_masterUserInfo.AreaId == null)
                {
                    _masterUserInfo.AreaId = new int[] { };
                }
            }

            _isLogin = _masterUserInfo != null ? true : false;

            if (_isLogin == false)
            {
                string isAjax = Request.QueryString["isajax"];
                if (!string.IsNullOrEmpty(isAjax))
                {
                    if (isAjax == "yes")
                    {
                        Response.Clear();
                        Response.Write("notLogin");
                        Response.End();
                    }
                    else
                    {
                        UserProvider.RedirectLoginOpenTopPageYunYing();
                    }
                }
                else
                {
                    UserProvider.RedirectLoginOpenTopPageYunYing();
                }
            }

            imageServerUrl = ImageManage.GetImagerServerUrl(1);

            //_masterUserInfo = new MasterUserInfo()
            //{
            //    UserName="******",
            //    ContactFax = "0571-88652510",
            //    ContactMobile = "13522090770",
            //    ContactName = "管理员_测试",
            //    ContactTel = "0571-5521047",
            //    IsDisable = true,
            //    ID = 4,
            //    AreaId=new int[4]{1,2,3,4}
            //};
        }
Пример #22
0
        /// <summary>
        /// 获得酒店星级图片
        /// </summary>
        /// <param name="leave"></param>
        /// <returns></returns>
        protected string GetImageByLeave(int leave)
        {
            StringBuilder str = new StringBuilder();

            if (leave > 5)
            {
                leave = leave - 5;
            }
            for (int i = 0; i < leave; i++)
            {
                str.Append("<img src=\"" + ImageManage.GetImagerServerUrl(1) + "/images/hotel/start_02.gif\" width=\"12px\" height=\"13px\" align='absmiddle' />");
            }
            return(str.ToString());
        }
Пример #23
0
        protected string CompanyId = string.Empty; //公司id
        #endregion

        #region 页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            CompanyId             = this.SiteUserInfo.CompanyID;
            this.ImgSave.ImageUrl = ImageManage.GetImagerServerUrl(1) + "/images/jipiao/bc_btn.jpg";
            // 初始化旅客类型
            BindVisitorType();
            //绑定证件类型
            BindCardType();
            //初始化国家
            InitCountryList();

            if (!string.IsNullOrEmpty(Utils.InputText(Context.Request.QueryString["EditId"])))
            {
                EditId = Utils.GetString(Context.Request.QueryString["EditId"], "");
            }
            if (!Page.IsPostBack)
            {
                //根据旅客ID获得常旅客实体对象
                EyouSoft.Model.TicketStructure.TicketVistorInfo TicketVisitorInfo = EyouSoft.BLL.TicketStructure.TicketVisitor.CreateInstance().GetTicketVisitorInfo(EditId.ToString());

                this.Master.Naviagtion = AirTicketNavigation.机票常旅客管理;
                this.Title             = "常旅客添加_机票";

                #region 初始化表单数据
                if (TicketVisitorInfo != null)
                {
                    this.ddlCardType.SelectedValue     = ((int)TicketVisitorInfo.CardType).ToString();
                    this.ddlVisitoryType.SelectedValue = ((int)TicketVisitorInfo.VistorType).ToString();
                    this.ddlCountry.SelectedValue      = ((int)TicketVisitorInfo.NationInfo.NationId).ToString();
                    this.txtCardNo.Value = TicketVisitorInfo.CardNo.Trim();
                    this.txtCname.Value  = TicketVisitorInfo.ChinaName.Trim();
                    this.txtEname.Value  = TicketVisitorInfo.EnglishName.Trim();
                    this.txtPhone.Value  = TicketVisitorInfo.ContactTel.Trim();
                    this.txtRemark.Value = TicketVisitorInfo.Remark.Trim();
                    EyouSoft.Model.CompanyStructure.Sex Gender = TicketVisitorInfo.ContactSex;
                    if (Gender == EyouSoft.Model.CompanyStructure.Sex.男)
                    {
                        this.gender_male.Checked = true;
                    }
                    else
                    {
                        this.gender_female.Checked = true;
                    }
                }
                //释放资源
                TicketVisitorInfo = null;
                #endregion
            }
        }
Пример #24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string ImageServerPath = ImageManage.GetImagerServerUrl(1);
         if (TabIndex == 0)
         {
             imagePath1 = ImageServerPath + "/images/barcj.gif";
             imagePath2 = ImageServerPath + "/images/barcjun.gif";
         }
         else
         {
             imagePath1 = ImageServerPath + "/images/barcjun.gif";
             imagePath2 = ImageServerPath + "/images/barcj.gif";
         }
     }
 }
Пример #25
0
        /// <summary>
        /// Override OnInit
        /// </summary>
        /// <param name="e"></param>
        protected override void OnInit(EventArgs e)
        {
            //初始化公司ID
            string currentUrlPath = HttpContext.Current.Request.ServerVariables["Http_Host"];

            //如果使用独立域名访问网店,则根据域名查询所属公司ID.
            if (Domain.SeniorOnlineShop.IndexOf(currentUrlPath) == -1)
            {
                EyouSoft.Model.SystemStructure.SysCompanyDomain cDomianModel = EyouSoft.BLL.SystemStructure.SysCompanyDomain.CreateInstance().
                                                                               GetSysCompanyDomain(EyouSoft.Model.SystemStructure.DomainType.网店域名, currentUrlPath);
                if (cDomianModel != null)
                {
                    this._companyid  = cDomianModel.CompanyId;
                    this.TABLINKS_SY = "/";
                }
            }

            //如果没有使用独立域名访问网店,则从QueryString集合中查找cid参数,获取公司ID
            if (string.IsNullOrEmpty(this._companyid))
            {
                this._companyid = Utils.GetQueryStringValue("cid");
            }

            //获取高级网店信息和公司信息
            this._companyinfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(this._companyid);
            if (this._companyinfo == null)
            {
                Utils.ShowError("高级网店不存在!", "SeniorShop");
                return;
            }

            //判断是否开通高级网店
            if (this._companyinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线) && !Utils.IsOpenHighShop(this._companyid))
            {
                Utils.ShowError("该公司未开通高级网店!", "SeniorShop");
                return;
            }

            this._companyeshopinfo = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(this._companyid);

            this.ImageServerUrl = ImageManage.GetImagerServerUrl(1);

            Utils.EShopTemplateValidate(this.CompanyId, _companyeshopinfo.TemplateId);

            base.OnInit(e);
        }
Пример #26
0
        public override void LoadContent()
        {
            Image           = ImageManage.GetSImage("startmenu.png");
            shutdown.Image  = ImageManage.GetSImage("shutdown");
            antivirus.Image = ImageManage.GetSImage("antivirus_icon");
            readme.Image    = ImageManage.GetSImage("thedata.png");
            antivirus.Size  = new Size(100, 100);
            shutdown.Size   = Size.Parse(shutdown.Image.Image.Size);

            antivirus.Location     = new Point(-25, size.Height - shutdown.Size.Height - 75);
            shutdown.Location      = new Point(0, size.Height - shutdown.Size.Height);
            readme.Location        = new Point(0, size.Height - 150);
            downText.Location      = new Point(60, size.Height - downText.Size.Height - 15);
            antivirusText.Location = new Point(60, downText.Location.Y - 50);
            readmeText.Location    = new Point(60, antivirusText.Location.Y - 50);
            base.LoadContent();
        }
Пример #27
0
        protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);
            imageServerUrl = ImageManage.GetImagerServerUrl(1);
            UserInfo userInfo = null;

            isLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo);

            if (userInfo != null)
            {
                _userInfo = userInfo;
                //判断当前用户所在的公司是否通过审核
                _IsCompanyCheck = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetCompanyState(_userInfo.CompanyID).IsCheck;
                //如果用户属于【车队,购物店,酒店,旅游用品店】,则_IsSupplyUser=true,_IsAirTicketSupplyUser=false
                //如果用户属于【机票供应商】,则_IsSupplyUser=false,_IsAirTicketSupplyUser=true
                //如果用户属于【旅行社,景区】,则_IsAirTicketSupplyUser=false
                if (userInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.车队) ||
                    userInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.购物店) ||
                    userInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.景区) ||
                    userInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.酒店) ||
                    userInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.旅游用品店))
                {
                    _IsAirTicketSupplyUser = false;
                    _IsTravelUser          = false;
                }
                else if (userInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.机票供应商))
                {
                    _IsAirTicketSupplyUser = true;
                    _IsTravelUser          = false;
                }
                else if (userInfo.CompanyRole.Length > 0 && userInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.随便逛逛))  //身份角色长度为0,表示随便逛逛
                {
                    //zwc 20101122 增加随便逛逛
                    _IsTemporaryUser = true;
                }
                else
                {
                    _IsAirTicketSupplyUser = false;
                    _IsTravelUser          = true;
                }
            }
        }
Пример #28
0
        public override void LoadContent()
        {
            start.Text              = GetText("Start");
            credit.Text             = GetText("Credit");
            exit.Text               = GetText("Exit");
            start.BDText.ForeColor  = System.Drawing.Color.White;
            credit.BDText.ForeColor = System.Drawing.Color.White;
            exit.BDText.ForeColor   = System.Drawing.Color.White;
            start.TextAlign         = ContentAlignment.MiddleCenter;
            credit.TextAlign        = ContentAlignment.MiddleCenter;
            exit.TextAlign          = ContentAlignment.MiddleCenter;
            var im = ImageManage.GetSImage("button");

            start.Image               = im;
            credit.Image              = im;
            exit.Image                = im;
            start.ImageEntity.Enable  = false;
            credit.ImageEntity.Enable = false;
            exit.ImageEntity.Enable   = false;
            base.LoadContent();
        }
Пример #29
0
        public override void LoadContent()
        {
            switch (player)
            {
            case "P0":
                lable.Location         = new Point(0, -lable.Size.Height);
                pad                    = PlayerIndex.One;
                lable.BDText.ForeColor = System.Drawing.Color.Blue;
                ImageColor             = Color.Blue;
                break;

            case "P1":
                lable.Location         = new Point(size.Width - lable.Size.Width, -lable.Size.Height);
                pad                    = PlayerIndex.Two;
                lable.BDText.ForeColor = System.Drawing.Color.Red;
                ImageColor             = Color.Red;
                break;

            case "P2":
                lable.Location         = new Point(0, size.Height);
                pad                    = PlayerIndex.Three;
                lable.BDText.ForeColor = System.Drawing.Color.Green;
                imageColor             = Color.Green;
                break;

            case "P3":
                lable.Location         = new Point(size.Width - lable.Size.Width, size.Height);
                pad                    = PlayerIndex.Four;
                lable.BDText.ForeColor = System.Drawing.Color.Yellow;
                imageColor             = Color.Yellow;
                break;
            }
            Image     = ImageManage.GetSImage("playercursor.png");
            gameStage = (GameStage)((StageScene)GameRun.Instance.scenes["stagescene"]).stages["Stage01"];
            base.LoadContent();
        }
Пример #30
0
        public void Create(AddApplicantViewModel viewModel)
        {
            var applicant = _mappingEngine.Map <Applicant>(viewModel);

            if (viewModel.PhotoScan.HasValue())
            {
                applicant.Photo = Convert.FromBase64String(viewModel.PhotoScan).ResizeImageFile(150, 150);
            }
            else if (viewModel.PhotoFile.HasFile())
            {
                applicant.Photo = viewModel.PhotoFile.InputStream.ResizeImageFile(150, 150);
            }
            else
            {
                applicant.Photo = ImageManage.ResizeImageFile(_httpContextBase.Server.MapPath(DefaultAvatarPath), 150, 150);
            }

            if (viewModel.CopyOfBirthCertificateScan.HasValue())
            {
                applicant.CopyOfBirthCertificate = Convert.FromBase64String(viewModel.CopyOfBirthCertificateScan).ResizeImageFile(A5Width, A5Height);
            }
            else if (viewModel.CopyOfBirthCertificateFile.HasFile())
            {
                applicant.CopyOfBirthCertificate = viewModel.CopyOfBirthCertificateFile.InputStream.ResizeImageFile(A5Width, A5Height);
            }

            if (viewModel.CopyOfNationalCardScan.HasValue())
            {
                applicant.CopyOfNationalCard = Convert.FromBase64String(viewModel.CopyOfNationalCardScan).ResizeImageFile(A6Width, A6Height);
            }
            else if (viewModel.CopyOfNationalCardFile.HasFile())
            {
                applicant.CopyOfNationalCard = viewModel.CopyOfNationalCardFile.InputStream.ResizeImageFile(A6Width, A6Height);
            }
            _applicants.Add(applicant);
        }