コード例 #1
0
ファイル: QuickChargingForm.cs プロジェクト: renyh1013/dp2
 void _patronSummaryForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (_patronSummaryForm != null
         && this.MainForm != null && this.MainForm.AppInfo != null)
     {
         this.MainForm.AppInfo.UnlinkFormState(_patronSummaryForm);
         this._patronSummaryForm = null;
     }
 }
コード例 #2
0
ファイル: QuickChargingForm.cs プロジェクト: renyh1013/dp2
        private void toolStripButton_openPatronSummaryWindow_Click(object sender, EventArgs e)
        {
            List<PatronSummary> summaries = BuildPatronSummary(null);

            _patronSummaryForm = new PatronSummaryForm();
            _patronSummaryForm.PatronSummaries = summaries;
            _patronSummaryForm.Font = this.Font;
            _patronSummaryForm.Show(this);
        }
コード例 #3
0
ファイル: QuickChargingForm.cs プロジェクト: renyh1013/dp2
        internal void DisplayReaderSummary(ChargingTask exclude_task,
            string strText)
        {
            if (this.IsDisposed)
                return;

            if (this.InvokeRequired)
            {
                Delegate_DisplayReaderSummary d = new Delegate_DisplayReaderSummary(DisplayReaderSummary);
                this.BeginInvoke(d,
                    new object[] { exclude_task, strText }
                    );
                return;
            }

            List<PatronSummary> summaries = BuildPatronSummary(exclude_task);

            if (_patronSummaryForm == null)
            {
                _patronSummaryForm = new PatronSummaryForm();
                _patronSummaryForm.FormClosed -= new FormClosedEventHandler(_patronSummaryForm_FormClosed);
                _patronSummaryForm.FormClosed += new FormClosedEventHandler(_patronSummaryForm_FormClosed);
                // _patronSummaryForm.Show(this);
            }

            _patronSummaryForm.PatronSummaries = summaries;
            _patronSummaryForm.Font = this.Font;


            if (_patronSummaryForm.Visible == false)
            {
                this.MainForm.AppInfo.LinkFormState(this._patronSummaryForm, "_patronSummaryForm_state");
                if (_patronSummaryForm.IsDisposed)
                    return;
                _patronSummaryForm.Show(this);
            }
            else
                _patronSummaryForm.FillList();

            _patronSummaryForm.Comment = strText;
            _patronSummaryForm.ShowComment();
        }