Example #1
0
 private void buttonCreateLayout_Click(object sender, EventArgs e)
 {
     xperdex.classes.QueryNewName nn = new xperdex.classes.QueryNewName("New Layout Name");
     nn.ShowDialog();
     if (nn.DialogResult == DialogResult.OK)
     {
         TextLayout layout = core_common.GetLayout(nn.textBox1.Text);
         listBoxLayout.DataSource   = null;
         listBoxLayout.DataSource   = core_common.layouts;
         listBoxLayout.SelectedItem = layout;
     }
     nn.Dispose();
 }
Example #2
0
        private void buttonAddLabel_Click(object sender, EventArgs e)
        {
            TextLayout layout = listBoxLayout.SelectedItem as TextLayout;

            if (layout == null)
            {
                MessageBox.Show("Please select a Layout to add this label to...");
                return;
            }
            xperdex.classes.QueryNewName nn = new xperdex.classes.QueryNewName("New Label Name");
            nn.ShowDialog();
            if (nn.DialogResult == DialogResult.OK)
            {
                if (layout.AddLayout(nn.textBox1.Text))
                {
                    textPlacementLayoutEditor1.Refresh();
                    listBoxLabel.DataSource = null;
                    listBoxLabel.DataSource = layout.placements;
                }
            }
        }