예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            OpenMassSenderCore.OpenMassSenderDBDataSet.JobRow job = JobTableAdapter.getInstance().getNewRow();

            job.query = "";
            job.group = "smaplist1";
            job.sender_account = 1;
            job.status = OpenMassSenderCore.OpenMassSenderDBDataSet.JobRow.JobStatus.PENDING;
            job.user = 1;

            job.messageObject.setMessage("hi $receiver_fname, This message send at $DATE(dd/MM/yyyy) is a notice");
            job.messageObject.subject = "A friendly notice";
            job.messageObject.job = job.ID;
            job.messageObject.replaceVariables = "customer=Customer";
            job.messageObject.user = job.user;
            job.messageObject.type = "email";
            job.messageObject.linkedFile = "";

            MessageForm msgForm = new MessageForm(job.messageObject, this);
            msgForm.Show();

            JobTableAdapter.getInstance().submitRow(job);
            MessageTableAdapter.getInstance().submitRow(job.messageObject);

            OpenMassSenderCore.OpenMassSenderDBDataSet.ReceiverRow receiver = (OpenMassSenderCore.OpenMassSenderDBDataSet.ReceiverRow)ReceiverTableAdapter.getInstance().GetDataById(1).Rows[0];

            Console.WriteLine("message:" + job.messageObject.replaceWildCards(receiver));

            foreach (OpenMassSenderCore.OpenMassSenderDBDataSet.JobRow row in JobTableAdapter.getInstance().GetData())
            {
                Console.WriteLine("aa:" + row.ID+"  messag:"+row.message);
            }
        }
 public void makeNewPanel(String label1, String label2)
 {
     UtilClass.addIndex(1);
     MessageForm msgForm = new MessageForm(label1, label2);
     panelList.Add(msgForm);
     panelInitilize(panelList.Count - 1);
     msgForm.Show();
 }
예제 #3
0
        public Form1()
        {
            InitializeComponent();

            model = new Model();
            messageForm = new MessageForm(model);

            //filling form from settings
            tbChatMonitor.Text = model.ChatName;
            for (int i = 0; i < model.Systems.Count; i++)
            {
                lstbSystemList.Items.Add(model.Systems[i].ToUpper());
            }

            //buttons on start
            if (model.TimerEnable == true)
                btnStart.Enabled = false;
            else
                btnStop.Enabled = false;


            //open transparent form with last messages
            messageForm.Show();
        }
예제 #4
0
		private void rosterView_DoubleClick(object sender, System.EventArgs e)
		{
			ContactTreeNode curContact = rosterView.SelectedNode as ContactTreeNode;
			if(curContact != null)
			{
				Contact c = curContact.Contact;

				if(!c.Online)
				{
					MessageBox.Show(this, "That person is not online.");
					return;
				}

				MessageForm msgf = null;
				// See if we already have a chat with this person
				foreach(string s in c.AllJabberId)
				{
					if(chats[s] != null)
					{
						msgf = (MessageForm)chats[s];
						msgf.Show();
						return;
					}
				}

				// If not, start a new chat with their first resource
				string jid = c.BaseJabberId+"/"+c.Resources[0];
				msgf = new MessageForm(session, "Title", jid, "en", newThreadId());
				msgf.Language = "en";
				msgf.ThreadId = newThreadId();
				chats[jid] = msgf;
				msgf.Show();
			}
		}
예제 #5
0
        void FriendChatMsg_OnRun( FriendChatMsg_t param )
        {
            if ( context.SteamUser.GetSteamID() == param.m_ulSender )
                return;

            EChatEntryType type = EChatEntryType.k_EChatEntryTypeChatMsg;
            context.SteamFriends.GetChatMessage( param.m_ulSender, ( int )param.m_iChatID, new byte[ 0 ], 0, ref type );

            foreach ( MessageForm msgForm in this.OwnedForms )
            {
                if ( msgForm.FriendID.SteamID == param.m_ulSender )
                {
                    msgForm.RecievedMessage( param );

                    if ( chkNoEscape.Checked )
                    {
                        if ( type == ( EChatEntryType )6 )
                        {
                            msgForm.AwayMsg( param, awayMessageBox.Text );
                            return;
                        }
                    }

                    if ( isAway && type != EChatEntryType.k_EChatEntryTypeTyping && type != ( EChatEntryType )6 )
                    {
                        msgForm.AwayMsg( param, awayMessageBox.Text );
                        return;
                    }

                    return;
                }
            }

            if ( type == EChatEntryType.k_EChatEntryTypeTyping || type == ( EChatEntryType )6 )
                return;

            Friend friend = new Friend();

            friend.SteamID = param.m_ulSender;
            friend.PersonaName = context.SteamFriends.GetFriendPersonaName( friend.SteamID );

            MessageForm mf = new MessageForm( context, friend, sets );

            this.Invoke( ( MethodInvoker )delegate
            {
                mf.Show( this );
                mf.RecievedMessage( param );

                if ( isAway )
                    mf.AwayMsg( param, awayMessageBox.Text );
            } );
        }
예제 #6
0
        private void friendsList_DoubleClick( object sender, EventArgs e )
        {
            if ( friendsList.SelectedItem == null )
                return;

            Friend friendObj = (Friend)friendsList.SelectedItem;

            foreach ( MessageForm msgForm in this.OwnedForms )
            {
                if ( msgForm.FriendID.SteamID == friendObj.SteamID )
                {
                    msgForm.Focus();

                    return;
                }
            }

            MessageForm mf = new MessageForm( context, friendObj, sets );

            mf.Show( this );
        }
예제 #7
0
파일: MainForm.cs 프로젝트: mansehr/DGP
        private void ShowLoggedInLayout()
        {
            //If reconnected!
            /*	foreach(MessageForm mf in messageForms)
            {
                mf.SocketConnect(clientSocket);
            }
            */
            UpdateLogginLabel();

            label2.Hide();
            label1.Show();
            roundedcornerPanel1.Show();
            roundedcornerPanel1.BringToFront();
            listBox1.Show();
            listBox1.BringToFront();
            pictureBox3.Show();

            mainMenu1.MenuItems[0].MenuItems[0].Enabled = true;
            mainMenu1.MenuItems[0].MenuItems[1].Enabled = true;
            mainMenu1.MenuItems[1].Enabled = true;
            mainMenu1.MenuItems[2].Enabled = true;

            //NotifyIconConntextMenu
            menuItem7.Enabled = true;
            menuItem28.Enabled = true;
            menuItem31.Enabled = true;

            if(this.loggingInChat)
            {
                publicChatForm = NewMessageForm(chatMessenger.user, "0", chatMessenger.ServerSocket, true);
                publicChatForm.SetNameAndStatusString("All (Online)");
                publicChatForm.SetDGPContactName("All");
                publicChatForm.Show();
            }
        }
예제 #8
0
 private void ValidatePlayers()
 {
     PlayerValidator v = new PlayerValidator(mTool.GetKey(listAttributesToolStripMenuItem.Checked, listApperanceToolStripMenuItem.Checked));
     v.ValidatePlayers(mTextBox.Text);
     List<String> warnings = v.GetWarnings();
     if (warnings.Count > 0)
     {
         StringBuilder builder = new StringBuilder();
         foreach (string w in warnings)
         {
             builder.Append(w);
             builder.Append("\n");
         }
         MessageForm ef = new MessageForm(SystemIcons.Warning);
         ef.TextClicked += new EventHandler(validatorForm_TextClicked);
         ef.ShowCancelButton = false;
         ef.MessageText = builder.ToString();
         ef.Text = "Warning, verify player attributes";
         ef.Closed += new EventHandler(validatorForm_Closed);
         ef.Show(this);
     }
     else
     {
         MessageBox.Show("No Issues Found", "Player Validation", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #9
0
        //Conexion
        private bool connect()
        {
            int ans;
            Form connectingMsg = new MessageForm("Info", "Conectando...");
            connectingMsg.Show();

            if ((ans = serviceMgr.ConnectRemoteMachine(this.textBox_machineName.Text, this.textBox_domain.Text, this.textBox_username.Text, this.textBox_password.Text)) != 0)
            {
                string errorCause;
                if (ans == 1)
                    errorCause = "Acceso denegado.";
                else if (ans == 2)
                    errorCause = "Servidor remoto no disponible o no autorizado.";
                else
                    errorCause = "Intente nuevamente.";

                connectingMsg.Close();
                connected = false;
                MessageBox.Show("No se pudo conectar al equipo remoto: " + errorCause, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                connected = true;
                connectingMsg.Close();
            }

            return connected;
        }
예제 #10
0
        private void button_listServices_Click(object sender, EventArgs e)
        {
            if (!connected && !this.connect())
                return;

            Form retrievingMsg = new MessageForm("Info", "Solicitando datos...");
            retrievingMsg.Show();

            var state = serviceMgr.GetRemoteServices();
            this.listBox_results.DataSource = state;
            this.listBox_results.DisplayMember = "FullName";

            showGroupBoxMode(Mode.service);
            retrievingMsg.Close();
        }