Example #1
0
        //opens store form using the targeted store as the open parameter
        private void StoreLabel_MouseClick(object sender, MouseEventArgs e)
        {
            windowPosition = this.Location;
            Store       foo     = storedEvent.GetStoreByName(StoreLabel.Text);
            StoreViewer newForm = new StoreViewer(parentReference, storedEvent, foo);

            this.Hide();
            newForm.Location = windowPosition;
            newForm.ShowDialog();
            this.Close();
        }
        //opens store viewer using clicked store
        private void StoreNameTextBox_Click(object sender, EventArgs e)
        {
            windowPosition = this.Location;
            Store       foo     = storedEvent.stores.First(bar => bar.storeName == StoreNameTextBox.Text);
            StoreViewer newForm = new StoreViewer(parentReference, storedEvent, foo);

            this.Hide();
            newForm.Location = windowPosition;
            newForm.ShowDialog();
            this.Close();
        }