コード例 #1
0
ファイル: ReplayManager.cs プロジェクト: Jecral/Football
        public ReplayManager(GameSettings settings)
        {
            Image = new GameImage();
            Image.Settings = settings;

            FileName = "Football Savefile " + DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss") + ".fsg";
            serializer = new XmlSerializer(typeof(GameImage));
        }
コード例 #2
0
ファイル: GameImageEventArgs.cs プロジェクト: Jecral/Football
 public GameImageEventArgs(GameImage image)
 {
     Image = image;
 }
コード例 #3
0
ファイル: MultiplayerHandler.cs プロジェクト: Jecral/Football
        /// <summary>
        /// Saves the received game image.
        /// It's last roundimage will be used if the "Use"-checkbox in the multiplayer lobby is selected.
        /// That will continue the saved multiplayer game.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void CurrentClient_GameImageReceived(object sender, GameImageEventArgs e)
        {
            CachedSavefile = e.Image;
            CurrentLobby.CurrentFieldSettingsPanel.IsBlocked = true;

            CurrentLobby.BeginInvoke((MethodInvoker)(() =>
            {
                CurrentLobby.UseSavefileBox.CheckedChanged -= UseSavefileBox_CheckedChanged;
                CurrentLobby.UseSavefileBox.Checked = true;
                CurrentLobby.UseSavefileBox.CheckedChanged += UseSavefileBox_CheckedChanged;
            }));
        }