Exemplo n.º 1
0
 public helper(rooms _r, MainWindow _w)
 {
     IsMainWindow = true;
     w = _w;
     r = _r;
     InitializeComponent();
     Initial(_w.VoatingBackgroundBrush.Opacity);
 }
Exemplo n.º 2
0
 public helper(rooms _r, MainWindow _w)
 {
     IsMainWindow = true;
     w            = _w;
     r            = _r;
     InitializeComponent();
     Initial(_w.VoatingBackgroundBrush.Opacity);
 }
Exemplo n.º 3
0
        public MainWindow(string login, Client cl, double opacity, bool snd, messageViewer _m)
        {
            InitializeComponent();

            myLogin                     = login;
            this.Title                  = "Dixit - " + myLogin;
            client                      = cl;
            client.needExit            += client_needExit;
            client.gameStart           += client_gameStart;
            client.refreshUsersInRooms += client_refreshUsersInRooms;
            client.leaderTurn          += client_leaderTurn;
            client.waiting             += client_waiting;
            client.gamerTurn           += client_gamerTurn;
            client.voatingTurn         += client_voatingTurn;
            client.result              += client_result;
            client.resultChat          += client_resultChat;
            //client.newRound +=client_newRound;
            client.win += client_win;
            client.serverDisconnect += client_serverDisconnect;
            client.chatMsg          += client_chatMsg;
            client.setAdmin         += client_setAdmin;

            player         = new MediaPlayer();
            IsSoundEnabled = snd;
            if (!IsSoundEnabled)
            {
                buttonSoundText.Text = "V";
            }
            m            = _m;
            r            = new rooms(this, opacity);
            r.soundPlay += new EventHandler(r_soundPlay);
            r.Show();
            this.Hide();
            textBoxTask.Visibility = System.Windows.Visibility.Hidden;
            gamers = new List <Gamer>();
            Gamer alone = new Gamer(myLogin, 0);

            GamersdataGrid.Items.Add(alone);
            tag                             = new TextBlock();
            tag.Text                        = "Ожидание начала игры";
            tag.FontWeight                  = FontWeights.Bold;
            tag.FontStyle                   = FontStyles.Italic;
            tag.TextAlignment               = TextAlignment.Center;
            tag.FontSize                    = 14;
            Tag                             = tag;
            userCardsPanel.Visibility       = System.Windows.Visibility.Hidden;
            VoatingPanel.Visibility         = System.Windows.Visibility.Hidden;
            userCardsPanelBorder.Visibility = System.Windows.Visibility.Hidden;
            VoatingPanelBorder.Visibility   = System.Windows.Visibility.Hidden;
            SetCardSample();
            LinearGradientBrush myBrush = new LinearGradientBrush(Colors.PowderBlue, Colors.MediumSlateBlue, 30);

            ImgBrdr.Background               = myBrush;
            VoatingBackgroundBrush.Opacity   = opacity;
            ChatBackgroundBrush.Opacity      = opacity;
            UsersGridBackgroundBrush.Opacity = opacity;
        }
Exemplo n.º 4
0
 public pass(rooms _r, string pass)
 {
     InitializeComponent();
     pwd      = pass;
     r        = _r;
     txt      = new TextBlock();
     Tag      = txt;
     txt.Text = "Введите пароль!";
 }
Exemplo n.º 5
0
 public pass(rooms _r, string pass)
 {
     InitializeComponent();
     pwd = pass;
     r = _r;
     txt = new TextBlock();
     Tag = txt;
     txt.Text = "Введите пароль!";
 }
Exemplo n.º 6
0
        public MainWindow(string login, Client cl, double opacity, bool snd, messageViewer _m)
        {
            InitializeComponent();

            myLogin = login;
            this.Title = "Dixit - " + myLogin;
            client = cl;
            client.needExit += client_needExit;
            client.gameStart += client_gameStart;
            client.refreshUsersInRooms += client_refreshUsersInRooms;
            client.leaderTurn += client_leaderTurn;
            client.waiting += client_waiting;
            client.gamerTurn += client_gamerTurn;
            client.voatingTurn += client_voatingTurn;
            client.result += client_result;
            client.resultChat += client_resultChat;
            //client.newRound +=client_newRound;
            client.win+=client_win;
            client.serverDisconnect += client_serverDisconnect;
            client.chatMsg += client_chatMsg;
            client.setAdmin += client_setAdmin;

            player = new MediaPlayer();
            IsSoundEnabled = snd;
            if (!IsSoundEnabled) buttonSoundText.Text = "V";
            m = _m;
            r = new rooms(this, opacity);
            r.soundPlay += new EventHandler(r_soundPlay);
            r.Show();
            this.Hide();
            textBoxTask.Visibility = System.Windows.Visibility.Hidden;
            gamers = new List<Gamer>();
            Gamer alone = new Gamer(myLogin, 0);
            GamersdataGrid.Items.Add(alone);
            tag = new TextBlock();
            tag.Text = "Ожидание начала игры";
            tag.FontWeight = FontWeights.Bold;
            tag.FontStyle = FontStyles.Italic;
            tag.TextAlignment = TextAlignment.Center;
            tag.FontSize = 14;
            Tag = tag;
            userCardsPanel.Visibility = System.Windows.Visibility.Hidden;
            VoatingPanel.Visibility = System.Windows.Visibility.Hidden;
            userCardsPanelBorder.Visibility = System.Windows.Visibility.Hidden;
            VoatingPanelBorder.Visibility = System.Windows.Visibility.Hidden;
            SetCardSample();
            LinearGradientBrush myBrush = new LinearGradientBrush(Colors.PowderBlue, Colors.MediumSlateBlue, 30);
            ImgBrdr.Background = myBrush;
            VoatingBackgroundBrush.Opacity = opacity;
            ChatBackgroundBrush.Opacity = opacity;
            UsersGridBackgroundBrush.Opacity = opacity;
        }