Example #1
0
    protected void Duyuru10()
    {
        DataTable      dt       = new DataTable();
        string         strQuery = "select TOP 10 d_id,baslik,duyuru,t_id,t_isim,tarih,onay from duyuru WHERE onay=1 ORDER BY d_id DESC";
        SqlCommand     cmd      = new SqlCommand(strQuery);
        SqlConnection  con      = new SqlConnection(WebConfigurationManager.ConnectionStrings["CengP"].ConnectionString);
        SqlDataAdapter sda      = new SqlDataAdapter();

        cmd.CommandType = CommandType.Text;
        cmd.Connection  = con;
        try
        {
            con.Open();
            sda.SelectCommand = cmd;
            sda.Fill(dt);
            ListView2.DataSource = dt;
            ListView2.DataBind();
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
        finally
        {
            con.Close();
            sda.Dispose();
            con.Dispose();
        }
    }
Example #2
0
        //gv绑定
        public void ListViewBind2()
        {
            string Str1 = " where ui_status='正常' and ui_lx='企业'";

            if (!string.IsNullOrEmpty(bm1.SelectedItem.Value))
            {
                if (bm1.SelectedItem.Value == "1000000")
                {
                    Str1 = Str1 + " and yn_bmglz='是'";
                }
                else
                {
                    Str1 = Str1 + " and ui_ssbm= '" + bm1.SelectedItem.Value + "' ";
                }
            }
            if (!string.IsNullOrEmpty(cxtj1.Text))
            {
                Str1 = Str1 + " AND (UI_ID LIKE '%" + hkdb.GetStr(cxtj1.Text) + "%' OR UI_DESC LIKE '%" + hkdb.GetStr(cxtj1.Text) + "%')";
            }
            AspNetPager2.RecordCount = (int)SqlHelper.ExecuteScalar("select count(*) from yh" + Str1);

            DataSet ds = SqlHelper.ExecuteDs("select ui_id,ui_desc,ui_sex,ui_lx,(case when yn_bmglz='是' then 'ch' else 'noch' end)as yn_bmglz,b.bm_mc,c.zwmc from yh a left outer JOIN BM b on (a.ui_ssbm=b.bm_id)left outer JOIN ZW c on (a.ui_zw=c.zwid)" + Str1 + "order by a.number", AspNetPager2.PageSize * (AspNetPager2.CurrentPageIndex - 1), AspNetPager2.PageSize);

            ListView2.DataSource = ds;
            ListView2.DataBind();
        }
Example #3
0
        protected void getdata()
        {
            SqlDataAdapter top4 = new SqlDataAdapter("IUD_BaiViet", cnn);

            top4.SelectCommand.CommandType = CommandType.StoredProcedure;
            top4.SelectCommand.Parameters.AddWithValue("@action", "select_new");
            DataTable dt4 = new DataTable();

            top4.Fill(dt4);
            ListView1.DataSource = dt4;
            ListView1.DataBind();

            SqlDataAdapter topTT4 = new SqlDataAdapter("IUD_BaiViet", cnn);

            topTT4.SelectCommand.CommandType = CommandType.StoredProcedure;
            topTT4.SelectCommand.Parameters.AddWithValue("@action", "select_new");
            DataTable dtTT4 = new DataTable();

            topTT4.Fill(dtTT4);
            ListView2.DataSource = dtTT4;
            ListView2.DataBind();

            SqlDataAdapter topDA4 = new SqlDataAdapter("IUD_DuAn", cnn);

            topDA4.SelectCommand.CommandType = CommandType.StoredProcedure;
            topDA4.SelectCommand.Parameters.AddWithValue("@action", "select_top4");
            DataTable dtDA4 = new DataTable();

            topDA4.Fill(dtDA4);
            ListView3.DataSource = dtDA4;
            ListView3.DataBind();
        }
 protected void txtSearch_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (Session["propertyvalue"] != null)
         {
             string tc_PropertyVal = Session["propertyvalue"].ToString();
             ListView1.DataSource = uc.GetNewComplaintsbySearch(tc_PropertyVal, txtSearch.Text);
             ListView1.DataBind();
             ListView2.DataSource = uc.GetOngoingComplaintsbySearch(tc_PropertyVal, txtSearch.Text);
             ListView2.DataBind();
             ListView3.DataSource = uc.GetResolvedComplaintsbySearch(tc_PropertyVal, txtSearch.Text);
             ListView3.DataBind();
         }
         else
         {
             Session["propertyvalue"] = "0";
         }
     }
     catch (Exception ex)
     {
         string text = ex.Message.ToString();
         ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpoperror('" + text + "')</script>", false);
     }
 }
Example #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string lastPartUrl = HttpContext.Current.Request.Url.AbsoluteUri.Split('=').Last();
        string mycon       = "";

        mycon = ConfigurationManager.ConnectionStrings["mycon"].ToString();
        SqlConnection objsqlconn = new SqlConnection(mycon);

        objsqlconn.Open();
        SqlCommand objcmd;

        if (lastPartUrl == "book")
        {
            objcmd = new SqlCommand("Select * from books", objsqlconn);
            using (SqlDataAdapter sda = new SqlDataAdapter(objcmd))
            {
                DataTable dt = new DataTable();
                sda.Fill(dt);
                lvCustomers.DataSource = dt;
                lvCustomers.DataBind();
            }
        }
        else if (lastPartUrl == "thesis")
        {
            objcmd = new SqlCommand("Select * from thesis", objsqlconn);
            using (SqlDataAdapter sda = new SqlDataAdapter(objcmd))
            {
                DataTable dt = new DataTable();
                sda.Fill(dt);
                ListView2.DataSource = dt;
                ListView2.DataBind();
            }
        }
    }
Example #6
0
 protected override void InitUI()
 {
     base.InitUI();
     this.listView          = base.FindTransform("ListItems").GetComponent <ListView2>();
     this.myPowerText       = base.FindTransform("TextPowerNum").GetComponent <Text>();
     this.standardPowerText = base.FindTransform("TextMaxPowerNum").GetComponent <Text>();
 }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["REQUESTCODE"] != null)
            {
                RequestC = Request.QueryString["REQUESTCODE"];
                RO       = ec.GetRequestbyRequestCode(RequestC);
                if (Request.QueryString["ItemCode"] != null)
                {
                    ItCode = Request.QueryString["ItemCode"];
                    var rd = Session["ItemDetails"];
                    ec.AddRequestDetailtoCurrentRequest(RequestC, (List <RequestDTO>)rd);
                    Session["ItemDetails"] = null;
                }
            }
            else
            {
                Panel2.Visible = true;
                Panel1.Visible = false;
                return;
            }

            if (!IsPostBack)
            {
                FillFields();
                ListView1.DataSource = ec.ListAllRequestDetails(RO);

                ListView1.DataBind();
                ListView2.DataSource = ec.ListDisbursementbyRequest(RO);
                ListView2.DataBind();
            }
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable     dt         = new DataTable();
            string        ConString  = ConfigurationManager.ConnectionStrings["DB_MOBILE_SHOPConnectionString"].ConnectionString;
            SqlConnection con        = new SqlConnection(ConString);
            SqlCommand    objCommand = new SqlCommand("select p.id,p.pimage,p.pbrand,p.pmodel,p.pprice from ORDER_TRACK o join product p on p.id=o.PRODUCTID where ORDERID=@orderid", con);

            objCommand.Parameters.AddWithValue("@orderid", Request.QueryString["id"]);
            con.Open();
            SqlDataAdapter da = new SqlDataAdapter(objCommand);

            da.Fill(dt);
            con.Close();
            ListView1.DataSource = dt;
            ListView1.DataBind();

            DataTable     dt2         = new DataTable();
            string        ConString2  = ConfigurationManager.ConnectionStrings["DB_MOBILE_SHOPConnectionString"].ConnectionString;
            SqlConnection con2        = new SqlConnection(ConString2);
            SqlCommand    objCommand2 = new SqlCommand("select o.id,o.ocustomer,o.odate,o.oamount,c.cname from Tbl_order o join tbl_customer c on c.id=o.ocustomer where o.id=@id", con2);

            objCommand2.Parameters.AddWithValue("@id", Request.QueryString["id"]);
            con2.Open();
            SqlDataAdapter da2 = new SqlDataAdapter(objCommand2);

            da2.Fill(dt2);
            con2.Close();
            ListView2.DataSource = dt2;
            ListView2.DataBind();
        }
Example #9
0
    private void BindAttachment()
    {
        DataTable dt = objBLLPurc.GET_JOB_DONE_ATTACHMENT(UDFLib.ConvertToInteger(ViewState["VESSEL_ID"])
                                                          , null
                                                          , UDFLib.ConvertToInteger(ViewState["Job_History_Id"]), UDFLib.ConvertToInteger(ViewState["OFFICE_ID"]));



        DataView dvImage = dt.DefaultView;

        dvImage.RowFilter = "Is_Image='1' ";

        ListView1.DataSource = dvImage;
        ListView1.DataBind();
        ListView2.DataSource = dvImage;
        ListView2.DataBind();
        hidenTotalrecords.Value = dvImage.Count.ToString();
        HCurrentIndex.Value     = "0";
        if (dvImage.Count == 0)
        {
            tdg.Visible = false;
        }
        else
        {
            tdg.Visible = true;
        }

        dt.DefaultView.RowFilter = "Is_Image='0'  ";
        gvAttachments.DataSource = dt.DefaultView;
        gvAttachments.DataBind();
    }
Example #10
0
        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            SqlDataAdapter da = new SqlDataAdapter("IUD_BaiViet_Order", cnn);

            da.SelectCommand.CommandType = CommandType.StoredProcedure;
            if (DropDownList1.SelectedItem.Text == "Cũ nhất")
            {
                da.SelectCommand.Parameters.AddWithValue("@action", "select_all_ban_asc");
                DataTable dt = new DataTable();
                da.Fill(dt);
                ListView1.DataSource = dt;
                ListView1.DataBind();

                ListView2.Items.Clear();
                ListView2.DataSource = null;
                ListView2.DataBind();
            }
            if (DropDownList1.SelectedItem.Text == "Mới nhất")
            {
                da.SelectCommand.Parameters.AddWithValue("@action", "select_all_ban_desc");
                DataTable dt = new DataTable();
                da.Fill(dt);
                ListView1.DataSource = dt;
                ListView1.DataBind();

                ListView2.Items.Clear();
                ListView2.DataSource = null;
                ListView2.DataBind();
            }
            if (DropDownList1.SelectedItem.Text == "Mặc định")
            {
                getdata();
            }
        }
Example #11
0
    protected void Yazar()
    {
        DataTable      dt       = new DataTable();
        string         strQuery = "select * from members WHERE totalpoint>=2500 and onay=1 ORDER BY totalpoint DESC";
        SqlCommand     cmd      = new SqlCommand(strQuery);
        SqlConnection  con      = new SqlConnection(WebConfigurationManager.ConnectionStrings["CengP"].ConnectionString);
        SqlDataAdapter sda      = new SqlDataAdapter();

        cmd.CommandType = CommandType.Text;
        cmd.Connection  = con;
        try
        {
            con.Open();
            sda.SelectCommand = cmd;
            sda.Fill(dt);
            ListView2.DataSource = dt;
            ListView2.DataBind();
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
        finally
        {
            con.Close();
            sda.Dispose();
            con.Dispose();
        }
    }
Example #12
0
    protected void İçerikAl1()
    {
        DataTable dt = new DataTable();
        //string strQuery = "SELECT [content_id], [s_id],[t_id],REPLACE([s_id], ' ', '-') [SLUG], left(content, 200) [content] FROM [lectureContent]";
        string strQuery = "SELECT * from courses";

        SqlCommand     cmd = new SqlCommand(strQuery);
        SqlConnection  con = new SqlConnection(WebConfigurationManager.ConnectionStrings["CengP"].ConnectionString);
        SqlDataAdapter sda = new SqlDataAdapter();

        cmd.CommandType = CommandType.Text;
        cmd.Connection  = con;
        try
        {
            con.Open();
            sda.SelectCommand = cmd;
            sda.Fill(dt);
            ListView2.DataSource = dt;
            ListView2.DataBind();
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
        finally
        {
            con.Close();
            sda.Dispose();
            con.Dispose();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LblUploadOk2.Text = "";
        LblUploadOk.Text  = "";
        string n        = DropDownList1.SelectedValue.ToString();
        string cartella = "~/NewsImg/" + n + "/";
        string curFile  = "/NewsImg/" + n + "/" + n + ".jpg";

        if (File.Exists(Server.MapPath(curFile)))
        {
            Image ImageP = new Image();
            ImageP.ImageUrl = cartella + n + ".jpg";
            ImageP.CssClass = "NewsImg";
            PlaceHolder1.Controls.Add(ImageP);
        }
        String path = Server.MapPath("~/NewsImg/" + n + "/");

        if (!Directory.Exists(path))
        {
            Directory.CreateDirectory(path);
        }
        string[]        immagini  = System.IO.Directory.GetFiles(Server.MapPath(cartella), "*.jpg");
        string[]        filePaths = Directory.GetFiles(Server.MapPath(cartella), "*.jpg");
        List <ListItem> files     = new List <ListItem>();

        foreach (string filePath in filePaths)
        {
            files.Add(new ListItem(Path.GetFileName(filePath), filePath));
        }
        ListView2.DataSource = files;
        ListView2.DataBind();
    }
Example #14
0
    private void FoodmenuShow()
    {
        // ListView1.DataSource = uc.ShowFoodMenu();
        // ListView1.DataBind();
        try
        {
            ListView1.DataSource = uc.GetfoodmenuSunday();
            ListView1.DataBind();

            ListView2.DataSource = uc.GetfoodmenuMonday();
            ListView2.DataBind();

            ListView3.DataSource = uc.GetfoodmenuTuesday();
            ListView3.DataBind();

            ListView4.DataSource = uc.GetfoodmenuWednesday();
            ListView4.DataBind();

            ListView5.DataSource = uc.GetfoodmenuThursday();
            ListView5.DataBind();

            ListView6.DataSource = uc.GetfoodmenuFriday();
            ListView6.DataBind();

            ListView7.DataSource = uc.GetfoodmenuSaturday();
            ListView7.DataBind();
        }
        catch (Exception ex)
        {
            string text = ex.Message.ToString();
            ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpoperror('" + text + "')</script>", false);
        }
    }
Example #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!Page.IsPostBack)
            //{
            //ListView1.Visible = true;
            string        ConString  = ConfigurationManager.ConnectionStrings["DB_MOBILE_SHOPConnectionString"].ConnectionString;
            SqlConnection con        = new SqlConnection(ConString);
            SqlCommand    objCommand = new SqlCommand("select * from Product", con);

            con.Open();
            SqlDataAdapter da = new SqlDataAdapter(objCommand);

            da.Fill(dt);
            con.Close();
            ListView1.DataSource = dt;
            ListView1.DataBind();

            SqlCommand objCommand2 = new SqlCommand("select * from Manufacturer", con);

            con.Open();
            SqlDataAdapter da2 = new SqlDataAdapter(objCommand2);

            da2.Fill(dt2);
            con.Close();
            ListView2.DataSource = dt2;
            ListView2.DataBind();
            //}
        }
Example #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (User.Identity.IsAuthenticated)
            {
                pnlAnonimo.Visible = false;
                if (User.Identity.Name != "*****@*****.**")
                {
                    ServizioPrevendita obj_pre = new ServizioPrevendita();
                    ListView1.DataSource = obj_pre.RecuperaEventiMailticket();
                    ListView1.DataBind();
                    pnlUtente.Visible = true;
                    pnlAdmin.Visible  = false;
                }
                else
                {
                    ServizioPrevendita obj_pre = new ServizioPrevendita();
                    ListView2.DataSource = obj_pre.RecuperaEventiMailticket();
                    ListView2.DataBind();

                    pnlUtente.Visible = false;
                    pnlAdmin.Visible  = true;
                }
            }
            else
            {
                pnlAnonimo.Visible = true;
                pnlUtente.Visible  = false;
                pnlAdmin.Visible   = false;
            }
        }
Example #17
0
        private void okToolStripButton_Click(object sender, EventArgs e)
        {
            // Click on OK button
            try
            {
                Cursor = Cursors.WaitCursor;

                SelectedTracks = new IGE[ListView2.CheckedCount(igeListView)];

                // Browsing items...
                int index = 0;

                foreach (ListViewItem li in igeListView.Items)
                {
                    if (li.Checked)
                    {
                        SelectedTracks[index++] = li.Tag as IGE;
                    }
                }

                DialogResult = DialogResult.OK;
                Close();
            }
            catch (Exception ex)
            {
                MessageBoxes.ShowError(this, ex);
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
Example #18
0
 protected void showphoto_Command(object sender, CommandEventArgs e)
 {
     Session["albumid"] = e.CommandArgument;
     ListView1.Visible  = false;
     ListView2.DataBind();
     ListView2.Visible   = true;
     LinkButton1.Visible = true;
 }
Example #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlCommand    komut = new SqlCommand(" Select * From Tarif", bgl.baglanti());
            SqlDataReader dr    = komut.ExecuteReader();

            ListView2.DataSource = dr;
            ListView2.DataBind();
        }
        protected void BindListView()
        {
            ListView1.DataSource = prefMentorList;
            ListView1.DataBind();

            ListView2.DataSource = requests;
            ListView2.DataBind();
        }
Example #21
0
        public async void LlenarMenu()
        {
            ListView2 oEjemploListView1Model = new ListView2();

            ListView22.ItemsSource   = null;
            ListView22.ItemsSource   = oEjemploListView1Model.ObtenerMenuEjemplo1();
            ListView22.ItemSelected += OnClickOpcionSeleccionada;
        }
Example #22
0
 protected override void InitUI()
 {
     base.InitUI();
     this.m_listTab = base.FindTransform("ListTabs").GetComponent <ListView2>();
     this.m_listTab.RowFrefabName = "OperateActivityTagItem";
     this.m_TransformContent      = base.FindTransform("Content");
     this.m_lblTimeText           = base.FindTransform("TimeText").GetComponent <Text>();
 }
Example #23
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        SqlDataSource1.SelectCommand = "SELECT * FROM [PATIENT] WHERE [FIRSTNAME] & \" \" & [LASTNAME]=\"" + TextBox1.Text + "\";";
        ListView1.DataBind();

        SqlDataSource3.SelectCommand = "SELECT [IMG_NAME] FROM [PATIENT] WHERE [FIRSTNAME] & \" \" & [LASTNAME]=\"" + TextBox1.Text + "\";";
        ListView2.DataBind();
        //TextBox5.Text = user;
    }
Example #24
0
        /// <summary>
        /// Met à jour la liste des entrées
        /// </summary>
        /// <param name="keepSelection">true pour replacer le sélecteur à l'emplacement d'origine, false sinon</param>
        private void _UpdateEntryList(bool keepSelection)
        {
            // Sauvegarde de l'indice sélectionné
            if (keepSelection)
            {
                ListView2.StoreSelectedIndex(entryList);
            }

            // Vidage de liste
            entryList.Items.Clear();
            entryCountLabel.Text = _ENTRY_COUNT_START_TEXT;

            // Lecture de la structure
            foreach (DBResource.Entry anotherEntry in _LeDB.EntryList)
            {
                if (anotherEntry.isValid)
                {
                    ListViewItem anotherItem = new ListViewItem(string.Format("{0}", anotherEntry.index));

                    // Identifiant uniquement pour les données
                    if (anotherEntry.isComment)
                    {
                        anotherItem.SubItems.Add(string.Format("{0}", ""));

                        // Ligne en blanc sur fond vert
                        anotherItem.BackColor = GuiConstants.COLOR_BACK_COMMENT_ITEM;
                        anotherItem.ForeColor = GuiConstants.COLOR_FRONT_COMMENT_ITEM;
                    }
                    else
                    {
                        anotherItem.SubItems.Add(string.Format("{0}", anotherEntry.id == null ? "" : anotherEntry.id.Id));
                    }

                    anotherItem.SubItems.Add(string.Format("{0}", anotherEntry.value));

                    entryList.Items.Add(anotherItem);
                }
            }

            // End of list
            ListViewItem endItem = new ListViewItem(_ENTRY_END)
            {
                BackColor = GuiConstants.COLOR_BACK_COMMENT_ITEM,
                ForeColor = GuiConstants.COLOR_FRONT_COMMENT_ITEM
            };

            entryList.Items.Add(endItem);

            // Nombre d'entrées
            entryCountLabel.Text = string.Format(_ENTRY_COUNT_TEXT, _LeDB.EntryList.Count, _LeDB.CurrentCulture);

            // Restauration de la sélection
            if (keepSelection)
            {
                ListView2.RestoreSelectedIndex(entryList);
            }
        }
Example #25
0
    protected void onlistcat(object sender, ListViewCommandEventArgs e)
    {
        //Label lblid = (Label)e.Item.FindControl("lblid");
        LinkButton hypcat = (LinkButton)e.Item.FindControl("hypcat");

        //  Response.Write("<script>alert('" + hypcat.Text + "')</script>");
        sqljobs.SelectCommand = "SELECT [Id], [Name], [abstract], [experience], [expires], [img],[Category] FROM [job] where [category]='" + hypcat.Text + "'";
        ListView2.DataBind();
    }
Example #26
0
        /// <summary>
        /// Extracts all contents from BNK current file
        /// </summary>
        private void _ExtractAllBnkContents(object sender, EventArgs e)
        {
            // Flat view only
            fileViewFlatToolStripMenuItem.Checked = true;
            fileViewFlatToolStripMenuItem_Click(sender, e);

            ListView2.SelectAll(contentListView);
            fileExtractToolStripButton_Click(sender, e);
        }
    public void fill_version()
    {
        int cnid = Convert.ToInt32(Request.QueryString["id"]);

        cmd.CommandText = "select * from  tblcarname cn, tblcarver cv,tblcardetails cd  where cv.vr_status='Enabled' and cd.cn_id=cn.cn_id and cn.cn_id=cv.cn_id and cv.cn_id in(select cn.cn_id from tblcarver cv,tblcarname cn,tblcardetails cd where cn.cn_id=cv.cn_id and cd.cn_id=cn.cn_id and cv.vr_id='" + cnid + "')";
        dt = da.GetRecords(cmd);
        ListView2.DataSource = dt;
        ListView2.DataBind();
    }
    public void fill_version(int id)
    {
        int cnid = id;

        cmd.CommandText = "select * from  tblcarname cn, tblcarver cv, tblcardetails cd  where cv.vr_status='Enabled' and cd.cn_id=cn.cn_id and cn.cn_id=cv.cn_id and cv.cn_id in(select cn.cn_id from tblcarver cv,tblcarname cn,tblcardetails cd where cn.cn_id=cv.cn_id and cd.cn_id=cn.cn_id and cv.vr_id='" + cnid + "')";
        dt = da.GetRecords(cmd);
        ListView2.DataSource = dt;
        ListView2.DataBind();
    }
Example #29
0
        private void fileExtractToolStripButton_Click(object sender, EventArgs e)
        {
            if (_GetSelectedFilePaths().Count == 0)
            {
                // Aucune sélection > on sélectionne tout
                ListView2.SelectAll(contentListView);
            }

            // Vérification de la sélection effective
            int fileCount = _GetSelectedFilePaths().Count;

            if (fileCount != 0)
            {
                try
                {
                    // Mémorisation du dernier emplacement d'extraction
                    if (_LastExtractLocation == null)
                    {
                        _LastExtractLocation = CurrentFolder;
                    }

                    folderBrowserDialog.SelectedPath = _LastExtractLocation;
                    folderBrowserDialog.Description  =
                        string.Format(_LABEL_FOLDER_BROWSE_EXTRACT, fileCount);

                    DialogResult dr =
                        folderBrowserDialog.ShowDialog();

                    if (dr == DialogResult.OK)
                    {
                        _LastExtractLocation = folderBrowserDialog.SelectedPath;

                        // Parcours de la liste de fichiers sélectionnés
                        Cursor = Cursors.WaitCursor;

                        foreach (string currentPackedFileName in _GetSelectedFilePaths())
                        {
                            _ExtractPackedFile(currentPackedFileName, _LastExtractLocation);
                        }

                        Cursor = Cursors.Default;

                        // EVO_136: display files in explorer after extract, if wanted
                        if (bool.Parse(Program.ApplicationSettings.ExtractDisplayInExplorer))
                        {
                            ProcessStartInfo explorerProcess = new ProcessStartInfo(_LastExtractLocation);
                            Process.Start(explorerProcess);
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBoxes.ShowError(this, ex);
                }
            }
        }
Example #30
0
    private void BindHotSong()
    {
        DataTable dt = SongManager.selectAllHot();

        if (dt != null && dt.Rows.Count != 0)
        {
            ListView2.DataSource = dt;
            ListView2.DataBind();
        }
    }
Example #31
0
        /// <summary>Creates a new ListView2Item</summary>
        /// <param name="rowNumber">Number of owning row</param>
        /// <param name="colNumber">Number of owning column</param>
        /// <param name="rowTag">The item's tag</param>
        /// <param name="columns">Array of column information</param>
        /// <param name="data">The data that should be shown in this LV2I</param>
        /// <param name="font">Which font should be used</param>
        public ListView2Item(int rowNumber, int colNumber, string rowTag, ListView2.ColumnInfo[] columns, List<Object> data, Font font)
        {
            MinHeight = 16;
            HeightRequest = 16;
            MinWidth = 500;
            ExpandHorizontal = true;
            ExpandVertical = true;

            _Values = data.ToArray();
            _Cols = columns;
            _FontToDraw = font;
            Tag = rowTag;
            RowNo = rowNumber;
            ColNo = colNumber;

            QueueDraw();
        }
Example #32
0
        /// <summary>Enable theming of the ListView2</summary>
        /// <param name="Widget">The ListView2 that needs to be themized</param>
        /// <param name="Selector">The selector pattern</param>
        public void Stylize(ListView2 Widget, string Selector = "FileList")
        {
            Stylize(Widget as Widget,Selector);
            Selector all = CSS[Selector];
            Selector row1 = CSS[Selector+"RowA"];
            Selector row2 = CSS[Selector+"RowB"];
            Selector sel = CSS[Selector+"Row:checked"];
            Selector point = CSS[Selector+"Row:active"];
            if (all.Declarations["font-family"].Value != "inherit")
                Widget.Font = Font.FromName(
                    all.Declarations["font-family"].Value
                );
            if (all.Declarations["background-color"].Value != "inherit")
                Widget.BackgroundColor = Utilities.GetXwtColor(all.Declarations["background-color"].Value);
            if (row1.Declarations["background-color"].Value != "inherit")
                Widget.NormalBgColor1 = Utilities.GetXwtColor(row1.Declarations["background-color"].Value);
            if (row2.Declarations["background-color"].Value != "inherit")
                Widget.NormalBgColor2 = Utilities.GetXwtColor(row2.Declarations["background-color"].Value);
            if (row1.Declarations["color"].Value != "inherit")
                Widget.NormalFgColor1 = Utilities.GetXwtColor(row1.Declarations["color"].Value);
            if (row2.Declarations["color"].Value != "inherit")
                Widget.NormalFgColor2 = Utilities.GetXwtColor(row2.Declarations["color"].Value);
            if (point.Declarations["background-color"].Value != "inherit")
                Widget.PointedBgColor = Utilities.GetXwtColor(point.Declarations["background-color"].Value);
            if (point.Declarations["color"].Value != "inherit")
                Widget.PointedFgColor = Utilities.GetXwtColor(point.Declarations["color"].Value);
            if (sel.Declarations["background-color"].Value != "inherit")
                Widget.SelectedBgColor = Utilities.GetXwtColor(sel.Declarations["background-color"].Value);
            if (sel.Declarations["color"].Value != "inherit")
                Widget.SelectedFgColor = Utilities.GetXwtColor(sel.Declarations["color"].Value);

            Widget.BorderVisible = GetBorder(all.Declarations["border-style"].Value);
        }