internal MainForm() { InitializeComponent(); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.StandardDoubleClick, true); //读取程序配置 InitAppSetting(); notifyIcon.Text = Text; BackgroundImage = image; //变量初始化 bmp = new Bitmap(ClientRectangle.Width, ClientRectangle.Height); drawingFormHelper = new DrawingFormHelper(this); calculateRegionHelper = new CalculateRegionHelper(this); for (int i = 0; i < 54; i++) { cardsImages[i] = null; //初始化 } }
internal int whoseOrder = 0; //0未定,1我,2对家,3西家,4东家 //音乐文件 #endregion // 变量声明 internal MainForm() { InitializeComponent(); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.StandardDoubleClick, true); //读取程序配置 InitAppSetting(); notifyIcon.Text = Text; BackgroundImage = image; //变量初始化 bmp = new Bitmap(ClientRectangle.Width, ClientRectangle.Height); ThisPlayer = new TractorPlayer(); ThisPlayer.PlayerOnGetCard += PlayerGetCard; ThisPlayer.GameOnStarted += StartGame; ThisPlayer.TrumpChanged += ThisPlayer_TrumpUpdated; ThisPlayer.AllCardsGot += ResortMyCards; ThisPlayer.PlayerShowedCards += ThisPlayer_PlayerShowedCards; ThisPlayer.ShowingCardBegan += ThisPlayer_ShowingCardBegan; ThisPlayer.NewPlayerJoined += ThisPlayer_NewPlayerJoined; ThisPlayer.PlayersTeamMade += ThisPlayer_PlayersTeamMade; ThisPlayer.TrickFinished += ThisPlayer_TrickFinished; ThisPlayer.HandEnding += ThisPlayer_HandEnding; ThisPlayer.StarterFailedForTrump += ThisPlayer_StarterFailedForTrump; ThisPlayer.Last8Discarded += ThisPlayer_Last8Discarded; ThisPlayer.DiscardingLast8 += ThisPlayer_DiscardingLast8; ThisPlayer.DumpingFail += ThisPlayer_DumpingFail; SelectedCards = new List <int>(); PlayerPosition = new Dictionary <string, int>(); PositionPlayer = new Dictionary <int, string>(); drawingFormHelper = new DrawingFormHelper(this); calculateRegionHelper = new CalculateRegionHelper(this); for (int i = 0; i < 54; i++) { cardsImages[i] = null; //初始化 } }