Пример #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            //app options
            FrmAppOptions OptionsForm = new FrmAppOptions();

            if (OptionsForm.ShowDialog(this) == DialogResult.OK)
            {
                UpdateGridPanel(OptionsForm);
            }
        }
Пример #2
0
        private void UpdateGridPanel(FrmAppOptions options)
        {
            //find the panel in the data structure
            int iPanelIndex = FindPanelIndexInGrid(options.iPanelNumber);

            if (iPanelIndex >= 0)
            {
                //update panel image
                Bitmap bmp = new Bitmap(options.strPanelDisplayImagePath);
                Image.GetThumbnailImageAbort myCBK = new Image.GetThumbnailImageAbort(thumCbk);
                Image img = bmp.GetThumbnailImage(180, 180, myCBK, IntPtr.Zero);
                this.listGridPanels[iPanelIndex].thePanel.BackgroundImage = img as Bitmap;

                //attach action (file to play)
                this.listGridPanels[iPanelIndex].strAssociatedAction = options.strFilePath;
            }
        }