Exemplo n.º 1
0
 public NewChat(ContactsOnMain com, MiddleController mc)
 {
     InitializeComponent();
     contactsOnMain   = com;
     middleController = mc;
     setIpHalf();
 }
Exemplo n.º 2
0
 private void recordBtn_Click(object sender, EventArgs e)
 {
     if (MiddleController.getInstance().fileShareController.isTransactionGoing())
     {
         return;
     }
     new AudioRecorder(this).Visible = true;
 }
Exemplo n.º 3
0
        private void disconnectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //SaveFileDialog chat display

            //disconnect
            contactsPanel.removeContact((ContactTab)this);

            MiddleController.getInstance().disconnect(token);
        }
Exemplo n.º 4
0
        public ContactTab(string token, string name)
        {
            InitializeComponent();
            nameText.Text  = name;
            tokenText.Text = token;
            chatDisplay    = new ChatDisplay(token, MiddleController.getInstance().fileShareController);

            //add previous msges or add previous chat display

            this.token = token;
        }
Exemplo n.º 5
0
        public void renameAndSendMyPic()
        {
//            string ext = Path.GetExtension(myProfile.displayProfile);
            string originalpath = myProfile.displayProfile;
            string ext          = Path.GetExtension(originalpath);

            System.IO.Directory.CreateDirectory("Temp");
            string outPath = "Temp//" + myProfile.mac + ext;

            //System.IO.File.Copy(originalpath, outPath, true);
            if (MiddleController.getInstance().fileShareController.isTransactionGoing())
            {
                return;
            }


            //  MiddleController.getInstance().fileShareController.sendFile(outPath);
        }
Exemplo n.º 6
0
        private void sendFileBtn_Click(object sender, EventArgs e)
        {
            if (MiddleController.getInstance().fileShareController.isTransactionGoing())
            {
                return;
            }
            using (OpenFileDialog o = new OpenFileDialog())
            {
                o.Filter      = "All Files (*.*)|*.*";
                o.Multiselect = true;

                if (o.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    tempSelectedFile = o;

                    controlMessage.sendFileCommingSignal(ipTokenInChat);

                    sendTempFile();
                }
            }
        }
Exemplo n.º 7
0
 // Start is called before the first frame update
 void Start()
 {
     controller = (MiddleController)FindObjectOfType(typeof(MiddleController));
 }