Exemple #1
0
        /// <summary>
        /// This method occurs when the form is loaded.  It
        /// configures the insertion mode and the ink used by
        /// this application.
        /// </summary>
        /// <param name="sender">The control that raised the event.</param>
        /// <param name="e">The event arguments.</param>
        private void AutoClaims_Load(object sender, System.EventArgs e)
        {
            // Initialize the empty ink
            emptyInk = new Ink();

            // Initialize the four different layers of ink on the vehicle diagram:
            // vehicle body, windows, tires, and headlights.
            inkLayers    = new InkLayer[4];
            inkLayers[0] = new InkLayer(new Ink(), Color.Red, false);
            inkLayers[1] = new InkLayer(new Ink(), Color.Violet, false);
            inkLayers[2] = new InkLayer(new Ink(), Color.LightGreen, false);
            inkLayers[3] = new InkLayer(new Ink(), Color.Aqua, false);

            // By default, select the first ink layer
            lstAnnotationLayer.SelectedIndex = 0;
            inkPictVehicle.DefaultDrawingAttributes.Color = inkLayers[lstAnnotationLayer.SelectedIndex].ActiveColor;
        }
        /// <summary>
        /// This method occurs when the form is loaded.  It
        /// configures the insertion mode and the ink used by
        /// this application.
        /// </summary>
        /// <param name="sender">The control that raised the event.</param>
        /// <param name="e">The event arguments.</param>
        private void AutoClaims_Load(object sender, System.EventArgs e)
        {
            // Initialize the empty ink
            emptyInk = new Ink();

            // Initialize the four different layers of ink on the vehicle diagram:
            // vehicle body, windows, tires, and headlights.
            inkLayers    = new InkLayer[4];
            inkLayers[0] = new InkLayer(new Ink(), Color.Red, false);
            inkLayers[1] = new InkLayer(new Ink(), Color.Violet, false);
            inkLayers[2] = new InkLayer(new Ink(), Color.LightGreen, false);
            inkLayers[3] = new InkLayer(new Ink(), Color.Aqua, false);

            // By default, select the first ink layer
            lstAnnotationLayer.SelectedIndex = 0;
            inkPictVehicle.DefaultDrawingAttributes.Color = inkLayers[lstAnnotationLayer.SelectedIndex].ActiveColor;

            // Currently there are recognizers that do not support regular expression
            // input scopes, thus raising exceptions.  This try catch handler copes
            // with these differences in the recognizer. For policy numbers, nothing
            // is being done in reaction to this exception though since there is no
            // factoid that serves the same purpose.
            try
            {
                inkEdPolicyNumber.Factoid = "(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)-(0|1|2|3|4|5|6|7|" +
                                            "8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)";
            }
            catch
            {
                // Do nothing
            }

            // There are also recognizers that do not support common input scopes as
            // well.  This try catch handler copes with these differences in the
            // recognizer. For year, the NUMBER factoid is being set in reaction to
            // this exception.
            try
            {
                inkEdYear.Factoid = "(!IS_DATE_YEAR)";
            }
            catch
            {
                inkEdYear.Factoid = Factoid.Number;
            }
        }
        /// <summary>
        /// This method occurs when the form is loaded.  It
        /// configures the insertion mode and the ink used by
        /// this application.
        /// </summary>
        /// <param name="sender">The control that raised the event.</param>
        /// <param name="e">The event arguments.</param>
        private void AutoClaims_Load(object sender, System.EventArgs e)
        {
            // Initialize the empty ink
            emptyInk = new Ink();

            // Initialize the four different layers of ink on the vehicle diagram:
            // vehicle body, windows, tires, and headlights.
            inkLayers = new InkLayer[4];
            inkLayers[0] = new InkLayer(new Ink(), Color.Red, false);
            inkLayers[1] = new InkLayer(new Ink(), Color.Violet, false);
            inkLayers[2] = new InkLayer(new Ink(), Color.LightGreen, false);
            inkLayers[3] = new InkLayer(new Ink(), Color.Aqua, false);

            // By default, select the first ink layer
            lstAnnotationLayer.SelectedIndex = 0;
            inkPictVehicle.DefaultDrawingAttributes.Color = inkLayers[lstAnnotationLayer.SelectedIndex].ActiveColor;

            // Currently there are recognizers that do not support regular expression
            // input scopes, thus raising exceptions.  This try catch handler copes
            // with these differences in the recognizer. For policy numbers, nothing
            // is being done in reaction to this exception though since there is no
            // factoid that serves the same purpose.
            try
            {
                inkEdPolicyNumber.Factoid = "(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)-(0|1|2|3|4|5|6|7|" +
                    "8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)";
            }
            catch
            {
                // Do nothing
            }

            // There are also recognizers that do not support common input scopes as
            // well.  This try catch handler copes with these differences in the
            // recognizer. For year, the NUMBER factoid is being set in reaction to
            // this exception.
            try
            {
                inkEdYear.Factoid = "(!IS_DATE_YEAR)";
            }
            catch
            {
                inkEdYear.Factoid = Factoid.Number;
            }
        }