private IHatchClass method_3()
        {
            IHatchClass      class2 = new HatchClassClass();
            IHatchInputValue value2 = new HatchInputValueClass
            {
                Value = 0
            };

            class2.HatchInterval = value2;
            IHatchTemplate   template        = new HatchTemplateClass();
            ISymbol          symbol          = new SimpleLineSymbolClass();
            IHatchDefinition hatchDefinition = new HatchLineDefinitionClass
            {
                HatchSymbol      = symbol,
                DisplayPrecision = 0
            };

            (hatchDefinition as IHatchLineDefinition).Length = 0.0;
            hatchDefinition.Offset    = 0.0;
            hatchDefinition.Alignment = esriHatchAlignmentType.esriHatchAlignLeft;
            template.Name             = "HatchTemplate1";
            template.AddHatchDefinition(1, hatchDefinition);
            class2.HatchTemplate = template;
            return(class2);
        }
Example #2
0
 private void radioGroup1_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.panel1.Visible = this.radioGroup1.SelectedIndex == 0;
     if (this.bool_0)
     {
         IHatchDefinition definition = null;
         if (this.radioGroup1.SelectedIndex == 0)
         {
             definition = new HatchLineDefinitionClass
             {
                 HatchSymbol = new SimpleLineSymbolClass()
             };
             try
             {
                 (definition as IHatchLineDefinition).Length = double.Parse(this.txtLength.Text);
             }
             catch
             {
             }
             if (this.ihatchDefinition_0 != null)
             {
                 definition.AdjustTextOrientation  = this.ihatchDefinition_0.AdjustTextOrientation;
                 definition.Alignment              = this.ihatchDefinition_0.Alignment;
                 definition.DisplayPrecision       = this.ihatchDefinition_0.DisplayPrecision;
                 definition.Expression             = this.ihatchDefinition_0.Expression;
                 definition.ExpressionParserEngine = this.ihatchDefinition_0.ExpressionParserEngine;
                 definition.ExpressionSimple       = this.ihatchDefinition_0.ExpressionSimple;
                 definition.Offset      = this.ihatchDefinition_0.Offset;
                 definition.Prefix      = this.ihatchDefinition_0.Prefix;
                 definition.ShowSign    = this.ihatchDefinition_0.ShowSign;
                 definition.Suffix      = this.ihatchDefinition_0.Suffix;
                 definition.TextDisplay = this.ihatchDefinition_0.TextDisplay;
                 definition.TextSymbol  = this.ihatchDefinition_0.TextSymbol;
             }
         }
         else
         {
             definition = new HatchMarkerDefinitionClass
             {
                 HatchSymbol = new SimpleMarkerSymbolClass()
             };
             if (this.ihatchDefinition_0 != null)
             {
                 definition.AdjustTextOrientation = this.ihatchDefinition_0.AdjustTextOrientation;
                 if (this.ihatchDefinition_0.Alignment == esriHatchAlignmentType.esriHatchAlignCenter)
                 {
                     definition.Alignment = esriHatchAlignmentType.esriHatchAlignLeft;
                 }
                 else
                 {
                     definition.Alignment = this.ihatchDefinition_0.Alignment;
                 }
                 definition.DisplayPrecision       = this.ihatchDefinition_0.DisplayPrecision;
                 definition.Expression             = this.ihatchDefinition_0.Expression;
                 definition.ExpressionParserEngine = this.ihatchDefinition_0.ExpressionParserEngine;
                 definition.ExpressionSimple       = this.ihatchDefinition_0.ExpressionSimple;
                 definition.Offset      = this.ihatchDefinition_0.Offset;
                 definition.Prefix      = this.ihatchDefinition_0.Prefix;
                 definition.ShowSign    = this.ihatchDefinition_0.ShowSign;
                 definition.Suffix      = this.ihatchDefinition_0.Suffix;
                 definition.TextDisplay = this.ihatchDefinition_0.TextDisplay;
                 definition.TextSymbol  = this.ihatchDefinition_0.TextSymbol;
             }
         }
         this.ihatchDefinition_0 = definition;
         if (this.ValueChanged != null)
         {
             this.ValueChanged(this, new EventArgs());
         }
         this.Init();
     }
 }