Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var model = new FindReplaceParams
            {
                FindWith    = "Find test",
                ReplaceWith = "Replace test",
                IsMatchCase = true,
                IsUseRegex  = true
            };

            var control = new FindReplaceControl();

            control.SetModel(model);

            var form = FormTools.GetFormForControl(control);

            form.ShowDialog();

            var @params = control.GetModel();



            //Application.Run(new Main());
        }
Ejemplo n.º 2
0
        public void ShowCategories()
        {
            WinFormDialog winForms = new WinFormDialog();
            JsonSerializer <CategoryCollection> objectSerializer = new JsonSerializer <CategoryCollection>();
            FileSerializer <CategoryCollection> fileSerializer   = new FileSerializer <CategoryCollection>(objectSerializer);
            FileRepository <CategoryCollection> fileRepository   = new FileRepository <CategoryCollection>(null, fileSerializer, winForms);

            string testPath = @"..\..\Resources\categories.bgt";

            fileRepository.Load(testPath);

            CategoryControl control    = new CategoryControl();
            EventAggregator aggregator = new EventAggregator();

            control.AttachCategories(fileRepository, aggregator);

            Form form = FormTools.GetFormForControl(control);

            form.ShowDialog();
        }