You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace GeoSigmaViewer
|
|
{
|
|
public partial class SuperSubScriptDialog : Form
|
|
{
|
|
private string scriptText; //上下标文本
|
|
public SuperSubScriptDialog()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public string ScriptText{ get => scriptText; }
|
|
|
|
private void OKButton_Click(object sender, EventArgs e)
|
|
{
|
|
string superScript = superScriptTextBox.Text;
|
|
string subScript = subScriptTextBox.Text;
|
|
|
|
if(superScript.Length != 0)
|
|
{
|
|
scriptText = String.Format("^u0.5 {0}^n", superScript);
|
|
}
|
|
|
|
if (subScript.Length != 0)
|
|
{
|
|
scriptText += String.Format("^d0.5 {0}^n", subScript);
|
|
}
|
|
|
|
Close();
|
|
}
|
|
|
|
private void cancelButton_Click(object sender, EventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
}
|
|
}
|