Exemplo n.º 1
0
 private void buttonTextFilter_Click(object sender, EventArgs e)
 {
     CustomTextFilter frm = new CustomTextFilter();
 }
Exemplo n.º 2
0
        private void treeListView1_ColumnRightClick(object sender, ColumnClickEventArgs e)
        {
            try
            {
                DialogResult     res;
                CustomTextFilter customtextfilter;
                switch (e.Column)
                {
                case 0:
                    if (namefilter.Count == 0)
                    {
                        customtextfilter = new CustomTextFilter();
                    }
                    else
                    {
                        customtextfilter = new CustomTextFilter(namefilter[0].Operation, namefilter[0].Value);
                    }

                    res = customtextfilter.ShowDialog();
                    if (res == DialogResult.OK)
                    {
                        namefilter.Clear();
                        if (customtextfilter.ClearFilter)
                        {
                            treeListView1.Columns[0].Text = "Name";
                        }
                        else
                        {
                            namefilter.Add(customtextfilter.filter);
                            treeListView1.Columns[0].Text = "*Name*";
                        }
                        FillDataset();
                    }
                    break;

                case 3:
                    AreaSelectForm areaselectform;
                    // if (areafilter.Count == 0)
                    {
                        areaselectform = new AreaSelectForm(this);
                    }
                    // else
                    {
                        //    customtextfilter = new CustomTextFilter(namefilter[0].Operation, namefilter[0].Value);
                    }

                    res = areaselectform.ShowDialog();
                    if (res == DialogResult.OK)
                    {
                        areafilter.Clear();
                        if (areaselectform.ClearFilter)
                        {
                            treeListView1.Columns[3].Text = "Area";
                        }
                        else
                        {
                            areafilter.Add(areaselectform.filter);
                            treeListView1.Columns[3].Text = "*Area = " + tblSolution.m_tblSolution().AreaStringList[(long)areaselectform.filter.Value] + "*";
                        }

                        FillDataset();
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }