Exemplo n.º 1
0
        // Load data from bin file
        private void buttonLoadColorData_Click(object sender, EventArgs e)
        {
            mozaic = new Mozaic(Path.Combine(Properties.Settings.Default.appData, "tiles"), Properties.Settings.Default.appData, Properties.Settings.Default.wRgbErr, Properties.Settings.Default.wIntErr, Properties.Settings.Default.wRelIntErr, Properties.Settings.Default.matchGridSize);
            mozaic.loadData();

            checkedListBoxTileCollections.Items.Clear();
            List <string> tileDirs = mozaic.getTileDirectories();

            foreach (string dir in tileDirs)
            {
                checkedListBoxTileCollections.Items.Add(dir);
                // Load webex combo
                comboBoxWebex.Items.Add(dir);
            }
        }
Exemplo n.º 2
0
        private async void buttonPrepareMozaic_Click(object sender, EventArgs e)
        {
            mozaic = new Mozaic(Path.Combine(Properties.Settings.Default.appData, "tiles"), Properties.Settings.Default.appData, Properties.Settings.Default.wRgbErr, Properties.Settings.Default.wIntErr, Properties.Settings.Default.wRelIntErr, Properties.Settings.Default.matchGridSize);
            var progressHandler = new Progress <int>(value =>
            {
                progressBarMakeMozaic.Value = value;
            });
            var progress = progressHandler as IProgress <int>;

            await Task.Run(() =>
            {
                mozaic.prepareData(progress);
            });

            List <string> tileDirs = mozaic.getTileDirectories();

            foreach (string dir in tileDirs)
            {
                checkedListBoxTileCollections.Items.Add(dir);
            }

            progressBarMakeMozaic.Value = 0;
        }