- machatproject.zip
- MaChatproject
- Chat.sln
- Chat.suo
- ChatLibrary
- MaChat
- MagicLibrary
- AssemblyInfo.cs
- bin
- Debug
- Release
- Collections
- Common
- Controls
- Docking
- MagicLibrary.csproj
- MagicLibrary.csproj.user
- Menus
- obj
- Debug
- MagicLibrary.projdata
- temp
- TempPE
- Release
- MagicLibrary.projdata
- temp
- TempPE
- Resources
- ImagesCaptionIDE.bmp
- ImagesCaptionPlain.bmp
- ImagesMenuControl.bmp
- ImagesPopupMenu.bmp
- ImagesTabControl.bmp
- LibraryIcon.ico
- Win32
- Resources
- bin
- MaChat.ChatProxy.pl.resX
- MaChat.ChatProxy.resX
- MaChat.MainForm.pl.resX
- MaChat.MainForm.resX
- MaChat.OptionsDlg.pl.resX
- MaChat.OptionsDlg.resX
- obj
- Resources.vcproj
- Setup
- Setup.vdproj
- Setup
- ssetup.zip
- sSetup.msi
- lsetup.zip
- lSetup.msi
|
////////////////////////////////////////////////////
// File - Note.cpp
// Autor - Michael Mac
// Contact - GreenSequoia@wp.pl
// Description - Implementation of the MessageWrite and MessageRead classes
////////////////////////////////////////////////////
#include "stdafx.h"
#include "Note.h"
using namespace ChatLibrary;
namespace MaChat
{
////////////////////////////////////////////////////
// MaChat::NoteWrite
////////////////////////////////////////////////////
NoteWrite::NoteWrite()
{
this->Size = System::Drawing::Size( 350, 150 );
this->FormBorderStyle = FormBorderStyle::FixedDialog;
this->MinimizeBox = false;
this->MaximizeBox = false;
m_labelDescription = new Label();
m_labelDescription->AutoSize = true;
m_labelDescription->Location = System::Drawing::Point( 2, 2 );
m_txtNote = new TextBox();
m_txtNote->Location = System::Drawing::Point( 4, 18 );
m_txtNote->Size = System::Drawing::Size( this->Width - 16, this->Height - 85);
m_txtNote->AcceptsReturn = true;
m_txtNote->Multiline = true;
m_buttonSend = new Button();
m_buttonSend->Location = System::Drawing::Point( 180, 88 );
m_buttonSend->Click += new EventHandler( this, OnSend );
m_buttonCancel = new Button();
m_buttonCancel->Location = System::Drawing::Point( 260, 88 );
m_buttonCancel->Click += new EventHandler( this, OnCancel );
this->AcceptButton = m_buttonSend;
this->CancelButton = m_buttonCancel;
this->Controls->Add( m_buttonSend );
this->Controls->Add( m_buttonCancel );
this->Controls->Add( m_labelDescription );
this->Controls->Add( m_txtNote );
}
void NoteWrite::Show ( String* strTitle, String* strDescription, String* strText,
String* strSend, String* strCancel)
{
this->Text = strTitle;
this->m_txtNote->Text = strText;
this->m_labelDescription->Text = strDescription;
this->m_buttonSend->Text = strSend;
this->m_buttonCancel->Text = strCancel;
Form::Show();
this->m_txtNote->Select();
}
void NoteWrite::OnSend( Object* sender, EventArgs* e )
{
MessageHeader* msgNote = new MessageHeader( MessageType::Note );
msgNote->Object = m_txtNote->Text;
Chat->Send( msgNote, Destination );
this->Close();
}
////////////////////////////////////////////////////
// MaChat::NoteRead
////////////////////////////////////////////////////
NoteRead::NoteRead()
{
this->Size = System::Drawing::Size( 350, 150 );
this->FormBorderStyle = FormBorderStyle::FixedDialog;
this->MinimizeBox = false;
this->MaximizeBox = false;
m_labelDescription = new Label();
m_labelDescription->AutoSize = true;
m_labelDescription->Location = System::Drawing::Point( 2, 2 );
/*m_txtNote = new TextBox();
m_txtNote->Location = System::Drawing::Point( 4, 18 );
m_txtNote->Size = System::Drawing::Size( this->Width - 16, this->Height - 85);
m_txtNote->AcceptsReturn = true;
m_txtNote->Multiline = true;*/
m_buttonReply = new Button();
m_buttonReply->Location = System::Drawing::Point( 180, 88 );
m_buttonReply->Click += new EventHandler( this, OnReply );
m_buttonCancel = new Button();
m_buttonCancel->Location = System::Drawing::Point( 260, 88 );
m_buttonCancel->Click += new EventHandler( this, OnCancel );
this->AcceptButton = m_buttonReply;
this->CancelButton = m_buttonCancel;
this->Controls->Add( m_buttonReply );
this->Controls->Add( m_buttonCancel );
this->Controls->Add( m_labelDescription );
//this->Controls->Add( m_txtNote );
}
void NoteRead::OnReply( Object* sender, EventArgs* e )
{
}
void NoteRead::Show ( String* strTitle, String* strDescription, String* strText,
String* strReply, String* strCancel )
{
/*this->Text = strTitle;
this->m_labelDescription->Text = strDescription;
this->m_buttonReply->Text = strReply;
this->m_buttonCancel->Text = strCancel;
Form::Show();*/
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Micheal is an independent consultant -
www.macmichal.pl.
He's main areas of interest are: DDD\CqRS, TDD, SaaS, Design Patterns, Architecture. He specializes in .Net/C# for the early beginning of it and T-SQL. He's a writer, blogger (
blog.macmichal.pl) and speaker.
In his spare time, he's climbing the mountains all over the Europe.