예제 #1
0
 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
     {
     }
 }
예제 #2
0
 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;
     }
 }
예제 #3
0
 private void MessageForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.buttonCancle_Click(null, null);
     this._parent = null;
 }
예제 #4
0
 public CreateAccountForm(ManageForm parent)
 {
     this._parent = parent;
     this.InitializeComponent();
 }
예제 #5
0
 private void CreateAccountForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (this._parent != null)
     {
         this._parent.CreateAccountForm = null;
         this._parent = null;
     }
 }
예제 #6
0
 private void ChangeUserForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     this._parent.ChangeUserForm = null;
     this._parent = null;
 }
예제 #7
0
 public ChangeUserForm(ManageForm parent)
 {
     this._parent = parent;
     this.InitializeComponent();
 }