コード例 #1
0
        public void ViewerCarousel_OnImageSelected(object sender, EventArgs e)
        {
            Carousel carousel = sender as Carousel;

            if (carousel?.ActiveImage.Tag != null)
            {
                string i = carousel.ActiveImage.Tag.ToString();
                switch (i)
                {
                case "SummaryImages":
                    Selector f = new Selector(Info.SummaryImages);
                    f.Show();
                    Close();
                    return;

                case "DatabaseImages":
                case "SQLiteData":
                    DatabaseSelector ds = new DatabaseSelector(Info.DatabaseImages);
                    ds.Show();
                    Close();
                    return;

                case "Division":
                    Selector d = new Selector(Info.DivisionImages);
                    d.Show();
                    Close();
                    return;

                case "FunctionImages":
                    Selector fi = new Selector(Info.FunctionImages);
                    fi.Show();
                    Close();
                    return;

                case "Appropriation":
                    Selector aps = new Selector(Info.AppropriationImages);
                    aps.Show();
                    Close();
                    return;

                case "ObjectClass":
                    Selector obs = new Selector(Info.ObjectClass);
                    obs.Show();
                    Close();
                    return;
                }

                Source      source = (Source)Enum.Parse(typeof(Source), i);
                SummaryForm sf     = new SummaryForm(source, Provider.SQLite);
                sf.Show();
                Close();
            }
        }
コード例 #2
0
        private void ViewerCarousel_OnImageSelected(object sender, EventArgs e)
        {
            Carousel carousel = sender as Carousel;
            string   i        = carousel.ActiveImage.Tag.ToString();
            Function s        = (Function)Enum.Parse(typeof(Function), i);

            switch (s)
            {
            case Function.SQLiteData:
                DatabaseSelector sd = new DatabaseSelector(Info.DatabaseImages);
                sd.Show();
                Close();
                break;

            case Function.BudgetTools:
                BudgetTools bt = new BudgetTools();
                bt.Show();
                break;

            case Function.DataTools:
                BudgetTools dt = new BudgetTools();
                dt.Show();
                break;

            case Function.ExcelImporter:
                ExcelData ei = new ExcelData();
                ei.Show();
                break;

            case Function.PdfDataReader:
                PdfDataReader pdfdr = new PdfDataReader();
                pdfdr.Show();
                break;
            }

            Close();
        }