コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     imgbaner = new ImageLogo();
     if (!this.IsPostBack)
     {
         lbHeaderT.Text = Language.GetTextByID(151);
         if (newsid == "" || newsid == string.Empty || newsid == null)
         {
             Response.Redirect(Globals.URLCurrent + "images_home.aspx");
         }
         DataRow dr = imgbaner.GetInfoStatus(newsid);
         if (dr != null)
         {
             lbTenAnh.Text = "  :" + dr["name"].ToString().ToUpper();
             string fimages = dr["fimage"].ToString();
             string fwidth  = dr["width"].ToString();
             string fheight = dr["height"].ToString();
             string Sfile   = fimages.Substring(fimages.Length - 4);
             string sPath   = Globals.UrlRoot + fimages;
             if (Sfile == ".swf")
             {
                 ltlImages.Text = string.Format("<script language='javascript'>\n<!--\n embed_flash('{0}', '" + fwidth + "', '" + fheight + "','aa');\n-->\n</script>", sPath);
             }
             else
             {
                 ltlImages.Text = string.Format("<img src='{0}' border='0'>", sPath);
             }
         }
     }
 }
コード例 #2
0
    private void lbtOnline_Click(object sender, System.EventArgs e)
    {
        LinkButton lbtOnline = (LinkButton)sender;

        if (lbtOnline.CommandArgument != String.Empty)
        {
            string    id       = lbtOnline.CommandArgument.ToString();
            ImageLogo objImage = new ImageLogo();
            objImage.SetStatusDefault(id);
            Response.Redirect(Globals.UrlRoot + "temp.aspx?url=" + Request.Url);
        }
    }
コード例 #3
0
 protected void btSTT_Click(object sender, EventArgs e)
 {
     foreach (RepeaterItem items in rptNews.Items)
     {
         Literal   ltlID     = (Literal)items.FindControl("ltlID");
         TextBox   txtSTT    = (TextBox)items.FindControl("txtSTT");
         string    sid       = ltlID.Text.Trim();
         ImageLogo objImages = new ImageLogo();
         objImages.SetSTT(sid, Convert.ToInt32(txtSTT.Text.Trim()));
     }
     Response.Redirect(Globals.UrlRoot + "temp.aspx?url=" + Request.Url);
 }
コード例 #4
0
    protected void BtDelete_Click(object sender, EventArgs e)
    {
        ImageLogo objImages = new ImageLogo();
        string    id        = string.Empty;

        foreach (RepeaterItem items in rptNews.Items)
        {
            CheckBox checkboxID = (CheckBox)items.FindControl("checkboxID");
            if (checkboxID.Checked)
            {
                Literal ltlIDNews = (Literal)items.FindControl("ltlIDNews");
                id = ltlIDNews.Text.Trim();
                objImages.DeleteDefault(id);
            }
        }
        Response.Redirect(Globals.UrlRoot + "temp.aspx?url=" + Request.Url);
    }
コード例 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            imgIconHeader.ImageUrl = Globals.UrlImages + "icon_menu1.gif";;
            ltlHeader.Text         = Language.GetTextByID(152);

            txtFileImages.Attributes.Add("style", "Width:250px");
            txtName.Attributes.Add("style", "Width:250px");
            ltlViewSize.Text  = Language.GetTextByID(230);
            ltlAddImages.Text = Language.GetTextByID(151);
            tbxWidth.Attributes.Add("style", "Width:50px");
            tbxHeight.Attributes.Add("style", "Width:50px");

            ltlRequireTitle.Text = Language.GetTextByID(34);
            BtAdd.Text           = Language.GetTextByID(37);

            imgSelect.Attributes.Add("style", "cursor:hand; cursor:pointer");
            imgSelect.Src = Globals.UrlImages + "folder.gif";
            imgSelect.Attributes.Add("onclick", "SelectFile('" + txtFileImages.ClientID + "')");
            //
            string PageQuery = "page";
            string strcPage  = Request.QueryString[PageQuery];
            if (strcPage == null)
            {
                strcPage = "1";
            }
            int cPage = Convert.ToInt32(strcPage);
            int TotalRecords, TotalPages;

            ImageLogo objImage = new ImageLogo();
            rptNews.DataSource = objImage.SearchingDefault(cPage, 15, out TotalRecords, out TotalPages);
            rptNews.DataBind();

            PageList2.m_pTotalPage   = TotalPages;
            PageList2.m_pPageQuery   = PageQuery;
            PageList2.m_pCurrentPage = cPage;
            PageList2.m_pPageUrl     = Request.RawUrl;
            PageList2.m_pIconPath    = Globals.UrlImages;

            ltlTotal1.Text = string.Format(Language.GetTextByID(205), TotalRecords);
        }
    }
コード例 #6
0
    protected void BtAdd_Click(object sender, EventArgs e)
    {
        string sFileImages = txtFileImages.Text.Trim();
        string sName       = txtName.Text.Trim();

        if (sFileImages == "" || sFileImages == string.Empty || sName == "" || sName == string.Empty)
        {
            ltlRequireTitle.Visible = true;
            return;
        }
        else
        {
            ltlRequireTitle.Visible = false;
        }
        string    sFilename = txtFileImages.Text.Trim();
        string    fwidht    = tbxWidth.Text.Trim();
        string    fheight   = tbxHeight.Text.Trim();
        ImageLogo objImage  = new ImageLogo();

        objImage.UpdateDefault(id, sName, sFilename, fwidht, fheight);
        Response.Redirect(Globals.URLCurrent + "imagedefault.aspx", true);
    }
コード例 #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            imgIconHeader.ImageUrl = Globals.UrlImages + "icon_menu1.gif";;
            ltlHeader.Text         = Language.GetTextByID(152);

            txtFileImages.Attributes.Add("style", "Width:250px");
            txtName.Attributes.Add("style", "Width:250px");
            ltlViewSize.Text  = Language.GetTextByID(230);
            ltlAddImages.Text = Language.GetTextByID(151);
            tbxWidth.Attributes.Add("style", "Width:50px");
            tbxHeight.Attributes.Add("style", "Width:50px");

            ltlRequireTitle.Text = Language.GetTextByID(34);
            BtAdd.Text           = Language.GetTextByID(37);

            imgSelect.Attributes.Add("style", "cursor:hand; cursor:pointer");
            imgSelect.Src = Globals.UrlImages + "folder.gif";
            imgSelect.Attributes.Add("onclick", "SelectFile('" + txtFileImages.ClientID + "')");
            string    sid      = id;
            ImageLogo objImage = new ImageLogo();
            //Update
            if (id == "" || id == null || id == string.Empty)
            {
                Response.Redirect(Globals.URLCurrent + "imagedefault.aspx", true);
            }
            DataRow dr = objImage.GetdataDefault(id);
            if (dr == null)
            {
                Response.Redirect(Globals.URLCurrent + "imagedefault.aspx", true);
            }

            txtName.Text       = dr["name"].ToString();
            txtFileImages.Text = dr["fimage"].ToString();
            tbxWidth.Text      = dr["width"].ToString();
            tbxHeight.Text     = dr["height"].ToString();
        }
    }
コード例 #8
0
    protected void BtAdd_Click(object sender, EventArgs e)
    {
        string sFileImages = txtFileImages.Text.Trim();
        string sName       = txtName.Text.Trim();

        if (sFileImages == "" || sFileImages == string.Empty || sName == "" || sName == string.Empty)
        {
            ltlRequireTitle.Visible = true;
            return;
        }
        else
        {
            ltlRequireTitle.Visible = false;
        }
        string    sFilename = txtFileImages.Text.Trim();
        string    fwidht    = tbxWidth.Text.Trim();
        string    fheight   = tbxHeight.Text.Trim();
        ImageLogo objImage  = new ImageLogo();

        objImage.InsertDefault(sName, sFilename, fwidht, fheight);
        Response.Redirect(Globals.UrlRoot + "temp.aspx?url=" + Request.Url);
    }
コード例 #9
0
        public void Create(object masterView, string bgLayerImageName, string logoImageName, RectangleF frame, OnButtonClick onClick)
        {
            // take the handler
            OnClick = onClick;

            View = PlatformView.Create( );
            View.BackgroundColor = ControlStylingConfig.OOBE_Splash_BG_Color;
            View.AddAsSubview(masterView);

            ImageBG = PlatformImageView.Create( );
            ImageBG.AddAsSubview(View.PlatformNativeObject);
            MemoryStream stream = Rock.Mobile.IO.AssetConvert.AssetToStream(bgLayerImageName);

            if (stream != null)
            {
                stream.Position        = 0;
                ImageBG.Opacity        = 0;
                ImageBG.Image          = stream;
                ImageBG.ImageScaleType = PlatformImageView.ScaleType.ScaleAspectFill;
                stream.Dispose( );
            }

            NetworkErrorLabel = PlatformLabel.Create( );
            NetworkErrorLabel.SetFont(ControlStylingConfig.Font_Light, 18);
            NetworkErrorLabel.TextColor     = 0xCCCCCCFF;
            NetworkErrorLabel.Text          = OOBEStrings.NetworkError;
            NetworkErrorLabel.TextAlignment = TextAlignment.Center;
            NetworkErrorLabel.Opacity       = 0;
            NetworkErrorLabel.SizeToFit( );
            NetworkErrorLabel.AddAsSubview(View.PlatformNativeObject);


            NetworkRetryButton = PlatformButton.Create( );
            NetworkRetryButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Medium_FontSize);
            NetworkRetryButton.TextColor = 0xCCCCCCFF;
            NetworkRetryButton.Text      = OOBEStrings.NetworRetry;
            NetworkRetryButton.Opacity   = 0;
            NetworkRetryButton.SizeToFit( );
            NetworkRetryButton.ClickEvent = (PlatformButton button ) =>
            {
                OnClick(-1, false);
            };
            NetworkRetryButton.AddAsSubview(View.PlatformNativeObject);


            WelcomeLabel = PlatformLabel.Create( );
            WelcomeLabel.SetFont(ControlStylingConfig.Font_Bold, 85);
            WelcomeLabel.TextColor = 0xCCCCCCFF;
            WelcomeLabel.Text      = OOBEStrings.Welcome;
            WelcomeLabel.Opacity   = 0;
            WelcomeLabel.SizeToFit( );
            WelcomeLabel.AddAsSubview(View.PlatformNativeObject);

            CampusHeader = PlatformLabel.Create( );
            CampusHeader.SetFont(ControlStylingConfig.Font_Light, 18);
            CampusHeader.TextColor     = 0xCCCCCCFF;
            CampusHeader.Text          = OOBEStrings.CampusIntro;
            CampusHeader.TextAlignment = TextAlignment.Center;
            CampusHeader.Opacity       = 0;
            CampusHeader.SizeToFit( );
            CampusHeader.AddAsSubview(View.PlatformNativeObject);

            // we'll wait to setup campuses until after a successful download
            CampusButtons = new List <PlatformButton>( );

            RegisterButton = PlatformButton.Create( );
            RegisterButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize);
            RegisterButton.TextColor = 0xCCCCCCFF;
            RegisterButton.Text      = string.Format(OOBEStrings.WantAccount, GeneralConfig.OrganizationShortName);
            RegisterButton.Opacity   = 0;
            RegisterButton.SizeToFit( );
            RegisterButton.ClickEvent = (PlatformButton button ) =>
            {
                // do not allow multiple register taps
                if (State == OOBE_State.WaitForAccountChoice)
                {
                    OnClick(0, false);

                    EnterNextState(OOBE_State.Done);
                }
            };
            RegisterButton.AddAsSubview(View.PlatformNativeObject);


            RegisterSeperator = PlatformView.Create( );
            RegisterSeperator.BackgroundColor = ControlStylingConfig.BG_Layer_BorderColor;
            RegisterSeperator.Bounds          = new RectangleF(0, 0, 0, 1);
            RegisterSeperator.AddAsSubview(View.PlatformNativeObject);


            LoginButton = PlatformButton.Create( );
            LoginButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize);
            LoginButton.TextColor = 0xCCCCCCFF;
            LoginButton.Text      = string.Format(OOBEStrings.HaveAccount, GeneralConfig.OrganizationShortName);
            LoginButton.Opacity   = 0;
            LoginButton.SizeToFit( );
            LoginButton.ClickEvent = (PlatformButton button ) =>
            {
                // do not allow multiple register taps
                if (State == OOBE_State.WaitForAccountChoice)
                {
                    OnClick(1, false);

                    EnterNextState(OOBE_State.Done);
                }
            };
            LoginButton.AddAsSubview(View.PlatformNativeObject);

            LoginSeperator = PlatformView.Create( );
            LoginSeperator.BackgroundColor = ControlStylingConfig.BG_Layer_BorderColor;
            LoginSeperator.Bounds          = new RectangleF(0, 0, 0, 1);
            LoginSeperator.AddAsSubview(View.PlatformNativeObject);


            SkipButton = PlatformButton.Create( );
            SkipButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize);
            SkipButton.TextColor = 0xCCCCCCFF;
            SkipButton.Text      = OOBEStrings.SkipAccount;
            SkipButton.Opacity   = 0;
            SkipButton.SizeToFit( );
            SkipButton.ClickEvent = (PlatformButton button ) =>
            {
                // do not allow multiple register taps
                if (State == OOBE_State.WaitForAccountChoice)
                {
                    OnClick(2, false);

                    EnterNextState(OOBE_State.Done);
                }
            };
            SkipButton.AddAsSubview(View.PlatformNativeObject);

            stream          = Rock.Mobile.IO.AssetConvert.AssetToStream(logoImageName);
            stream.Position = 0;
            ImageLogo       = PlatformImageView.Create( );
            ImageLogo.AddAsSubview(View.PlatformNativeObject);
            ImageLogo.Image          = stream;
            ImageLogo.ImageScaleType = PlatformImageView.ScaleType.ScaleAspectFit;
            stream.Dispose( );

            State = OOBE_State.Startup;
        }
コード例 #10
0
 public void Destroy( )
 {
     // clean up resources (looking at you, Android)
     ImageLogo.Destroy( );
     ImageBG.Destroy( );
 }
コード例 #11
0
        void ReleaseDesignerOutlets()
        {
            if (CloseButton != null)
            {
                CloseButton.Dispose();
                CloseButton = null;
            }

            if (FirewallLabel != null)
            {
                FirewallLabel.Dispose();
                FirewallLabel = null;
            }

            if (FirewallStatusLabel != null)
            {
                FirewallStatusLabel.Dispose();
                FirewallStatusLabel = null;
            }

            if (GuiPausePopoverView != null)
            {
                GuiPausePopoverView.Dispose();
                GuiPausePopoverView = null;
            }

            if (ImageLogo != null)
            {
                ImageLogo.Dispose();
                ImageLogo = null;
            }

            if (PauseAddButton != null)
            {
                PauseAddButton.Dispose();
                PauseAddButton = null;
            }

            if (PauseTimeLeftLabel != null)
            {
                PauseTimeLeftLabel.Dispose();
                PauseTimeLeftLabel = null;
            }

            if (ResumeInLabel != null)
            {
                ResumeInLabel.Dispose();
                ResumeInLabel = null;
            }

            if (VPNLabel != null)
            {
                VPNLabel.Dispose();
                VPNLabel = null;
            }

            if (VPNStatusLabel != null)
            {
                VPNStatusLabel.Dispose();
                VPNStatusLabel = null;
            }

            if (ResumeBtn != null)
            {
                ResumeBtn.Dispose();
                ResumeBtn = null;
            }
        }
コード例 #12
0
 public void Remove(ImageLogo item)
 {
     context.ImageLogos.Remove(item);
 }
コード例 #13
0
 public ImageLogo Add(ImageLogo item)
 {
     return(context.ImageLogos.Add(item));
 }