Пример #1
0
        private void SendAll(bool sendBlackout)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new Action(() => { SendAll(sendBlackout); }));
                return;
            }

            if (!this.isBlackOutSet)
            {
                this.btnToggleBlackout.PerformClick();
            }
            else
            {
                connection.WriteBlackout(true);
            }

            if (map != null)
            {
                connection.WriteMap(map);
            }
            if (fog != null)
            {
                connection.WriteFog(fog);
            }
            connection.WriteGridSize(chkShowGrid.Checked, chkShowGrid.Checked ? (int)nudGridSize.Value : 0);
            connection.WriteGridColor(gridPen.Color.ToSocketColor());
        }
Пример #2
0
        private void SendAll(bool sendBlackout)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new Action(() => { SendAll(sendBlackout); }));
                return;
            }

            if (!this.ctlControlPanel.IsBlackOutSet)
            {
                this.ctlControlPanel.ToggleBlackout();
            }
            else
            {
                connection.WriteBlackout(true);
            }

            if (this.ctlDnDMap.LoadedMap != null)
            {
                connection.WriteMap(this.ctlDnDMap.LoadedMap);
            }
            if (this.ctlDnDMap.Fog != null)
            {
                connection.WriteFog(this.ctlDnDMap.Fog);
            }
            connection.WriteUseFogAlphaEffect(this.ctlDnDMap.UseFogAlphaEffect);
            connection.WriteGridSize(this.ctlControlPanel.ShowGrid, this.ctlControlPanel.ShowGrid ? this.ctlControlPanel.GridSize : 0);
            connection.WriteGridColor(this.ctlDnDMap.GridPen.Color.ToSocketColor());
        }