public AllJoynConnectForm(AllJoynBus bus, Form owner) { _ajBus = bus; _owner = owner; InitializeComponent(); this.Hide(); }
private void btnAllJoyn_Click(object sender, EventArgs e) { if (!_callbacksInstalled) { setCallbacks(); } _connectForm.ShowDialog(this); txtTranscript.Text = _trancriptText.ToString(); if (_connectForm.IsConnected) { _allJoyn = _connectForm.AJBus; _session = _connectForm.AJSession; } }
private void btnAllJoyn_Click(object sender, EventArgs e) { if (!_callbacksInstalled) { setCallbacks(); } _connectForm.ShowDialog(this); if (_connectForm.IsConnected) { _allJoyn = _connectForm.AJBus; _session = _connectForm.AJSession; _identity = _connectForm.MyHandle; _connected = true; if (!_connectForm.IsNameOwner) { sendIdentityMessage(); } } }
public PhotoChatForm() { InitializeComponent(); _allJoyn = new AllJoynBus(); _connectForm = new AllJoynConnectForm(_allJoyn, this); _transcriptForm = new SimpleTranscript(); _buffer = new RichTextBuffer(richTextOutput); _chatText = new StringBuilder(DateTime.Now.ToString()); _chatText.AppendLine(); _transcriptText = new StringBuilder("New Session " + DateTime.Now.ToString()); _transcriptText.AppendLine(); // EOL _connected = false; // refresh of the UI and other events related to the UI are managed by this timer // see timedEvent() for details _timer = new System.Windows.Forms.Timer(); _timer.Interval = 300; _timer.Start(); _timer.Tick += new EventHandler(timedEvent); _timer.Enabled = true; // large thumbnails imageList1.ImageSize = new Size(64, 64); imageList1.TransparentColor = Color.White; // small thumbnails _largeList = new ImageList(); _largeList.ImageSize = new Size(32, 32); _largeList.TransparentColor = Color.White; lvPic.LargeImageList = _largeList; lvPic.SmallImageList = _largeList; lvPic.View = View.Tile; richTextOutput.AllowDrop = true; richTextOutput.DragEnter += richTextOutput_DragEnter; richTextOutput.DragDrop += richTextOutput_DragDrop; }
private void receiveOutput(string data, ref int sz, ref int informType) { string handle = null; string msg = null; TextType type = TextType.Error; if (_session == null) { if (_allJoyn == null) _allJoyn = _connectForm.AJBus; _session = new AllJoynSession(_allJoyn); if (!_connectForm.IsNameOwner) sendIdentityMessage(); } switch (informType) { case 0: type = TextType.Error; _buffer.AddDeferred(data, "Error", type); _transcriptText.AppendLine(data); break; case 1: type = TextType.Remote; if (parseForIdentity(data)) return; msg = lookupChatter(data, out handle); data = msg; _buffer.AddDeferred(data, handle, type); _deferredStatus = "last message received " + dateTimeString(); break; case 2: type = TextType.Status; _transcriptText.AppendLine(data); break; case 3: type = TextType.System; _transcriptText.AppendLine(data); break; default: type = TextType.Error; _buffer.AddDeferred(data, "Error", type); _transcriptText.AppendLine(data); break; } }
private void btnAllJoyn_Click(object sender, EventArgs e) { if (!_callbacksInstalled) { setCallbacks(); } _connectForm.ShowDialog(this); if (_connectForm.IsConnected) { _allJoyn = _connectForm.AJBus; _session = _connectForm.AJSession; _identity = _connectForm.MyHandle; _connected = true; if (!_connectForm.IsNameOwner) sendIdentityMessage(); } }
public AllJoynSession(AllJoynBus bus) { _ajBus = bus; _handles = new Dictionary<string, AllJoynRemoteObject>(); }
public AllJoynSession(AllJoynBus bus) { _ajBus = bus; _handles = new Dictionary <string, AllJoynRemoteObject>(); }