Пример #1
0
		public async Task<string> GetSpeakerImagePath (Conference conference, Speaker speaker)
		{

			string documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
			string localFilename = conference.Slug + "-" + speaker.Slug + ".png";
			string localPath = Path.Combine (documentsPath, localFilename);
			byte[] bytes = null;

			if (!File.Exists (localPath)) {
				using (var httpClient = new HttpClient (new NativeMessageHandler ())) {

					try {
						bytes = await httpClient.GetByteArrayAsync (speaker.ImageUrl);
					} catch (OperationCanceledException opEx) {
						Insights.Report (opEx);
						return null;
					} catch (Exception e) {
						Insights.Report (e);
						return null;
					}

					//Save the image using writeAsync
					FileStream fs = new FileStream (localPath, FileMode.OpenOrCreate);
					await fs.WriteAsync (bytes, 0, bytes.Length);
				}
			} 

			return localPath;

		}
        public void Load()
        {
            using (var session = _sessionFactory.OpenSession())
            using (var tx = session.BeginTransaction())
            {
                var codeMash = new Conference("CodeMash");
                var mix10 = new Conference("MIX");
                var pdc = new Conference("PDC");

                codeMash.AddSession(new Session("0-60 with Fluent NHibernate", "Fluent NHibernate is a framework, that sits on top of NHibernate, which helps to cut down on some of the headaches you will indubitably encounter with picking up such a mature ORM. We'll be discussing how FNH can help cut down the learning curve of using NHibernate as an ORM and how it can benefit existing NHibernate production environments long term by utilizing a convention over configuration approach.", new Speaker("Hudson", "Akridge")));
                codeMash.AddSession(new Session("Azure: Lessons from the field", "Come learn about Microsoft's Azure platform (and cloud computing in general) as we look at an application built to assist in the processing and publishing of large-scale scientific data. We will discuss architecture choices, benchmarking results, issues faced as well as the work-arounds implemented. This session will give you insight into the process of developing for the cloud, as well as tips and tricks to help you avoid some common pitfalls.", new Speaker("Rob", "Gillen")));
                codeMash.AddSession(new Session("Going Dynamic with C#", "C# might be looking a little long in the tooth, but C# 4.0 adds dynamic support to compete with all the young punks. In this session, based on material from Effective C#, 2nd edition, you’ll learn how to mix dynamic features into the safety and performance of static typing. It’s yet another tool in the toolbox that you can use with C#. You’ll learn techniques that are easier to implement using dynamic features. You’ll learn how to bridge the gap between dynamic and static typing. Most of all you’ll learn when dynamic typing is an advantage, and when static typing provides the best solution.", new Speaker("Bill", "Wagner")));
                codeMash.AddSession(new Session("Maintainable ASP.NET MVC", "Introduce software developers to Microsoft’s ASP.NET MVC framework and provide “beyond the bits” guidance to help teams get up to speed on this exciting alternative to WebForms development.", new Speaker("Chris", "Patterson")));
                codeMash.AddSession(new Session("Techniques for Programming Parallel Solutions", "Building multi-threaded applications can be hard work. So come learn a number of techniques for developing software solutions that take advantage of today’s multi-core processors. In true CodeMash fashion, the session starts by laying a foundation of concurrency basics using C++. The bulk of the session then looks at all of the various techniques for parallelizing “work” in .NET 3.5 using C#, while avoiding a number of “gotchas”. Finally, the session concludes with how these techniques will make it easy to develop parallel solutions with the changes coming in Visual Studio 2010, .NET 4.0, and F#.", new Speaker("Michael", "Slade")));

                mix10.AddSession(new Session("Treat Your Content Right", "Most the time, designers don’t publish napkin sketches as final designs. But the same is not true of content. We regularly cram last-minute, sketchy content into our otherwise thoughtfully planned websites. Learn why content strategy and web writing matter, what they are, how to incorporate them into your design process, and how they make meaningful websites that connect with people. Also look at a few case studies that show how content strategy and happy collaborations produce better web experiences. For Everyone.", new Speaker("Tiffani", "Jones")));
                mix10.AddSession(new Session("The Mono Project", "Mono is a free and open source implementation of .NET that runs on Windows, Unix, and Macintosh. In more than 5 years since the first version of Mono was released, the Mono project has continued to add support for new functionality, such as C# 3.0, LINQ, and Silverlight; and has continued to see adoption. Come hear about the latest developments and future plans from the founder of the Mono project.", new Speaker("Miguel", "de Icaza")));

                pdc.AddSession(new Session("Building Line of Business Applications with Microsoft Silverlight 4", "Learn about enhancements to data binding and data validation as well as new support for rich text & printing in the platform that allow you to build compelling LOB user experiences. In addition, you will see how you can incorporate webcam & microphone support into your applications using Silverlight 4.", new Speaker("David", "Poll")));
                pdc.AddSession(new Session("Building Java Applications with Windows Azure", "Come learn how to build large-scale applications in the cloud using Java, taking advantage of new Windows Azure features. This session will cover using Apache Tomcat and Java in Windows Azure.", new Speaker("Steve", "Marx")));
                pdc.AddSession(new Session("ASP.NET MVC 2: Ninjas Still on Fire Black Belt Tips", "Having the customer on your back to deliver features on time and under budget with tight deadlines can make you feel like you’re being chased by ninjas on fire. Join Scott Hanselman and he’ll walk through lots of tips and tricks to get the most out of the ASP.NET MVC 2 framework and deliver work quickly and with style. Come see ASP.NET MVC 2’s better productivity features as we make the most of several key features.", new Speaker("Scott", "Hanselman")));
                pdc.AddSession(new Session("Developing REST Applications with the .NET Framework", "Come hear an overview of the REST principles and why REST is becoming popular beyond traditional Web applications. Learn how to write applications that produce and consume RESTful services using the .NET Framework 4 and the improvements we have planned for future versions of the .NET Framework.", new Speaker("Henrik", "Nielsen")));

                GenerateAttendees(codeMash);
                GenerateAttendees(mix10);
                GenerateAttendees(pdc);

                session.SaveOrUpdate(codeMash);
                session.SaveOrUpdate(mix10);
                session.SaveOrUpdate(pdc);

                tx.Commit();
            }
        }
Пример #3
0
 /// <summary>
 /// Gets the existing <see cref="Conference"/> with the specified ID or creates a new one.
 /// </summary>
 /// <param name="conferenceId"></param>
 /// <returns></returns>
 async Task<Conference> GetOrCreateConference()
 {
     // obtain existing or new conference
     conference = conferenceId != null ? await GetConference(conferenceId) : await CreateConference();
     conferenceId = conference.ConferenceId;
     return conference;
 }
 private static void GenerateAttendees(Conference conference)
 {
     new Attendee("Nelson", "Tischler").RegisterFor(conference);
     new Attendee("Allie", "Lemelin").RegisterFor(conference);
     new Attendee("Guy", "Brumback").RegisterFor(conference);
     new Attendee("Karina", "Lerman").RegisterFor(conference);
     new Attendee("Darryl", "Schwager").RegisterFor(conference);
     new Attendee("Mathew", "Blay").RegisterFor(conference);
     new Attendee("Nita", "Swicegood").RegisterFor(conference);
     new Attendee("Clinton", "Westra").RegisterFor(conference);
     new Attendee("Tyrone", "Grieve").RegisterFor(conference);
     new Attendee("Hugh", "Nowland").RegisterFor(conference);
     new Attendee("Katy", "Greenstein").RegisterFor(conference);
     new Attendee("Maricela", "Kisinger").RegisterFor(conference);
     new Attendee("Hugh", "Banach").RegisterFor(conference);
     new Attendee("Mallory", "Rexford").RegisterFor(conference);
     new Attendee("Earnestine", "Belvin").RegisterFor(conference);
     new Attendee("Kathrine", "Hamamoto").RegisterFor(conference);
     new Attendee("Clinton", "Rinker").RegisterFor(conference);
     new Attendee("Neil", "Groman").RegisterFor(conference);
     new Attendee("Christian", "Pineiro").RegisterFor(conference);
     new Attendee("Lance", "Cullum").RegisterFor(conference);
     new Attendee("Allan", "Fahnestock").RegisterFor(conference);
     new Attendee("Kelly", "Mcgrail").RegisterFor(conference);
     new Attendee("Jamie", "Geiser").RegisterFor(conference);
     new Attendee("Tameka", "Bercier").RegisterFor(conference);
     new Attendee("Clayton", "Torpey").RegisterFor(conference);
     new Attendee("Tyrone", "Nassif").RegisterFor(conference);
     new Attendee("Tanisha", "Hendrixson").RegisterFor(conference);
     new Attendee("Lilia", "Paskett").RegisterFor(conference);
     new Attendee("Lorrie", "Simonsen").RegisterFor(conference);
     new Attendee("Pearlie", "Host").RegisterFor(conference);
 }
    protected void RegisterForCourses_Click(object sender, EventArgs e)
    {
        HttpCookie ConferencesCoursesRegistering = new HttpCookie("CoursesToRegisterFor");
        ConferencesCoursesRegistering.Expires = DateTime.Now.AddMinutes(20);
        ConferencesCoursesRegistering.Path = "/";
        Dictionary<string, Dictionary<string, float>> coursesToRegisterFor = new Dictionary<string, Dictionary<string, float>>();
        List<Conference> chosenConferences = new List<Conference>();

        int coursesChecked = 0;
        foreach (GridViewRow row in coursesForAllConferences.Rows)
        {
            Conference newConference = new Conference(row.Cells[0].Text);
            CheckBox registerForCourse = ((CheckBox)row.Cells[7].FindControl("RegisterForEventCB"));
            if (registerForCourse.Checked)
            {
                coursesChecked += 1;
                ConferencesCoursesRegistering.Values.Add(row.Cells[1].Text, row.Cells[0].Text);
            }
        }

        if (coursesChecked > 0)
        {
            Response.Cookies.Add(ConferencesCoursesRegistering);

            Response.Redirect("FinalizeRegistration.aspx");
        }
        else
        {
            OneEventChosen.IsValid = false;
        }
    }
Пример #6
0
 public Campaign(int id, Season season, int year, Class _class, Conference conference, int? identifier)
 {
     ID = id;
     _Season = season;
     Year = year;
     _Class = _class;
     _Conference = conference;
     Identifier = identifier;
 }
 public void InsertOrUpdate(Conference conference)
 {
     if (conference.id == default(int)) {
         // New entity
         db.Conference.AddObject(conference);
     } else {
         // Existing entity
         db.Conference.Attach(conference);
         db.ObjectStateManager.ChangeObjectState(conference, EntityState.Modified);
     }
 }
Пример #8
0
 public ActionResult JSONAdd(Conference conference)
 {
     IList<Conference> conferences = null;
     using (var context = new OfficeContext())
     {
         context.Conferences.Add(conference);
         context.SaveChanges();
         conferences = context.Conferences.ToList();
     }
     return conferences.GridJSONActions<Conference>();
 }
        public ActionResult Create(Conference conference)
        {
            if (ModelState.IsValid)
            {
                db.Conference.AddObject(conference);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.scale_id = new SelectList(db.Scale, "id", "name", conference.scale_id);
            return View(conference);
        }
        public void Should_get_events_by_name()
        {
            var conference = new Conference("Foo");

            SaveEntities(conference);

            var repos = new ConferenceRepository(SessionSource.CreateSession());

            var loaded = repos.GetByName("Foo");

            loaded.ShouldEqual(conference);
        }
 public ActionResult Edit(Conference conference)
 {
     if (ModelState.IsValid)
     {
         db.Conference.Attach(conference);
         db.ObjectStateManager.ChangeObjectState(conference, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.scale_id = new SelectList(db.Scale, "id", "name", conference.scale_id);
     return View(conference);
 }
        public void Should_cascade_attendee()
        {
            var attendee = new Attendee("Joe", "Schmoe");
            var newEvent = new Conference("Some event");

            attendee.RegisterFor(newEvent);

            SaveEntities(newEvent);

            var loaded = SessionSource.CreateSession().Load<Conference>(newEvent.Id);

            loaded.GetAttendees().Count().ShouldEqual(1);
            loaded.GetAttendees().ElementAt(0).Conference.ShouldEqual(loaded);
        }
Пример #13
0
 public Division(string name)
 {
     this.name = name;
     if (name.IndexOf("Southeast") != -1
         || name.IndexOf("Atlantic") != -1
         || name.IndexOf("Central") != -1)
     {
         this.conf = Conference.EASTERN;
     }
     else
     {
         this.conf = Conference.WESTERN;
     }
 }
Пример #14
0
 private Team MakeTeam(string teamName, string shortTeamName, Conference conference, Division division,
     int teamRating, int homeBonus)
 {
     return new Team
     {
         Name = teamName,
         ShortName = shortTeamName,
         Conference = conference,
         Division = division,
         Rating = teamRating,
         HomeBonus = homeBonus,
         Record = new Record()
     };
 }
        public void Should_cascade_session()
        {
            var newEvent = new Conference("Some event");
            var session = new Session("Foo", "Bar", new Speaker("Joe", "Schmoe"));

            newEvent.AddSession(session);

            SaveEntities(newEvent);

            var loaded = SessionSource.CreateSession().Load<Conference>(newEvent.Id);

            loaded.SessionCount.ShouldEqual(1);
            loaded.GetSessions().Count().ShouldEqual(1);
            loaded.GetSessions().ElementAt(0).Conference.ShouldEqual(loaded);
        }
Пример #16
0
		public async Task SetConference (Conference conference)
		{
			conferenceContentView.Layer.BorderColor = UIColor.LightGray.CGColor;
			conferenceContentView.Layer.BorderWidth = 0.5f;

			this.conferenceName.Text = conference.Name;
			this.AccessibilityIdentifier = conference.Slug;

			highlightColorBar.BackgroundColor = UIColorExtensions.FromHex (conference.HighlightColor);
			conferenceFavoriteView.BackgroundColor = UIColorExtensions.FromHex (conference.HighlightColor);

			if (conference.StartDate.HasValue) {
				this.conferenceDate.Text = conference.StartDate.Value.ToShortDateString ();
			}
			this.conferenceDescription.Text = conference.Description;

			this.conferenceLocation.Text = conference.Address.AddressShortDisplay();

			this.addedToScheduleStatus.Font = UIFont.FromName("FontAwesome", 17f);
            this.addedToScheduleStatus.Text = conference.IsAddedToSchedule ? "\xf274" : "\xf273"; //
            //this.addedToScheduleStatus.Text = "\xf273";

            if (!string.IsNullOrWhiteSpace (conference.ImageUrl)) {
				try {
					
					var imageService = ServiceLocator.Current.GetInstance<IImageService>();
					var localPath = await imageService.GetConferenceImagePath(conference);

					//Resizing image is time costing, using async to avoid blocking the UI thread
					UIImage image = null;
					CGSize imageViewSize = conferenceImage.Frame.Size;

					await Task.Run (() => {
						var uiImage = UIImage.FromFile (localPath);
						image = uiImage?.Scale(imageViewSize);
					});


					conferenceImage.Image = image;

				} catch (Exception e) {
					Insights.Report (e);
				}
			}
		}
        public void Should_map_all_event_fields_correctly()
        {
            var dateTime = new DateTime(2013, 10, 1);

            var newEvent = new Conference("Some event")
            {
                Location = "Copenhagen",
                Date = dateTime
            };

            SaveEntities(newEvent);

            var newSession = SessionSource.CreateSession();

            var savedEvent = newSession.Load<Conference>(newEvent.Id);

            savedEvent.Name.ShouldEqual(newEvent.Name);
            savedEvent.Location.ShouldEqual(newEvent.Location);
            savedEvent.Date.ShouldEqual(dateTime);
        }
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			source = new ConferencesSource {
				ConferenceSelected = c => {
					selectedConference = c;
					PerformSegue("SelectConference", this);
				}
			};

			TableView.Source = source;

			RefreshControl = new UIRefreshControl ();
			RefreshControl.ValueChanged += async delegate {
				await Reload();

				RefreshControl.EndRefreshing();
			};
		}
        private static void ProcessConference(string[] input)
        {
            var conference = new Conference();

            try
            {
                conference.CreateSchedule(new TalkLoader(input.ToList()));

                var output = conference.ListSchedule(new TextFileOutputFormatter());

                foreach (var item in output)
                {
                    Console.WriteLine(item);
                }
                Console.Read();
            }
            catch (ArgumentException ex)
            {
                Console.WriteLine("Sorry there has been a problem... {0}", ex.Message);
            }
        }
Пример #20
0
        public async Task<JsonNetResult> CreateConference(Conference conference)
        {
            conference.CreateDate = DateTime.Now;
            conference.CreatorId = AppContext.SecurityUser.ID;

            using (var uofw = CreateSystemUnitOfWork())
            {
                var user = _userService.Get(uofw, AppContext.SecurityUser.ID);
                
                conference.Members.Add(new ConferenceMember()
                {
                    Object = user,
                    ObjectID = user.ID
                });

                _conferenceService.Create(uofw, conference);

                await uofw.SaveChangesAsync();
            }

            return new JsonNetResult(conference);
        }
Пример #21
0
		public async Task ToggleFavoriteAsync()
		{
			this.IsFavoritingSession = true;
			var existingConference = await _databaseService.LoadConferenceAsync (this.Session.ConferenceId);
			var existingScheduledConference = await _databaseService.LoadConferenceAsync (existingConference.Name);
			if (existingScheduledConference == null)
			{
				existingScheduledConference = new Conference (existingConference);
				await _databaseService.SaveConferenceAsync (existingScheduledConference);
			}

			var existingSessions = await _databaseService.LoadFavoriteSessionsAsync (existingScheduledConference.Id);
			if (existingSessions == null)
			{
				existingSessions = new List<Session> ();
			}

			var session = existingSessions.FirstOrDefault (s => s.Title == this.Session.Title);
			if (session == null)
			{
				this.Session.IsAddedToSchedule = true;
				var user = await _databaseService.LoadCurrentUserAsync ();
				if (user != null) {
					var userName = user.UserName;
					var conferenceSlug = existingScheduledConference.Slug;
					var sessionSlug = this.Session.Slug;
					await _remoteConferenceService.AddSessionToScheduleAsync (userName, conferenceSlug, sessionSlug);
				}
			}
			else
			{
				this.Session.IsAddedToSchedule = false;
			}

			await _databaseService.SaveSessionAsync (this.Session);
			this.IsFavoritingSession = false;


		}
Пример #22
0
		public async void loadData ()
		{
			LoadingOverlay loadingOverlay;
			// Determine the correct size to start the overlay (depending on device orientation)
			var bounds = UIScreen.MainScreen.Bounds; // portrait bounds
			if (UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeLeft
			    || UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeRight) {
				bounds.Size = new CGSize (bounds.Size.Height, bounds.Size.Width);
			}
			// show the loading overlay on the UI thread using the correct orientation sizing
			loadingOverlay = new LoadingOverlay (bounds);
			View.Add (loadingOverlay);

			// Fetch the weather information asynchronously, parse the results,
			// then update the screen:
			string url = "https://beep2.cellulant.com:9011/walletTouchTestScript_cfc.php";

			JsonValue json = await FetchBeneficiariesTask (url);
			loadingOverlay.Hide (); //Hide the dialog when the task is complete.

			// Extract the array of name/value results for the field name "weatherObservation":
			// Note that there is no exception handling for when this field is not found.
			JsonValue jsonResult = json ["RESULTS_ARRAY"];

			Console.Out.WriteLine ("Result: {0}", jsonResult.ToString ());
			for (int i = 0; i < jsonResult.Count; i++) {

				Console.Out.WriteLine ("Result: {0}", jsonResult [i] ["BANK_NAME"]);
				Conference confernce = new Conference ();
				confernce.Name = jsonResult [i] ["BANK_NAME"];
				confernce.DateString = jsonResult [i] ["NOMINATED_ACCOUNT"];
				confernce.Description = jsonResult [i] ["NOMINATION_ALIAS"];

				listItems.Add (confernce);
				TableView.Source = new MyTableViewSource (listItems);
			}
				
		}
Пример #23
0
 private void SubstituteProbowlTeam(Conference conf, String newRoster)
 {
     int index = mData.IndexOf( String.Format("# {0} ProBowl players", conf.ToString()));
     int endIndex = -1;
     if (index < 0)
     {
         index = mData.IndexOf(String.Format("{0},QB1", conf.ToString()));
     }
     if (index > 0)
     {
         endIndex = mData.LastIndexOf(conf.ToString()+",");
         if (endIndex > 0)
             endIndex = mData.IndexOf("\n", endIndex);
     }
     if (endIndex > 0 && index > 0)
     {
         StringBuilder builder = new StringBuilder(mData.Length + 60);
         builder.Append(mData.Substring(0, index));
         builder.Append(newRoster);
         builder.Append(mData.Substring(endIndex + 1));
         mData = builder.ToString();
     }
 }
        private void btnStart_Click(object sender, EventArgs e)
        {
            if (lstSelectUser.Items.Count < 2)
            {
                Close();
            }
            else
            {
                string strUsers = string.Empty;
                for (int i = 0; i < Form1.arrConf.Count - 1; i++)
                {
                    strUsers = strUsers + Form1.arrConf[i].ToString() + "|";
                }
                strUsers = strUsers + Form1.strMe;

                for (int i = 0; i < Form1.arrConf.Count - 1; i++)
                {
                    chat.SendMessage(Form1.strMe, Form1.arrConf[i].ToString(), "(((CONF)))"+strUsers);
                }
                Form f = new Conference();
                f.Show();
            }
        }
Пример #25
0
 public void Save(Conference conference)
 {
     ExecuteInSessionTransaction(() => { _session.SaveOrUpdate(conference); });
 }
Пример #26
0
 protected void SetCurrentNavigation(Conference conference, string title)
 {
     SetTitle(title);
     SetSlug(conference);
     SetAvailableMenuItems();
 }
Пример #27
0
 void SetSlug(Conference conference) => ViewData["Slug"] = conference.Id;
Пример #28
0
        public async Task LoadDataAsync(string conferenceName, Stream fileStream, ApplicationDbContext db)
        {
            //var blah = new RootObject().rooms[0].sessions[0].speakers[0].name;

            var addedSpeakers = new Dictionary <string, Speaker>();
            var addedTracks   = new Dictionary <string, Track>();
            var addedTags     = new Dictionary <string, Tag>();

            var array = await JToken.LoadAsync(new JsonTextReader(new StreamReader(fileStream)));

            var conference = new Conference {
                Name = conferenceName
            };

            var root = array.ToObject <List <RootObject> >();

            foreach (var date in root)
            {
                foreach (var room in date.rooms)
                {
                    if (!addedTracks.ContainsKey(room.name))
                    {
                        var thisTrack = new Track {
                            Name = room.name, Conference = conference
                        };
                        db.Tracks.Add(thisTrack);
                        addedTracks.Add(thisTrack.Name, thisTrack);
                    }

                    foreach (var thisSession in room.sessions)
                    {
                        foreach (var speaker in thisSession.speakers)
                        {
                            if (!addedSpeakers.ContainsKey(speaker.name))
                            {
                                var thisSpeaker = new Speaker {
                                    Name = speaker.name
                                };
                                db.Speakers.Add(thisSpeaker);
                                addedSpeakers.Add(thisSpeaker.Name, thisSpeaker);
                            }
                        }

                        foreach (var category in thisSession.categories)
                        {
                            if (!addedTags.ContainsKey(category.name))
                            {
                                var thisTag = new Tag {
                                    Name = category.name
                                };
                                db.Tags.Add(thisTag);
                                addedTags.Add(thisTag.Name, thisTag);
                            }
                        }

                        var session = new Session
                        {
                            Conference = conference,
                            Title      = thisSession.title,
                            StartTime  = thisSession.startsAt,
                            EndTime    = thisSession.endsAt,
                            Track      = addedTracks[room.name],
                            Abstract   = thisSession.description
                        };

                        session.SessionSpeakers = new List <SessionSpeaker>();
                        foreach (var sp in thisSession.speakers)
                        {
                            session.SessionSpeakers.Add(new SessionSpeaker
                            {
                                Session = session,
                                Speaker = addedSpeakers[sp.name]
                            });
                        }

                        db.Sessions.Add(session);
                    }
                }
            }
        }
Пример #29
0
 public void addConference(Conference conf)
 {
     serviceServer.addConference(conf);
 }
Пример #30
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="conf"></param>
        /// <param name="proBowlPos"></param>
        /// <returns></returns>
        public String GetProBowlPlayer(Conference conf, String proBowlPos)
        {
            String ret = "";
            int offset = 0;
            if (conf == Conference.NFC)
                offset += 0x48; //(30 spots * 2 bytes);

            int posIndex = -1;
            switch (proBowlPos)
            {
                case "RET1":
                    posIndex = positionNames.Length;
                    break;
                case "RET2":
                    posIndex = positionNames.Length + 1;
                    break;
                case "RET3":
                    posIndex = positionNames.Length + 2;
                    break;
                default:
                    posIndex = GetPositionIndex(proBowlPos);
                    break;
            }
            int loc = mProwbowlStartingLoc + offset + (2 * (int)posIndex);

            int teamIndex = OutputRom[loc+1];
            int pos = OutputRom[loc ];

            string team = TecmoTool.Teams[teamIndex];
            ret = String.Format("{0},{1},{2},{3}", conf.ToString(),
                proBowlPos.ToString(), team, ((TSBPlayer)pos).ToString());

            return ret;
        }
Пример #31
0
 private static T Map <T>(Conference conference) where T : ConferenceDto, new()
 => new()
Пример #32
0
 public bool AddConference(League league, Conference conf)
 {
     return(league.AddConference(conf) == null);
 }
 public void Add(Conference formularz)
 {
     _context.Conferences.Add(formularz);
     _context.SaveChanges();
 }
Пример #34
0
 public MapViewController(MapFlipViewController mfvc) : base()
 {
     conf  = AppDelegate.ConferenceData;
     _mfvc = mfvc;
     ConferenceLocation = conf.Location.Location.To2D();
 }
Пример #35
0
 public void CreateConferene([FromBody] Conference conference)
 {
     _conferenceService.CreateConferene(conference);
 }
Пример #36
0
 public Conference Add(Conference model)
 {
     model.Id = conferences.Max(c => c.Id) + 1;
     conferences.Add(model);
     return(model);
 }
Пример #37
0
 public ScheduleViewModel(Conference conference, NavigationModel navigationModel)
 {
     _conference      = conference;
     _navigationModel = navigationModel;
 }
 private static bool IsNonParticipantMessage(Conference conference, InstantMessageResponse message)
 {
     return(!conference.Participants.Any(p => p.Username.Equals(message.From, StringComparison.InvariantCultureIgnoreCase)));
 }
        public static void Seed(IServiceProvider services)
        {
            // TODO: Make this like, good, and only in Dev
            using (var scope = services.CreateScope())
            {
                var db = scope.ServiceProvider.GetService <ApplicationDbContext>();

                db.Database.EnsureDeleted();
                db.Database.EnsureCreated();

                // Conference
                var conference = new Conference {
                    Name = "DevIntersection Europe 2017"
                };
                db.Conferences.Add(conference);

                // Speakers
                var speakers = new[] {
                    "Carl Franklin",
                    "Don Wibier",
                    "Donna Malayeri",
                    "Jeff Fritz",
                    "Jessica Engström",
                    "Jimmy Engström",
                    "Luca Bolognese",
                    "Mads Torgersen",
                    "Miguel de Icaza",
                    "Mikkel Mork Heghoj",
                    "Paul Yuknewicz",
                    "Richard Campbell",
                    "Scott Cate",
                    "Scott Hunter",
                    "Seth Juarez",
                    "Shayne Boyer",
                    "Steve Guggenheimer",
                    "Tess Ferrandez",
                    "Tiberiu Covaci"
                };

                var speakerLookup = new Dictionary <string, Speaker>();
                foreach (var s in speakers)
                {
                    var speaker = new Speaker
                    {
                        Name = s
                    };
                    db.Speakers.Add(speaker);
                    speakerLookup[s] = speaker;
                }

                // Tracks
                var tracks = new[] {
                    "Room 1",
                    "Room 2",
                    "Room 3"
                };

                var trackLookup = new Dictionary <string, Track>();
                foreach (var t in tracks)
                {
                    var track = new Track
                    {
                        Conference = conference,
                        Name       = t
                    };
                    db.Tracks.Add(track);
                    trackLookup[t] = track;
                }

                void AddSessions(SessionGroup group)
                {
                    var end = group.StartTime + TimeSpan.FromHours(1);

                    foreach (var s in group.Sessions)
                    {
                        var session = new Session
                        {
                            Conference = conference,
                            Title      = s.Name,
                            StartTime  = group.StartTime,
                            EndTime    = end,
                            Track      = trackLookup[s.Track],
                            Abstract   = s.Abstract
                        };

                        session.SessionSpeakers = new List <SessionSpeaker>();
                        foreach (var sp in s.Speakers)
                        {
                            session.SessionSpeakers.Add(new SessionSpeaker
                            {
                                Session = session,
                                Speaker = speakerLookup[sp]
                            });
                        }

                        db.Sessions.Add(session);
                    }
                }

                // Sessions

                var sessionGroups = new List <SessionGroup>();

                // 9:00 - 10:00
                var startTime = new DateTimeOffset(2017, 9, 18, 9, 0, 0, TimeSpan.FromHours(1));

                // Mon
                sessionGroups.Add(new SessionGroup
                {
                    StartTime = startTime,
                    Sessions  = new[] {
                        new SessionData {
                            Name     = "Keynote: The History of .NET", Speakers = new[] { "Richard Campbell" }, Track = "Room 1",
                            Abstract = @"Join Richard Campbell as he sets the stage for our learning at DevIntersection by reviewing the history of the .NET Framework, Visual Studio .NET, and the supporting frameworks"
                        }
                    }
                });

                // Tue
                sessionGroups.Add(new SessionGroup
                {
                    StartTime = startTime.AddDays(1),
                    Sessions  = new[] {
                        new SessionData {
                            Name = "Keynote: Transforming the World with AI", Speakers = new[] { "Steve Guggenheimer" }, Track = "Room 1"
                        }
                    }
                });

                // 10:30 - 11:30
                startTime = startTime + TimeSpan.FromHours(1) + TimeSpan.FromMinutes(30);

                // Mon
                sessionGroups.Add(new SessionGroup
                {
                    StartTime = startTime,
                    Sessions  = new[]
                    {
                        new SessionData {
                            Name     = "GETTING STARTED DEVELOPING .NET CLOUD APPLICATIONS ON AZURE USING VISUAL STUDIO", Speakers = new [] { "Mikkel Mork Heghoj" }, Track = "Room 1",
                            Abstract = @"How easy is it to get .NET application to run in Azure? Do .NET applications run better in Azure, and how? In this talk we will walk through the unique enhancements we have built in to Azure for giving your .NET applications the best fit in the cloud. We’ll show you a fast path to get existing apps up on Azure. We’ll also show you how to build modern scalable cloud app patterns for Web App and worker microservices using Docker containers. We’ll also show you how to be incredibly productive building and debugging your app using Visual Studio."
                        },
                        new SessionData {
                            Name     = "What’s new in C#", Speakers = new[] { "Mads Torgersen" }, Track = "Room 2",
                            Abstract = @"In this demo-filled talk, Mads goes over what’s new in C# 7.0 and 7.1. Showing tuples, deconstruction, local functions, pattern matching and more, he’ll focus both on the language features and the support for them in Visual Studio. At the end he’ll show a glimpse of what’s being worked on for future versions of C#."
                        },
                        new SessionData {
                            Name     = "Holo world - Create your first HoloLens app with Unity", Speakers = new [] { "Jimmy Engström" }, Track = "Room 3",
                            Abstract = @"HoloLens breached a barrier, a barrier between the digital and the real world, bringing digital content into our world.
Over the past year the HoloLens has continued to create new ways to visualize, to change education and the medical industry.
HoloLens is not only for games it is a Business platform (that is game enabled)
Using Unity we can create an experience that lets you bring digital content and interact with the real world.
During this session we will take a look at the HoloLens hardware, the possibilities, the limitations and tooling.
We will take a look at the basics of Unity and also create a HoloLens app from scratch complete with Gaze, Air Tap, Spatial mapping and Voice using HoloToolkit."
                        }
                    }
                });

                // Tue
                sessionGroups.Add(new SessionGroup
                {
                    StartTime = startTime.AddDays(1),
                    Sessions  = new[]
                    {
                        new SessionData {
                            Name     = "Your Favorite JavaScript Frameworks Meet ASP.NET", Speakers = new[] { "Shayne Boyer" }, Track = "Room 1",
                            Abstract = @"Client-side JavaScript and progressive web applications have evolved significantly at the same time as ASP.NET Core. In this code-filled session, We will show you how to use React, Angular, and Knockout with the latest ASP.NET Core to deliver web applications your customers will love."
                        },
                        new SessionData {
                            Name     = "Powerful Productivity Tips and Tricks for Visual Studio 2017", Speakers = new[] { "Scott Hunter" }, Track = "Room 2",
                            Abstract = @"With the third update to Visual Studio 2017, a new collection of tools are now available to you. In this demo-filled session, Scott Hunter will show you how you can use the new features like .NET Core 2.0, ASP.NET Core 2.0, Docker Container, Live Unit Testing, C# 7.1 and Code Style checking to make your software development efforts quicker, simpler and more fun."
                        },
                        new SessionData {
                            Name     = "Machine Learning 101 – just enough to impress your boss", Speakers = new[] { "Tess Ferrandez" }, Track = "Room 3",
                            Abstract = @"If you know everything there is to know about regression algorithms, K-nearest neighbors and SVMs, this session is probably not for you. But if you want to know what they hype is all about, what problems you can solve, and how to create basic Machine Learning experiments then you are very welcome. We’ll also have a look at how you can impress your boss by using the results of other people’s machine learning experiments – like cognitive services."
                        }
                    }
                });

                // 11:45 - 12:45
                startTime = startTime + TimeSpan.FromHours(1) + TimeSpan.FromMinutes(15);

                // Mon
                sessionGroups.Add(new SessionGroup
                {
                    StartTime = startTime,
                    Sessions  = new[]
                    {
                        new SessionData {
                            Name = "Quick Intro to Modern JavaScript", Speakers = new[] { "Tiberiu Covaci" }, Track = "Room 1"
                        },
                        new SessionData {
                            Name = "Introducing ASP.NET Core 2.0", Speakers = new[] { "Jeff Fritz" }, Track = "Room 2"
                        },
                        new SessionData {
                            Name = "Designing for Speech", Speakers = new[] { "Jessica Engström" }, Track = "Room 3"
                        },
                    }
                });

                startTime = startTime + TimeSpan.FromMinutes(15);

                // Tue
                sessionGroups.Add(new SessionGroup
                {
                    StartTime = startTime.AddDays(1),
                    Sessions  = new[]
                    {
                        new SessionData {
                            Name = "Bulletproof Transient Error Handling with Polly", Speakers = new[] { "Carl Franklin" }, Track = "Room 1"
                        },
                        new SessionData {
                            Name = "Azure Diagnostics: Fixing Cloud Application Issues and Performance on Azure", Speakers = new[] { "Paul Yuknewicz" }, Track = "Room 2"
                        },
                        new SessionData {
                            Name = "Practical Machine Learning - Predicting Things", Speakers = new[] { "Seth Juarez" }, Track = "Room 3"
                        },
                    }
                });

                foreach (var group in sessionGroups)
                {
                    AddSessions(group);
                }

                db.SaveChanges();
            }
        }
Пример #40
0
        public static IEnumerable <JudgeInHearingResponse> MapConferenceSummaryToJudgeInHearingResponse(Conference conference)
        {
            var conferenceId = conference.Id;

            return(conference.Participants
                   .Where(x => x.IsJudge())
                   .Select(x => new JudgeInHearingResponse
            {
                Id = x.Id,
                ConferenceId = conferenceId,
                Status = x.State.MapToContractEnum(),
                Username = x.Username,
                CaseGroup = x.CaseTypeGroup,
                UserRole = x.UserRole.MapToContractEnum()
            }));
        }
Пример #41
0
 public HomeViewModel(Conference conference)
 {
     _conference = conference;
 }
Пример #42
0
        public void SetProBowlPlayer(Conference conf, String proBowlPos, String fromTeam, TSBPlayer fromTeamPos)
        {
            //NFC => 30*2 + (int) 
            int offset = 0;
            if (conf == Conference.NFC)
                offset += 0x48; //(30 spots * 2 bytes);
            int teamIndex = GetTeamIndex(fromTeam);
            byte ti = (byte)teamIndex;
            byte pi = (byte)fromTeamPos;

            int posIndex = -1;
            switch(proBowlPos)
            {
                case "RET1":
                    posIndex = positionNames.Length;
                    break;
                case "RET2":
                    posIndex = positionNames.Length +1;
                    break;
                case "RET3":
                    posIndex = positionNames.Length +2;
                    break;
                default:
                posIndex = GetPositionIndex(proBowlPos);
                break;
            }
            int loc = mProwbowlStartingLoc + offset + (2 * posIndex);
            
            OutputRom[loc ] = pi;
            OutputRom[loc + 1] = ti;
        }
 public Task Add(Conference conference)
 {
     throw new NotImplementedException();
 }
Пример #44
0
        public String GetConferenceProBowlPlayers(Conference conf)
        {
            StringBuilder builder = new StringBuilder(500);
            for (int i = 0; i < positionNames.Length; i++)
            {
                builder.Append(GetProBowlPlayer(conf, positionNames[i]));
                builder.Append("\r\n");
            }
            builder.Append(GetProBowlPlayer(conf, "RET1"));
            builder.Append("\r\n");
            builder.Append(GetProBowlPlayer(conf,"RET2"));
            builder.Append("\r\n");
            builder.Append(GetProBowlPlayer(conf, "RET3"));
            builder.Append("\r\n");

            return builder.ToString();
        }
Пример #45
0
 public override void ExitConference(Conference conference)
 {
 }
Пример #46
0
    protected void btn_submitpaper_Click(object sender, EventArgs e)
    {
        //Storing default picture and maxpapers variables.
        string storedPath = "default.jpg";
        int    maxPapers  = 100;

        //if someone selects a file in the file browser
        if (FileUploadControl.HasFile)
        {
            //get the file info
            try
            {
                string   fileName  = Path.GetFileName(FileUploadControl.FileName);
                FileInfo fileInfo  = new FileInfo(fileName);
                string   extension = fileInfo.Extension;
                storedPath = fileName;
                //jpg is the only accespted file format, any other file types will be declined
                if (extension.Equals(".jpg", StringComparison.OrdinalIgnoreCase))
                {
                    string imagePath = Path.Combine(Server.MapPath("~/Images/") + fileName);
                    FileUploadControl.SaveAs(imagePath);
                    StatusLabel.Text += "Upload status: File uploaded to " + imagePath.ToString() + ". ";
                }
                //if it isn't jpg, print an error
                else
                {
                    StatusLabel.Text += "Upload status: The file could not be uploaded. " + extension + " Invalid file extension. jpg is the only supported image type. ";
                }
            }
            //for general unknown errors, print that error
            catch (Exception ex)
            {
                StatusLabel.Text += "Upload status: The file could not be uploaded. The following error occured: " + ex.Message + ". ";
            }
        }
        else
        {
            //if no image is uploaded, set the default image in the stored path
            storedPath = storedPath + "~/Images/Default.jpg";
        }
        //if this a number, not text then set the maxpapers to the number.
        if (Int32.TryParse(max_papers.Text, out maxPapers))
        {
            maxPapers = Int32.Parse(max_papers.Text);
        }
        //if not, set it to 100 and change the display text.
        else
        {
            max_papers.Text   = "100";
            StatusLabel.Text += "Max Paper input was invalid, default is set to 100.";
        }
        //no more than 1000 papers allowed
        if (maxPapers > 1000)
        {
            maxPapers = 1000;
        }
        //conference name is required
        if (con_name.Text.Equals(""))
        {
            StatusLabel.Text += "Conference Add Failed: Conference name is blank";
        }
        //conference description is required.
        else if (con_desc.Text.Equals(""))
        {
            StatusLabel.Text += "Conference Add Failed: Conference description is blank";
        }
        //if all details are filled out
        else
        {
            Conference conf = new Conference();
            try
            {
                //add the conference given the input
                conf.createConference(con_name.Text, con_desc.Text, maxPapers, storedPath, updateDateTime());

                //reset the input fields to blank or default.
                StatusLabel.Text        = "Conference Add Successful!";
                con_desc.Text           = "";
                max_papers.Text         = "";
                con_name.Text           = "";
                selected_date.Text      = "";
                datepicker.SelectedDate = DateTime.MinValue;
                time_selector.Hour      = 08;
                time_selector.Minute    = 00;
                time_selector.AmPm      = MKB.TimePicker.TimeSelector.AmPmSpec.AM;
            }
            catch
            {
                //if the conference isn't added, display this error.
                selected_date.Text += "Conference Add Failed: Database Add Failed";
            }
        }
    }
Пример #47
0
 public override void ExitConference(Conference conference)
 {
     conftitle = String.Empty;
     confshort = String.Empty;
 }
Пример #48
0
        private void OnDuplicateIdentityDetected(object conference, Conference.DuplicateIdentityDetectedEventArgs ea)
        {
            btnLeaveConference.PerformClick();

            MessageBox.Show(this, string.Format("You exited the venue because a participant with " +
                "your same name joined the venue from a different IP address - {0}, {1}",
                ea.IPAddresses[0].ToString(), ea.IPAddresses[1].ToString()));
        }
 static void Main(string[] args)
 {
     Conference conf = new Conference();
     conf.Schedule(Helper.GetInputData());
     Console.Write(conf.getSchedule());
 }
        //add a Conference by the organizer
        //public void Add(Conference conference)
        //{
        //    _db.Conferences.Add(conference);
        //}

        public void AddConference(Conference conference)
        {
            _db.Conferences.Add(conference);
        }
Пример #51
-1
        private void SetupCall()
        {
            Signalling Signalling = new Signalling(Constants.WEB_SYNC_SERVER);
            Signalling.Start((error) =>
            {
                if (error != null)
                {
                    // TODO: Handle Errors
                }
            });

            LocalMedia = new LocalMedia();
            LocalMedia.Start(Container, (error) =>
            {
                if (error != null)
                {
                    //TODO: Handle Errors
                }
            });

            var audioStream = new AudioStream(LocalMedia.LocalMediaStream);
            var videoStream = new VideoStream(LocalMedia.LocalMediaStream);
            var conference = new Conference(Constants.ICE_LINK_ADDRESS, new Stream[]
                    {
                        audioStream,
                        videoStream
                    });
            conference.RelayUsername = "******";
            conference.RelayPassword = "******";

            Signalling.Attach(conference, Constants.SESSION_ID, (error) =>
            {
                if (error != null)
                {
                    // TODO: Handle Errors
                }
            });
        }