private void Initialize()
        {
            PNtoTeX.Normalize();
            NetCanvasWidth.Text      = (PNtoTeX.MaxX / PNtoTeX.koefX).ToString("f3");
            NetCanvasHeight.Text     = (PNtoTeX.MaxY / PNtoTeX.koefY).ToString("f3");
            CenterNetAlign.IsChecked = true;
            Save.IsEnabled           = false;

            PreambleText.Text = PUTBEFORE + "\n" + PNtoTeX.Implementation();
        }
        public void SaveFullDocument(string path)
        {
            string s = @"\documentclass[a4paper]{article}" + "\n";

            s += PNtoTeX.Implementation() + "\n";
            s += @"\begin{document}" + "\n\n";
            s += RightNetAlign.IsChecked == true?PNtoTeX.RResult() :
                     CenterNetAlign.IsChecked == true?PNtoTeX.CResult() : PNtoTeX.Result();

            s += "\n" + @"\end{document}";

            using (StreamWriter Writer = new StreamWriter(path))
            {
                Writer.Write(s);
            }
        }
 private void UpdateResult()
 {
     if (RightNetAlign.IsChecked == true)
     {
         //Result.Text = PUTBEFORE + "\n\n" + PNtoTeX.Implementation() + "\n --- \n" + PNtoTeX.RResult();
         Result.Text = PNtoTeX.RResult();
     }
     else
     if (CenterNetAlign.IsChecked == true)
     {
         //Result.Text = PUTBEFORE + "\n\n" + PNtoTeX.Implementation() + "\n --- \n" + PNtoTeX.CResult();
         Result.Text = PNtoTeX.CResult();
     }
     else
     {
         //Result.Text = PUTBEFORE + "\n\n" + PNtoTeX.Implementation() + "\n --- \n" + PNtoTeX.Result();
         Result.Text = PNtoTeX.Result();
     }
 }
 private void RightChecked(object sender, RoutedEventArgs e)
 {
     Result.Text += PNtoTeX.RResult();
 }
 private void CenterChecked(object sender, RoutedEventArgs e)
 {
     Result.Text += PNtoTeX.CResult();
 }