Esempio n. 1
0
        //cancel the navigation, intercept the posted data
        private void WebBrowser_BeforeNavigate2(object pDisp, ref object URL, ref object Flags,
                                                ref object TargetFrameName, ref object PostData, ref object Headers, ref bool Cancel)
        {
            if (PostData != null)
            {
                Cancel = true;
                string postDataText = System.Text.Encoding.ASCII.GetString(PostData as byte[]);
                postDataText = postDataText.Replace("\0", "");
                NameValueCollection request = ParsePostString(postDataText);
                string action = request["action"];
                if (action == "post")
                {
                    Post(request);
                }
                else if (action == "back")
                {
                    this.Hide();

                    CategoryListForm categorySiteForm = (CategoryListForm)controller.FormTable[AttributesController.CATEGORY_LIST_FORM];

                    categorySiteForm.Show();
                    categorySiteForm.BringToFront();
                }
            }
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();

            if (this.controller.CategoryFacade.ItemSpecificEnabled == ItemSpecificsEnabledCodeType.Enabled)
            {
                ItemSpecificsForm itemSpecificsForm = controller.FormTable[AttributesController.ITEM_SPECIFICS_FORM] as ItemSpecificsForm;

                itemSpecificsForm.Show();
                itemSpecificsForm.BringToFront();
            }
            else
            {
                CategoryListForm categoryListForm = (CategoryListForm)controller.FormTable[AttributesController.CATEGORY_LIST_FORM];

                categoryListForm.Show();
                categoryListForm.BringToFront();
            }
        }
Esempio n. 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                SiteCodeType site = (SiteCodeType)Enum.Parse(typeof(SiteCodeType), ((ListItem)this.siteListcomboBox.SelectedItem).Value, true);
                this.controller.ApiContext.Site = site;

                this.Hide();

                this.controller.ShowPleaseWaitDialog();
                this.controller.InitSiteFacade();
                this.controller.HidePleaseWaitDialog();

                CategoryListForm categoryListForm = (CategoryListForm)controller.FormTable[AttributesController.CATEGORY_LIST_FORM];

                //check if category id is inputted
                String catId = this.catIdTextBox.Text;
                if (catId != null && catId.Length > 0)
                {
                    categoryListForm.CatId = catId;
                }
                else
                {
                    categoryListForm.CatId = null;
                }


                categoryListForm.InitCategoryList();

                categoryListForm.Show();
                categoryListForm.BringToFront();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }