AddSystemMessage() public méthode

public AddSystemMessage ( string message ) : void
message string
Résultat void
Exemple #1
0
 private void SetRoomAdmin(object obj)
 {
     try
     {
         ClientModel.Api.Perform(new ClientSetRoomAdminAction(_parent.Name, _userId));
     }
     catch (SocketException se)
     {
         _parent.AddSystemMessage(se.Message);
     }
 }
Exemple #2
0
        private void ClientDownloadProgress(object sender, FileDownloadEventArgs e)
        {
            roomViewModel.MainViewModel.Dispatcher.BeginInvoke(new Action <FileDownloadEventArgs>(args =>
            {
                if (args.RoomName != roomViewModel.Name || !args.File.Equals(File))
                {
                    return;
                }

                if (args.Progress < 100)
                {
                    Progress = args.Progress;
                }
                else
                {
                    Progress = 0;
                    roomViewModel.AddSystemMessage(string.Format("Загрузка файла \"{0}\" завершена.", args.File.Name));
                }
            }), e);
        }
Exemple #3
0
 private void SetRoomAdmin(object obj)
 {
     try
     {
         ClientModel.Api.SetRoomAdmin(parent.Name, nick);
     }
     catch (SocketException se)
     {
         parent.AddSystemMessage(se.Message);
     }
 }
Exemple #4
0
        private void ClientDownloadProgress(FileDownloadEventArgs e)
        {
            if (e.RoomName != parentRoom.Name || e.FileId != fileId || Progress == e.Progress)
            {
                return;
            }

            using (var client = ClientModel.Get())
            {
                var file = GetFile(client, fileId.Value);

                if (e.Progress < 100)
                {
                    Progress = e.Progress;
                }
                else
                {
                    Progress = 0;
                    parentRoom.AddSystemMessage(Localizer.Instance.Localize(FileDownloadedKey, file.Name));
                }
            }
        }
Exemple #5
0
 private void SetRoomAdmin(object obj)
 {
     try
     {
         if (ClientModel.Api != null)
         {
             ClientModel.Api.SetRoomAdmin(RoomViewModel.MainViewModel.SelectedRoom.Name, Info);
         }
     }
     catch (SocketException se)
     {
         RoomViewModel.AddSystemMessage(se.Message);
     }
 }