Exemple #1
0
        /// <summary>
        /// Take the currently selected patterns and set the return byte arrays
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SavePatterns()
        {
            Dot bg = GetDot((int)nudPageNumberBG.Value, (int)nudDarknessBG.Value, txtCellBG.Text, "BG");

            if (bg != null)
            {
                if (background == null)
                {
                    background = new PatternDefinition();
                }
                background.pattern1.data   = bg.GetBytes(true);
                background.pattern1.height = bg.Height;
                background.pattern1.width  = bg.Width;
            }

            if (CurrentFG != null)
            {
                if (foreground == null)
                {
                    foreground = new PatternDefinition();
                }
                foreground.pattern1.data   = CurrentFG.GetBytes(true);
                foreground.pattern1.height = CurrentFG.Height;
                foreground.pattern1.width  = CurrentFG.Width;
            }

            CustomName = txtCustomPtnName.Text;
        }
Exemple #2
0
        /// <summary>
        /// Take the currently selected patterns and set the return byte arrays
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdSavePatterns_Click(object sender, EventArgs e)
        {
            lblStatus.Text = "Saving...";
            Dot bg = GetDot(txtPageNumberBG.Text, txtCellBG.Text, "BG");

            if (bg != null)
            {
                if (background == null)
                {
                    background = new PatternDefinition();
                }
                background.pattern1.data   = bg.GetBytes(true);
                background.pattern1.height = bg.Height;
                background.pattern1.width  = bg.Width;
            }

            Dot fg = GetDot(txtPageNumberFG.Text, txtCellFG.Text, "FG");

            if (fg != null)
            {
                if (foreground == null)
                {
                    foreground = new PatternDefinition();
                }
                foreground.pattern1.data   = fg.GetBytes(true);
                foreground.pattern1.height = fg.Height;
                foreground.pattern1.width  = fg.Width;
            }

            CustomName = txtCustomPtnName.Text;

            if (lblStatus.Text == "Saving...")
            {
                this.Close();
            }
        }
Exemple #3
0
 public P2WizardForm()
 {
     InitializeComponent();
     foreground = new PatternDefinition();
     background = new PatternDefinition();
 }
Exemple #4
0
 public P2Creator()
 {
     InitializeComponent();
     foreground = new PatternDefinition();
     background = new PatternDefinition();
 }