Ejemplo n.º 1
0
 private void btnPktRotation_Click(object sender, EventArgs e)
 {
     if ((points != null) && (points.HasPunkte))
     {
         String rPnr = cbRotPoint.Text;
         String dPnr = cbDirPoint.Text;
         Double direction;
         if (ClassConverters.StringToDouble(tbDirection.Text, out direction))
         {
             if (rPnr.CompareTo(dPnr) != 0)
             {
                 if (points.rotateCoords(rPnr, dPnr, direction, chbZTo0.Checked))
                 {
                     points.formatCurrentToCADdy(settings);
                 }
                 else
                 {
                     points.getPointsFromCurrentCADdy(settings);
                 }
             }
             else
             {
                 MessageBox.Show(language.getLanguageText("MSG_BOX_frmRotateCoord_identPoint"));
             }
         }
         else
         {
             MessageBox.Show(language.getLanguageText("MSG_BOX_frmRotateCoord_notdirection"));
         }
     }
 }
Ejemplo n.º 2
0
 private void btnPktChangeCode_Click(object sender, EventArgs e)
 {
     if (points.HasPunkte)
     {
         if (points.setPointNumberToCode(cbPunktnummer.Text, cbCodePKTNeu.Text))
         {
             points.formatCurrentToCADdy(settings);
         }
     }
     else if (stpks.HasMessdaten)
     {
         stpks.getMeasuresFromCurrentCADdy(settings);
         if (stpks.setPointNumberToCode(cbPunktnummer.Text, cbCodePKTNeu.Text))
         {
             stpks.formatCurrentToCADdy(settings);
         }
     }
 }
Ejemplo n.º 3
0
        private void btnMakeTransform_Click(object sender, EventArgs e)
        {
            if (transformation != null)
            {
                transformation.calcTransformation();
                if (cbNewPointsNewTab.Checked)
                {
                    String myNewFile = System.IO.Path.GetDirectoryName(cbListSrc.Text) + @"\" + System.IO.Path.GetFileNameWithoutExtension(cbListSrc.Text) + "_WORLD" + System.IO.Path.GetExtension(cbListSrc.Text);
                    if (ClassNPPTools.getOpenFileNames().Contains(myNewFile))
                    {
                        ClassNPPTools.closefile(myNewFile, true);
                    }
                    if (System.IO.File.Exists(myNewFile))
                    {
                        System.IO.File.Delete(myNewFile);
                    }

                    /*System.IO.File.CreateText(myNewFile);
                     * Win32.SendMessage(PluginBase.nppData._nppHandle, (int)NppMsg.NPPM_DOOPEN, 0, myNewFile);
                     */
                    ClassNPPTools.newfile(myNewFile);
                    ClassCADdyPunkte file2 = new ClassCADdyPunkte(ref language);
                    ClassNPPTools.switchToFile(myNewFile);
                    foreach (ClassCADdyPunkt newPoint in transformation.newPoints)
                    {
                        file2.Punkte.Add(newPoint);
                    }
                    file2.formatCurrentToCADdy(settings);
                    file2.clear();
                    file2 = null;
                }
                else
                {
                    ClassCADdyPunkte file2 = new ClassCADdyPunkte(ref language);
                    ClassNPPTools.switchToFile(cbListDest.Text);
                    file2.getPointsFromCurrentCADdy(settings);
                    foreach (ClassCADdyPunkt newPoint in transformation.newPoints)
                    {
                        file2.Punkte.Add(newPoint);
                    }
                    file2.formatCurrentToCADdy(settings);
                    file2.clear();
                    file2 = null;
                }
            }
        }
Ejemplo n.º 4
0
 /// <summary>Arbeitsfunktion für CADdy Formatiert</summary>
 internal static void formatCADdyKoord()
 {
     if (cuTabWhatIsThis == enWhatIAm.CADdyCoord)
     {
         cADdyPoints.getPointsFromCurrentCADdy(pluginSettings);
         cADdyPoints.formatCurrentToCADdy(pluginSettings);
     }
     else
     {
         MessageBox.Show(pluginLanguage.getLanguageText("MSGBox_ClassCADdyPunkte_NoPoints"));
     }
 }
Ejemplo n.º 5
0
 private void btnPktRotation_Click(object sender, EventArgs e)
 {
     if ((points != null) && (points.HasPunkte))
     {
         String trw = tbTranslRW.Text;
         String thw = tbTranslHW.Text;
         String tho = tbTranslHO.Text;
         Double dtRW;
         Double dtHW;
         Double dtHO;
         ClassConverters.StringToDouble(tbTranslRW.Text, out dtRW);
         ClassConverters.StringToDouble(tbTranslHW.Text, out dtHW);
         ClassConverters.StringToDouble(tbTranslHO.Text, out dtHO);
         if (points.translateCoords(dtRW, dtHW, dtHO))
         {
             points.formatCurrentToCADdy(settings);
         }
     }
 }