Пример #1
0
        private void formMain_Load(object sender, System.EventArgs e)
        {
            comboRenderIntent.SelectedIndex = 0;

            //***The SetSolutionName, SetSolutionKey and possibly the SetOEMLicenseKey methods must be called to distribute the runtime***
            //imagXpress1.Licensing.SetSolutionName("YourSolutionName");
            //imagXpress1.Licensing.SetSolutionKey(12345,12345,12345,12345);
            //imagXpress1.Licensing.SetOEMLicenseKey("1.0.AStringForOEMLicensingContactAccusoftSalesForMoreInformation�");

            // Because in this sample the ImageX object is always located in the ImageXView
            // tell the ImageXView component to dispose of the ImageX object when itself is
            // disposed. Otherwise, we would have to dispose of the ImageX object in the Form's
            // Dispose method before the components.Dispose() section.
            imageXView1.AutoImageDispose = true;

            loLoadOptions = new Accusoft.ImagXpressSdk.LoadOptions();

            ICMMonitorProfile = imageXView1.MonitorProfileName;
            ICMPrinterProfile = imageXView1.PrinterProfileName;
            ICMTargetProfile  = imageXView1.TargetProfileName;
            ICMRenderIntent   = imageXView1.ColorRenderIntent;
            //here we set the current directory and image so that the file open dialog box works well
            strCurrentDir = System.IO.Path.Combine(Application.StartupPath, @"..\..\..\..\..\..\..\..\..\..\Common\Images\");
            if (System.IO.Directory.Exists(strCurrentDir))
            {
                System.IO.Directory.SetCurrentDirectory(strCurrentDir);
            }
            strCurrentDir = System.IO.Directory.GetCurrentDirectory();

            strCurrentImage = System.IO.Path.Combine(strCurrentDir, "window.jpg");

            imageXView1.IcmEnabled         = true;
            imageXView1.IcmProofingEnabled = true;

            if (System.IO.File.Exists(strCurrentImage))
            {
                try
                {
                    imageXView1.Image = Accusoft.ImagXpressSdk.ImageX.FromFile(imagXpress1, strCurrentImage, loLoadOptions);
                }
                catch (Accusoft.ImagXpressSdk.ImagXpressException eX)
                {
                    AccusoftError(eX, labelError);
                }
            }
        }
Пример #2
0
 private void comboRenderIntent_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     ICMRenderIntent = (Accusoft.ImagXpressSdk.RenderIntent)comboRenderIntent.SelectedIndex;
     imageXView1.ColorRenderIntent = ICMRenderIntent;
 }