コード例 #1
0
ファイル: form.cs プロジェクト: theGreg/NetworkDesigner
    private void CommandButton1_Click()
    {
        ElementEnumerator tEnum;
        string            tRat;
        string            Tname;
        string            textOut;

        textOut = "";
        ;/* Cannot convert EmptyStatementSyntax, CONVERSION ERROR: Conversion for EmptyStatement not implemented, please report this issue in '' at character 2358
          * at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.MethodBodyVisitor.DefaultVisit(SyntaxNode node)
          * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitEmptyStatement(EmptyStatementSyntax node)
          * at Microsoft.CodeAnalysis.VisualBasic.Syntax.EmptyStatementSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
          * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
          * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.ConvertWithTrivia(SyntaxNode node)
          * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.DefaultVisit(SyntaxNode node)
          *
          * Input:
          * 'rat = "lkl"
          * 'tname = "lko"
          *
          * 'if activemodelreference.
          *
          * Set tEnum = ActiveModelReference.GetSelectedElements
          *
          */
        while (tEnum.MoveNext)
        {
            ChangeCell104(ECell: tEnum.Current);
        }
        // outputBox.Text = textOut
        ActiveModelReference.UnselectAllElements();
    }
コード例 #2
0
ファイル: form.cs プロジェクト: theGreg/NetworkDesigner
    private void getTrfStats_Click()
    {
        string stats;
        string Tname;
        string tRat;
        string lineOut;

        ActiveModelReference.UnselectAllElements();
        ShapeElement[]    trfrZones;
        ElementEnumerator trfrZoneEnum;


        // Enumerate fence content and do what you need

        if (validFenceDefined)
        {
            // select all trfr zones in this fence
            // selectTRFRzones
            selectTRFRzoneShapes();
            ;/* Cannot convert EmptyStatementSyntax, CONVERSION ERROR: Conversion for EmptyStatement not implemented, please report this issue in '' at character 8109
              * at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.MethodBodyVisitor.DefaultVisit(SyntaxNode node)
              * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitEmptyStatement(EmptyStatementSyntax node)
              * at Microsoft.CodeAnalysis.VisualBasic.Syntax.EmptyStatementSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
              * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
              * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.ConvertWithTrivia(SyntaxNode node)
              * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.DefaultVisit(SyntaxNode node)
              *
              * Input:
              * Set trfrZoneEnum = ActiveModelReference.GetSelectedElements 'ActiveDesignFile.Fence.GetContents
              *
              */
            trfrZoneEnum.Reset();
            CellElement       trfrCell;
            ElementEnumerator trfrCellEnum;
            ElementEnumerator serviceCableEnum;
            ActiveModelReference.UnselectAllElements();
            double startTime;
            // trfrZones = enumerator.BuildArrayFromContents
            double endTime;
            startTime = DateTime.Timer;
            while (trfrZoneEnum.MoveNext)
            {
                // with each trfr zone
                // 1. create fence from trfr zone
                if ((!createFenceFromShapeElement(sElement: trfrZoneEnum.Current)))
                {
                    Interaction.MsgBox("Something wronh, not sure yet");
                    return;
                }
                // 2 Select trfr cell
                selectNormalCells("TRFRS");
                ;/* Cannot convert EmptyStatementSyntax, CONVERSION ERROR: Conversion for EmptyStatement not implemented, please report this issue in '' at character 8941
                  * at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.MethodBodyVisitor.DefaultVisit(SyntaxNode node)
                  * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitEmptyStatement(EmptyStatementSyntax node)
                  * at Microsoft.CodeAnalysis.VisualBasic.Syntax.EmptyStatementSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
                  * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
                  * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.ConvertWithTrivia(SyntaxNode node)
                  * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.DefaultVisit(SyntaxNode node)
                  *
                  * Input:
                  *
                  * ' 3. Get TRFR Cell text
                  * Set trfrCellEnum = ActiveModelReference.GetSelectedElements
                  *
                  */
                while (trfrCellEnum.MoveNext)
                {
                    ;/* Cannot convert EmptyStatementSyntax, CONVERSION ERROR: Conversion for EmptyStatement not implemented, please report this issue in '' at character 9109
                      * at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.MethodBodyVisitor.DefaultVisit(SyntaxNode node)
                      * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitEmptyStatement(EmptyStatementSyntax node)
                      * at Microsoft.CodeAnalysis.VisualBasic.Syntax.EmptyStatementSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
                      * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
                      * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.ConvertWithTrivia(SyntaxNode node)
                      * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.DefaultVisit(SyntaxNode node)
                      *
                      * Input:
                      * Set trfrCell = trfrCellEnum.Current
                      *
                      */
                }
                GetTransformerCellText(ECell: trfrCell, TrfrName: Tname, Rating: tRat);

                // 4. Get number of customers
                if ((!createFenceFromShapeElement(sElement: trfrZoneEnum.Current)))
                {
                    Interaction.MsgBox("Something wronh, not sure yet");
                    return;
                }

                selectConductor("Service Cable");
                ;/* Cannot convert EmptyStatementSyntax, CONVERSION ERROR: Conversion for EmptyStatement not implemented, please report this issue in '' at character 9568
                  * at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.MethodBodyVisitor.DefaultVisit(SyntaxNode node)
                  * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitEmptyStatement(EmptyStatementSyntax node)
                  * at Microsoft.CodeAnalysis.VisualBasic.Syntax.EmptyStatementSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
                  * at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
                  * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.ConvertWithTrivia(SyntaxNode node)
                  * at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.DefaultVisit(SyntaxNode node)
                  *
                  * Input:
                  * Set serviceCableEnum = ActiveModelReference.GetSelectedElements
                  *
                  */
                int scount;
                // ' scount = 0
                // 'Do While serviceCableEnum.MoveNext
                // 'Set trfrCell = trfrCellEnum.Current
                // '  scount = scount + 1
                // 'Loop
                scount  = UBound(serviceCableEnum.BuildArrayFromContents());
                lineOut = Tname + "," + tRat + "," + System.Convert.ToString(scount) + Constants.vbCrLf;
                stats   = stats + lineOut;
            }
            // get all stats on the current selection

            // GetAllStats outputTxt:=stats
            outputBox.Text = outputBox.Text + stats + Constants.vbCrLf;
        }
        else
        {
            Interaction.MsgBox("No fence defined");
        }
        endTime = DateTime.Timer;

        outputBox.Text = outputBox.Text + System.Convert.ToString(endTime - startTime) + Constants.vbCrLf;
    }
コード例 #3
0
ファイル: form.cs プロジェクト: theGreg/NetworkDesigner
 private void DeselectAll_Click()
 {
     ActiveModelReference.UnselectAllElements();
 }