示例#1
0
 // Form constructor for a typFrmImage Form
 private frmMain(int instNum, string frmType, FormConfigArr frmCfgArr)
 {
     this.frmCfgArrIdx = instNum;
     this.frmType      = frmType;
     this.frmCfgArr    = frmCfgArr;
     InitializeComponent();
 }
示例#2
0
        // Form load event handler - Set initial Form
        // and handle subsequent Forms
        private void frmMain_Load(object sender, EventArgs e)
        {
            // If initial Form
            if (frmCfgArrIdx == 0)
            {
                // Instantiate and fill frmCfgArr
                frmCfgArr = new FormConfigArr();
                frmCfgArr.GetFormConfigs();

                // Draw initial Form
                if (frmCfgArr != null && frmCfgArr.Count > 0 && frmCfgArr[0] != null)
                {
                    frmCfgArr[0].ConfigureButtonForm(this);
                }
            }
            else // A subsequent Form
            {
                // If a Button Form
                if (frmType == "typFrmButton")
                {
                    frmCfgArr[frmCfgArrIdx].ConfigureButtonForm(this);
                }
                //else if topping form
                else if (frmType == "typFrmTopping")
                {
                    frmCfgArr[frmCfgArrIdx].ConfigureButtonForm(this);
                }

                //else receipt form
                else if (frmCfgArrIdx == 13)
                {
                    frmCfgArr = new FormConfigArr();
                    frmCfgArr.GetFormConfigs();
                    frmCfgArr[13].ConfigureReceiptForm(this);
                }
            }
        }