123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace LYFZ.ComponentLibrary
- {
- public partial class BaseFormRelease : BaseForm360
- {
- public BaseFormRelease()
- {
- InitializeComponent();
- this.btnAppFormMenu.MouseClick += new MouseEventHandler(btnAppFormMenu_MouseClick);
- this.Load += BaseFormRelease_Load;
-
- this.BackColor = LYFZ.ComponentLibrary.GetUIResources.FrmContentBackgroundColor;
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
- }
- bool isLoginValidation = false;
-
-
-
- public bool IsLoginValidation
- {
- get { return isLoginValidation; }
- set { isLoginValidation = value; }
- }
-
-
-
- void LoginMessageBoxCustom(bool isMessageBoxCustom = true)
- {
- try
- {
- if (isMessageBoxCustom)
- {
- MessageBox.Show("用户登录超时,请重新登录。", "提示");
- this.Close();
- }
- }
- catch { }
- }
- void BaseFormRelease_Load(object sender, EventArgs e)
- {
- this.plFormMainContent.BackColor = LYFZ.ComponentLibrary.GetUIResources.FrmContentBackgroundColor;
- }
-
-
-
- protected bool isOverrideOnPaint = false;
- protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
- {
- base.OnPaint(e);
- if (!isOverrideOnPaint)
- {
- this.plFormMainContent.Location = new Point(0, this.TitleBgImageHeight);
- this.plFormMainContent.Width = this.Width;
- this.plFormMainContent.Height = this.Height - this.TitleBgImageHeight - this.BottomBgImageHeight;
- }
-
- }
-
-
-
-
-
-
- private void btnAppFormMenu_MouseClick(object sender, MouseEventArgs e)
- {
- Button btn = sender as Button;
- Point point = new Point();
- point.Y = btn.Height;
- if (e.Button == MouseButtons.Left)
- {
- this.cmsSystemMeunList.Show(btn, point);
- }
- }
- static bool isRights = false;
-
-
-
- public static bool IsRights
- {
- get { return BaseFormRelease.isRights; }
- set { BaseFormRelease.isRights = value; }
- }
-
-
-
-
-
-
- protected virtual void SetMenuItem_Click(ToolStripMenuItem menuItem)
- {
-
- }
-
-
-
-
-
- public bool IsOverrideSystemMeun = false;
-
- protected override void CreateHandle()
- {
- if (!IsHandleCreated)
- {
- try
- {
- base.CreateHandle();
- }
- catch { }
- finally
- {
- if (!IsHandleCreated)
- {
- base.RecreateHandle();
- }
- }
- }
- }
- }
- }
|