public TaskPaneAlert()
        {
            InitializeComponent();

            XceedUtility.SetUIStyle(this);

            //LoadMenus();

            this.KeyDown += new System.Windows.Forms.KeyEventHandler(TaskPane_KeyDown);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnLoadGridInfos(object sender, System.EventArgs e)
        {
            XceedUtility.SetXceedLicense();

            Form form = new Form();

            form.AutoSize        = true;
            form.FormBorderStyle = FormBorderStyle.FixedDialog;
            form.Controls.Add(new FlowLayoutPanel());
            form.Controls[0].Controls.Add(new TextBox());
            form.Text = "Please input gridName";
            form.Controls[0].Controls.Add(new Button());
            (form.Controls[0].Controls[1] as Button).Text         = "Ok";
            (form.Controls[0].Controls[1] as Button).DialogResult = DialogResult.OK;
            if (form.ShowDialog() == DialogResult.OK)
            {
                string gridName = (form.Controls[0].Controls[0] as TextBox).Text;
                if (string.IsNullOrEmpty(gridName))
                {
                    MessageForm.ShowError("GridName should not be null!");
                    return;
                }

                IList <GridColumnInfo> gridColumnInfos = ADInfoBll.Instance.GetGridColumnInfos(gridName);
                int x = 0, y = 0;
                foreach (GridColumnInfo columnInfo in gridColumnInfos)
                {
                    try
                    {
                        IDesignerHost           h  = (IDesignerHost)GetService(typeof(IDesignerHost));
                        DesignerTransaction     dt = h.CreateTransaction("Add IDataControl");
                        IComponentChangeService c  = (IComponentChangeService)GetService(typeof(IComponentChangeService));

                        c.OnComponentChanging(m_parentForm, null);
                        Control control = AddDataControl(h, columnInfo);
                        control.Location = new System.Drawing.Point(x, y);
                        c.OnComponentChanged(m_parentForm, null, null, null);

                        dt.Commit();

                        x += 200;
                        if (x >= 800)
                        {
                            x  = 0;
                            y += 25;
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageForm.ShowError(ex.Message);
                    }
                }
            }
            form.Dispose();
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="gridName"></param>
        /// <param name="dm"></param>
        /// <param name="parentForm"></param>
        public GridGotoFormTaskPane(string gridName, IDisplayManager dm, IArchiveMasterForm parentForm)
        {
            XceedUtility.SetUIStyle(this);

            LoadMenus(gridName);
            m_parentForm = parentForm;
            m_dm         = dm;

            IArchiveMasterForm archiveSeeForm = parentForm;

            if (archiveSeeForm != null)
            {
                archiveSeeForm.MasterGrid.GridControl.CurrentRowChanged += new EventHandler(MasterGrid_CurrentRowChanged);

                MasterGrid_CurrentRowChanged(archiveSeeForm.DisplayManager, System.EventArgs.Empty);
            }
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        private ArchiveSearchForm()
        {
            InitializeComponent();

            XceedUtility.SetUIStyle(historyPane);
            XceedUtility.SetUIStyle(customSearchPane);

            lblResult.Text = "";

            if (!Authority.IsAdministrators())
            {
                tabControl1.TabPages.Remove(tabPage4);
            }

            tabControl1.SelectedIndexChanged += new EventHandler(tabControl1_SelectedIndexChanged);

            this.EnableProgressForm = true;
        }
        private void Initialize()
        {
            XceedUtility.SetUIStyle(this);

            this.DropDownAnchor = DropDownAnchor.Right;
            this.DropDownSize   = new System.Drawing.Size(400, 300);

            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.Selectable, true);

            this.DroppedDownChanged += new EventHandler(OptionWinTextBox_DroppedDownChanged);

            this.dropDownGrid.ReadOnly = true;
            this.TextBoxArea.ReadOnly  = false;
            this.dropDownGrid.FixedHeaderRows.Add(new Xceed.Grid.ColumnManagerRow());

            this.dropDownGrid.MouseDoubleClick += new MouseEventHandler(dropDownGrid_MouseDoubleClick);
            this.TextBoxArea.Validating        += new System.ComponentModel.CancelEventHandler(TextBoxArea_Validating);
            this.TextBoxArea.DoubleClick       += new EventHandler(TextBoxArea_DoubleClick);
        }
Esempio n. 6
0
        /// <summary>
        /// 初始化程序(设置ServiceLocator,读取IDataBuffer)
        /// </summary>
        public static void InitProgram()
        {
            if (!m_init)
            {
                m_init = true;

                //if (Microsoft.Practices.ServiceLocation.ServiceLocator.Current == null) // throw null
                {
                    if (!SystemConfiguration.LiteMode)
                    {
                        SetSpringServiceLocator();
                    }
                    else
                    {
                        SetDefaultServiceLocator();
                    }
                }

                XceedUtility.SetXceedLicense();
            }
        }
        private void Initialize()
        {
            XceedUtility.SetUIStyle(this);

            this.Validated += new EventHandler(MyObjectTextBox_Validated);
        }