예제 #1
0
        public Statistics(string path, int widthImage)
        {
            InitializeComponent();

            _widthImage = widthImage;
            _path       = path;
            _listDirectoryStatistics = new List <DirectoryStatistics>();
            _stencilsProvider        = new StencilsProvider();
        }
예제 #2
0
        public MainForm(Core core)
        {
            _core = core;

            InitializeComponent();
            Icon = Resources.Icon;
            Font = SystemFonts.DefaultFont;

            Text = $@"{Application.ProductName} v.{Application.ProductVersion}.";

            _treeViewer = new TreeViewer(_trvImages);

            _treeViewer.ImagedataRequred  += TreeViewerOnImagedataRequred;
            _treeViewer.DirectorySelected += TreeViewerOnDirectorySelected;
            _treeViewer.ImageSelected     += OnSelectedImageNode;

            _widgetPlateAdapter = new ControlWidgetAdapter(_imgPlate)
            {
                RootWidget = _imagePlateWidget = new ImageWidget(_imgPlate)
                {
                    ShowVertices       = false,
                    IsEnabled          = false,
                    HandlesMouseEvents = false,
                },
            };

            _stencilsProvider = new StencilsProvider();

            _image.PlateChanged    += OnImageWidgetPlateChanged;
            _image.PrevButtonClick += OnPrevButtonClick;
            _image.NextButtonClick += OnNextButtonClick;

            _imgPlate.Smooth = true;

            _cmbCountries.Sorted = true;
            _cmbStencils.Sorted  = true;
        }