Exemplo n.º 1
0
 private void SendMessage(string message)
 {
     //chatManager.SendMessage(new Backend.Message { Content = message });
     Program.Client.SendComment(new Backend.Message {
         Content = message
     }, @event.Id);
     Thread.Sleep(500);
     mainForm.ShowPanel(new UiEventDisplayPanel(@event.Id, caller));
 }
Exemplo n.º 2
0
        private void EditEvent(object sender, EventArgs e)
        {
            if (this.eventNameBox.Text == "")
            {
                finishResultLabel.Text = "You cannot remove the name.";
                return;
            }
            if (this.addressBox.Text != [email protected]())
            {
                try
                {
                    //EXTENTION METHOD
                    [email protected] = this.addressBox.Text.FormatAddressInfo();
                    MapPoint location = [email protected]().LatLongFromString();
                    [email protected]  = location.Latitude;
                    [email protected] = location.Longitude;
                }
                catch
                {
                    finishResultLabel.Text = "Invalid address.";
                    return;
                }
            }

            FillInEvent();
            if (!FillInTime())
            {
                finishResultLabel.Text = "Invalid time.";
                return;
            }
            @event.Images.RemoveAll(item => item == "<none>");

            Program.Client.EditEvent(@event);
            //Program.DataManager.Write(new DatabaseEntryEditor("events_full", @event.Id), EventFull.ToDataList(@event));

            mainForm.ShowPanel(caller);
            caller.Reload();
            //origin.LoadMyEvents();
            this.Close();
        }