示例#1
0
 /// <summary>
 /// Sets the status.
 /// </summary>
 /// <param name="form">The form.</param>
 private void SetStatus(XtraFormPL form)
 {
     int index = getIndexFormChild(form);
     if ((index > 0) && index < (ctrMdiMain.Pages.Count - 1))
     {
         iBack.Enabled = true;
         iForward.Enabled = true;
     }
     else
     {
         if (index == 0 && index < (ctrMdiMain.Pages.Count - 1))
         {
             iBack.Enabled = false;
             iForward.Enabled = true;
         }
         else if (index == (ctrMdiMain.Pages.Count - 1) && index > 0)
         {
             iForward.Enabled = false;
             iBack.Enabled = true;
         }
         else
         {
             iForward.Enabled = false;
             iBack.Enabled = false;
         }
     }
 }
示例#2
0
        /// <summary>
        /// Loads the search result page.
        /// </summary>
        /// <param name="list_form">The list_form.</param>
        private void LoadSearchResultPage(List<FURLAddress> list_form)
        {
            if (list_form != null && list_form.Count > 0)
            {
                XtraFormPL frm_result = new XtraFormPL();
                frm_result.Text = "Kết quả tìm kiếm FURL";
                object temp = frm_result.Tag;
                TagPropertyMan.InsertOrUpdate(ref temp, "FAVORITE", "Tìm kiếm");
                frm_result.Tag = temp;

                ctrlFURLResult ctr = new ctrlFURLResult();
                ctr.OpenURL += new EventHandler(ctr_OpenURL);
                ctr.Dock = DockStyle.Fill;
                ctr._init(list_form);

                frm_result.Controls.Add(ctr);

                if (getIndexFormChild(frm_result) == -1)
                    ProtocolForm.ShowWindow(this, frm_result, true);
                else
                {
                    ctrMdiMain.SelectedPage = ctrMdiMain.Pages[getIndexFormChild(frm_result)];
                    ctrlFURLResult _ctrl = (ctrlFURLResult)ctrMdiMain.SelectedPage.MdiChild.Controls[0];
                    _ctrl._init(list_form);
                }
            }
            else
                HelpMsgBox.ShowNotificationMessage("Không tìm thấy kết quả.");
        }