Exemplo n.º 1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            TabContent TabContentObj;

            UserFilters = UserFilterObject.LoadFilters("filter.flt");

            TabContentObj             = InitGeneralTab();
            logcat.GeneralTabContent  = TabContentObj;
            logcat.OnDeviceConnected += new LogcatManager.DeviceConnectedEventHandler(logcat_OnDeviceConnected);
            logcat.Adb = LoadAdbLocation();

            if (UserFilters == null)
            {
                UserFilters = new List <UserFilterObject>();
            }
            else
            {
                foreach (UserFilterObject filter in UserFilters)
                {
                    TabContentObj = AddNewTab(filter.Name, false);
                    logcat.AddSlot(filter.Name, filter.FilterObject).LinkUi(TabContentObj);
                }
            }

            LocateTabs();
        }
Exemplo n.º 2
0
        private void addNewFilterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TabContent NewTabContentObj;
            string     Name;
            FilterList List;
            bool       LinkState;

            UserFilterObject UserFilter;

            frmNewFilter filter = new frmNewFilter();

            filter.ShowDialog();

            if (filter.GetFilterList() == null)
            {
                return;
            }

            Name      = filter.GetFilterName();
            List      = filter.GetFilterList();
            LinkState = filter.GetLinkState();

            UserFilter = new UserFilterObject(List, Name, LinkState);

            UserFilters.Add(UserFilter);
            UserFilterObject.SaveFilters(UserFilters, "filter.flt");


            NewTabContentObj = AddNewTab(Name, true);

            logcat.AddSlot(Name, List).LinkUi(NewTabContentObj);
        }
Exemplo n.º 3
0
        private void addNewFilterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TabContent NewTabContentObj;
            string Name;
            FilterList List;
            bool LinkState;

            UserFilterObject UserFilter;

            frmNewFilter filter = new frmNewFilter();
            filter.ShowDialog();

            if (filter.GetFilterList() == null)
                return;

            Name = filter.GetFilterName();
            List = filter.GetFilterList();
            LinkState = filter.GetLinkState();

            UserFilter = new UserFilterObject(List, Name, LinkState);

            UserFilters.Add(UserFilter);
            UserFilterObject.SaveFilters(UserFilters, "filter.flt");

            NewTabContentObj = AddNewTab(Name, true);

            logcat.AddSlot(Name, List).LinkUi(NewTabContentObj);
        }
Exemplo n.º 4
0
        private void filtersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GenericArrayList <UserFilterObject> RemovedObjects;
            TabPage CurrTab;

            frmFilters FiltersDlg = new frmFilters(UserFilters);

            FiltersDlg.ShowDialog();

            RemovedObjects = FiltersDlg.GetRemovedObjects();

            if (RemovedObjects.Count > 0)
            {
                //perform real deleting operation

                foreach (UserFilterObject filter in RemovedObjects)
                {
                    logcat.RemoveSlot(filter.Name);

                    for (int i = 0; i < tbFilterContainer.TabPages.Count; i++)
                    {
                        CurrTab = tbFilterContainer.TabPages[i];

                        if (CurrTab.Text == filter.Name)
                        {
                            tbFilterContainer.TabPages.Remove(CurrTab);
                            CurrTab.Dispose();
                        }
                    }
                }

                RemovedObjects.Clear();

                UserFilterObject.SaveFilters(UserFilters, "filter.flt");
            }
        }