private static void Main() { try { Process instance = RunningInstance(); if (instance == null) { RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Internet Explorer\Styles"); key.SetValue("MaxScriptStatements", 0x3b9aca00); key.Close(); key = null; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ManageForm mainForm = new ManageForm(); Application.Run(mainForm); } else { HandleRunningInstance(instance); } } catch { } }
public void Init(ManageForm parent, string tipText, int interval, bool displayNow, ButtonClickDelegate buttonOKClick, ButtonClickDelegate buttonCancleClick) { TimeSpan span = (TimeSpan) (DateTime.Now - this._closeTime); if ((span.TotalSeconds >= 30.0) || displayNow) { this._closeTime = DateTime.Now; this._parent = parent; this.labelText.Text = tipText; this._buttonOKClick = buttonOKClick; this._buttonCancleClick = buttonCancleClick; if (interval > 0) { this._messageFormTimer.Tick += new EventHandler(this.MessageFormThreadFunc); this._messageFormTimer.Interval = interval * 0x3e8; this._messageFormTimer.Enabled = true; } base.Visible = true; } }
private void MessageForm_FormClosing(object sender, FormClosingEventArgs e) { this.buttonCancle_Click(null, null); this._parent = null; }
public CreateAccountForm(ManageForm parent) { this._parent = parent; this.InitializeComponent(); }
private void CreateAccountForm_FormClosing(object sender, FormClosingEventArgs e) { if (this._parent != null) { this._parent.CreateAccountForm = null; this._parent = null; } }
private void ChangeUserForm_FormClosing(object sender, FormClosingEventArgs e) { this._parent.ChangeUserForm = null; this._parent = null; }
public ChangeUserForm(ManageForm parent) { this._parent = parent; this.InitializeComponent(); }