示例#1
0
        private void Init()
        {
            String fileName = "patras";
            HImage image;

            try
            {
                image = new HImage(fileName);
            }
            catch (HOperatorException)
            {
                MessageBox.Show("Problem occured while reading file!",
                                "SmartWindow1",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
                return;
            }

            hWndControl.addIconicVar(image);
            hWndControl.repaint();

            hWndControl.setGUICompRangeX(new int[] { XTrackBar.Minimum,
                                                     XTrackBar.Maximum },
                                         XTrackBar.Value);
            hWndControl.setGUICompRangeY(new int[] { YTrackBar.Minimum,
                                                     YTrackBar.Maximum },
                                         YTrackBar.Maximum - YTrackBar.Value);
        }