public dlgPasswordSet(Task aTsk) { _tsk = aTsk; // // Required for Windows Form Designer support // InitializeComponent(); }
public ucParam() { //pConnStr = string.Empty; pIntListDelim = "~"; pTask = null; //_cq = null; // This call is required by the Windows.Forms Form Designer. InitializeComponent(); }
public dlgQProperty(Task aTsk) { _tsk = aTsk; _q = null; // // Required for Windows Form Designer support // InitializeComponent(); _txtCode.Leave += new EventHandler(_txtCode_Leave); }
public frmQResult(Task aTsk) { _tsk = aTsk; pIconColl = null; // // Required for Windows Form Designer support // InitializeComponent(); #region MANUAL design // _mn _mn = new CommandAS.Tools.Controls.ucMoveNavigator(); _mn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); _mn.Location = new System.Drawing.Point(2, 438); _mn.Name = "_mn"; _mn.pPosition = 1; _mn.Size = new System.Drawing.Size(212, 37); _mn.TabIndex = 3; _mn.MoveNavigator += new EvH_MoveNavigator(DoMoveNavigator); #endregion Icon = new Icon(GetType(),"Images.Icons.Query.ico"); Closed += new EventHandler(DoClosed); _dgr.ReadOnly = true; _dgr.CurrentCellChanged += new EventHandler(DoCurrentCellChanged); _dgr.ContextMenu = new ContextMenu(); _dgr.ContextMenu.MenuItems.Add(new MenuItem("Копировать", new EventHandler(DoCommandCopy),Shortcut.CtrlC)); _dgr.ContextMenu.MenuItems.Add(new MenuItem("-")); _dgr.ContextMenu.MenuItems.Add(new MenuItem("Выделить все", new EventHandler(DoCommandSelectAll),Shortcut.CtrlA)); foreach (DataTable dTab in _tsk.pResultSet.Tables) _cboTabOfSet.Items.Add(dTab.TableName); if (_cboTabOfSet.Items.Count > 0) { _cboTabOfSet.SelectedIndex = 0; _tbbViewStatus.Pushed = pToggleStatus; } else _tbbViewStatus.Pushed = false; this.Text = _tsk.pCurrentQuery.Name; _txt.Text = _tsk.pResultMessage.Replace("\n", Environment.NewLine); _txt.Select(_txt.Text.Length,0); _sbpTime.Text = new DateTime(_tsk.pExecTime.Ticks).ToString("mm:ss (fff)"); }
public frmQuery(WorkDB aDB, CommandAS.QueryLib.ucTreeQuery aTVQuery) { _task = new Task(aDB); //aDB.pQP = _task; _lockModified = false; _sesFont = new Font(this.Font.FontFamily.Name, this.Font.Size); _currProc = null; _ofArr = new ArrayList(16); pLoadDefaultSession = string.Empty; // // Required for Windows Form Designer support // InitializeComponent(); _tc.TabPages.Remove(_tcpParam); _tc.TabPages.Remove(_tcpXSLTInc); _txtConnection.AcceptsReturn = true; #region MANUAL DESIGN this._param = new ucParameters(); this._splitQ = new System.Windows.Forms.Splitter(); if (aTVQuery == null) this._tvQueries = new CommandAS.QueryLib.ucTreeQuery(); else this._tvQueries = aTVQuery; // // _param // this._param.Dock = System.Windows.Forms.DockStyle.Fill; this._param.Location = new System.Drawing.Point(0, 144); this._param.Name = "_param"; this._param.Size = new System.Drawing.Size(768, 156); this._param.TabIndex = 4; // // _splitQ // this._splitQ.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this._splitQ.Dock = System.Windows.Forms.DockStyle.Top; this._splitQ.Location = new System.Drawing.Point(0, 136); this._splitQ.Name = "_splitQ"; this._splitQ.Size = new System.Drawing.Size(768, 8); this._splitQ.TabIndex = 3; this._splitQ.TabStop = false; // // _tvQueries // this._tvQueries.Dock = System.Windows.Forms.DockStyle.Top; this._tvQueries.ImageIndex = -1; this._tvQueries.Location = new System.Drawing.Point(0, 0); this._tvQueries.Name = "_tvQueries"; this._tvQueries.SelectedImageIndex = -1; this._tvQueries.Size = new System.Drawing.Size(768, 136); this._tvQueries.TabIndex = 0; this._tcpQuery.Controls.Add(this._param); this._tcpQuery.Controls.Add(this._splitQ); this._tcpQuery.Controls.Add(this._tvQueries); #endregion _commParamDef = new ucParamDef(false); _commParamDef.Location = new Point(5, 5); _commParamDef.Size = new Size(_tcpXSLTInc.Width - 10, _tcpXSLTInc.Height - 10); _commParamDef.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; _tcpXSLTInc.Controls.Add(_commParamDef); NewSession(); _param.pPerf = _task; _commParamDef.SetData(_task.pCommonParamCollection); int iconSize = 0; try { iconSize = Convert.ToInt32(Registry.CurrentUser.OpenSubKey(AppConst.REG_APP_PATH).GetValue("IconSize")); } catch { } if (iconSize < 16) iconSize = 32; _iconColl = new QueryIconCollection(iconSize); _tb.ImageList = _iconColl.pImageList; _tbbExecRTab.ImageIndex = _iconColl.Index(QueryIconCollection.ExecRTab); _tbbExecRExcel.ImageIndex = _iconColl.Index(QueryIconCollection.ExecRExcel); _tbbExecRHTML.ImageIndex = _iconColl.Index(QueryIconCollection.ExecRHTML); _tbbNewQuery.ImageIndex = _iconColl.Index(QueryIconCollection.New); _tbbDelQuery.ImageIndex = _iconColl.Index(QueryIconCollection.Delete); _tbbSaveSession.ImageIndex = _iconColl.Index(QueryIconCollection.Save); _tbbLoadSession.ImageIndex = _iconColl.Index(QueryIconCollection.DocOpen); _tbbEditSQL.ImageIndex = _iconColl.Index(QueryIconCollection.TextSQL); _tbbEditParam.ImageIndex = _iconColl.Index(QueryIconCollection.TextParam); _tbbEditXSLT.ImageIndex = _iconColl.Index(QueryIconCollection.TextXSLT); _tbbAbout.ImageIndex = _iconColl.Index(QueryIconCollection.About); _tbbExecRTab.Tag = _mnuExecRTab; _tbbExecRExcel.Tag = _mnuExecRExcel; _tbbExecRHTML.Tag = _mnuExecRHTML; _tbbEditSQL.Tag = _mnuEditSQL; _tbbEditParam.Tag = _mnuEditParam; _tbbEditXSLT.Tag = _mnuEditXSLT; _tvQueries.HideSelection = false; _lcmTV = new ContextMenu(); _miExecute = new MenuItem("Выполнить", new EventHandler(_mnuExecRTab_Click), Shortcut.F5); _lcmTV.MenuItems.Add(_miExecute); _lcmTV.MenuItems.Add(new MenuItem("-")); _lcmTV.MenuItems.Add(new MenuItem("Новый", new EventHandler(DoCommandNewQuery))); _miDeleteQuery = new MenuItem("Удалить", new EventHandler(DoCommandDeleteQuery)); _lcmTV.MenuItems.Add(_miDeleteQuery); _miEditQuery = new MenuItem(this._mnuEdit.Text); MenuItem miEditSQL = new MenuItem(this._mnuEditSQL.Text, new EventHandler(DoCommandEditQuery)); MenuItem miEditParam = new MenuItem(this._mnuEditParam.Text, new EventHandler(DoCommandEditQueryParam)); MenuItem miEditXSLT = new MenuItem(this._mnuEditXSLT.Text, new EventHandler(DoCommandEditQuery)); _miEditQuery.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { miEditSQL, miEditParam, miEditXSLT }); _lcmTV.MenuItems.Add(_miEditQuery); _lcmTV.MenuItems.Add(new MenuItem("-")); _miPropertyQuery = new MenuItem("Свойства", new EventHandler(DoCommandPropertyQuery), Shortcut.F2); _lcmTV.MenuItems.Add(_miPropertyQuery); _lcmTV.Popup += new EventHandler(DoCommandTVQContextMenuPopup); _tvQueries.AfterSelect += new TreeViewEventHandler(DoCommandTVQAfterSelect); _tvQueries.DoubleClick += new EventHandler(DoCommandTVQDoubleClick); _cmdPassword.Click += new EventHandler(_cmdPassword_Click); _tc.SelectedIndexChanged += new EventHandler(_tc_SelectedIndexChanged); Load += new EventHandler(DoLoad); Closing += new CancelEventHandler(DoClosing); Activated += new EventHandler(DoActivated); TitleText(); _txtFont.Text = _sesFont.ToString(); _modified = false; _mnuExec.Enabled = false; _tbbExecRTab.Enabled = false; _tbbExecRExcel.Enabled = false; _tbbExecRHTML.Enabled = false; _mnuDeleteQuery.Enabled = false; _tbbDelQuery.Enabled = false; Icon = new Icon(GetType(), "Images.Icons.Query.ico"); _img = null; _pnlImg.Paint += new PaintEventHandler(_pnlImg_Paint); }