private void ShowTimer_Tick(object sender, EventArgs e) { if (LeftHide) { if (this.Location.X >= 0) { LeftHide = false; isfinish = true; ShowTimer.Stop(); this.Location = new Point(0, this.Location.Y); } else { this.Location = new Point(this.Location.X + 20, this.Location.Y); } } if (RightHide) { if (this.Location.X <= ScreenArea.Width - this.Width) { RightHide = false; isfinish = true; ShowTimer.Stop(); this.Location = new Point(ScreenArea.Width - this.Width, this.Location.Y); } else { this.Location = new Point(this.Location.X - 20, this.Location.Y); } } }
public FrmMain() { InitializeComponent(); PowersInite(); ShowTimer.Start();//开始预设显示 string skinPath = Application.StartupPath + @"\Skins"; lstContent.DataSource = new DirectoryInfo(skinPath).GetFiles(); lstContent.DisplayMember = "Name"; lblEmpInfo.Text = "登录信息: " + CurrentInfo.currentEmp.EmployeeName; }
private void chart1_MouseMove(object sender, MouseEventArgs e) { chart1.ChartAreas[0].CursorX.SetCursorPixelPosition(new PointF(e.X, e.Y), true); chart1.ChartAreas[0].CursorY.SetCursorPixelPosition(new PointF(e.X, e.Y), true); //Application.DoEvents(); 使用此方法当有线程操作时会引发异常 if (checkBox1.Checked == false) { if ((LeftHide || RightHide) && isfinish) { isfinish = false; ShowTimer.Start(); } } }
public override int GetHashCode() { unchecked { var hashCode = Id != null?Id.GetHashCode() : 0; hashCode = hashCode * 397 ^ (Name != null ? Name.GetHashCode() : 0); hashCode = hashCode * 397 ^ Index; hashCode = hashCode * 397 ^ LandingPriority; hashCode = hashCode * 397 ^ SortOffersByOwnership.GetHashCode(); hashCode = hashCode * 397 ^ ShowIneligibleOffers.GetHashCode(); hashCode = hashCode * 397 ^ ShowIneligibleOffersIfGiftable.GetHashCode(); hashCode = hashCode * 397 ^ ShowTimer.GetHashCode(); hashCode = hashCode * 397 ^ EnableToastNotification.GetHashCode(); hashCode = hashCode * 397 ^ Hidden.GetHashCode(); return(hashCode); } }
private void Awake() { instance = this; }
private void Initialize(out List <KeyValuePair <int, IScreenObject> > nestedObjects) { _showTimer = new ShowTimer(DEFAULT_SHOWING_TIME); nestedObjects = new List <KeyValuePair <int, IScreenObject> >(); }
public void ShowTimer(GameMsg msg) { ShowTimer showTimer = msg.showTimer; GameRoot.AddTips(showTimer.time.ToString()); }