public static IEnumerable<Person> personsOfDiscussion(Discussion d) { var q = from p in DbCtx.Get().Person where p.Topic.Any(t0 => t0.Discussion.Id == d.Id) select p; return q; }
public ReportParameters(List<int> requiredUsers, Session session, Topic topic, Discussion discussion) { this.requiredUsers = requiredUsers; this.sessionTopicUsers = topic.Person.Select(pers => pers.Id).Intersect(requiredUsers); this.session = session; this.topic = topic; this.discussion = discussion; }
public static GeneralSide NewGenSide(Person p, Discussion d, int side) { var res = new GeneralSide(); res.Person = p; res.Discussion = d; res.Side = side; return res; }
/// <summary> /// Default constructor. /// </summary> public DiscussionInfoZoom(Discussion d) { InitializeComponent(); // Add handlers for window availability events AddWindowAvailabilityHandlers(); DataContext = d; bg.ToViewMode(); bg.SetCanReorderItems(false); }
public TopicSelectionDlg(Discussion d) { InitializeComponent(); AddWindowAvailabilityHandlers(); this.WindowState = WindowState.Normal; lstTopics.ItemsSource = d.Topic; lstFormat.Items.Add("Export to HTML"); lstFormat.Items.Add("Export to PDF"); lstFormat.SelectedIndex = 0; }
/// <summary> /// Default constructor. /// </summary> public ResultViewer(Discussion discussion, Main.OnDiscFrmClosing closing) { InitializeComponent(); // Add handlers for window availability events AddWindowAvailabilityHandlers(); _closing = closing; this.discussion = discussion; this.DataContext = discussion; List<ArgPoint> agreed = new List<ArgPoint>(); List<ArgPoint> disagreed = new List<ArgPoint>(); List<ArgPoint> unsolved = new List<ArgPoint>(); lstBxAgreement.ItemsSource = agreed; lstBxDisagreement.ItemsSource = disagreed; lstBxUnsolved.ItemsSource = unsolved; }
public PersonDiscConfigWnd(Discussion d, Person p) { InitializeComponent(); this.WindowState = WindowState.Normal; this.Width = 336; personSelector.onSelected += onPersonSelected; _d = d; person = p; lblDiscussion.Content = "Discussion: " + d.Subject; int currentSide = DaoUtils.GetGeneralSide(p, d); if (currentSide != -1) selector1.SelectedSide = currentSide; else selector1.SelectedSide = (int) SideCode.Neutral; personSelector.Set(PublicBoardCtx.Get().Person, "Name"); }
public HtmlEditWnd(Discussion d, Action close) { InitializeComponent(); _close += close; _d = d; if (d.HtmlBackground == null) { var htmlTemplatePathName = System.IO.Path.Combine( System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DiscussionHTMLPage.html"); plainHtml.Text = System.IO.File.ReadAllText(htmlTemplatePathName); } else { plainHtml.Text = d.HtmlBackground; } UpdateWebView(); }
/// <summary> /// Create a new Discussion object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="subject">Initial value of the Subject property.</param> public static Discussion CreateDiscussion(global::System.Int32 id, global::System.String subject) { Discussion discussion = new Discussion(); discussion.Id = id; discussion.Subject = subject; return discussion; }
private void DiscussionChanged(object selected) { _discussion = selected as Discussion; }
public static string getDiscussionBackgroundUrl(Discussion d) { return string.Format("http://{0}/discsvc/bgpage?id={1}", ConfigManager.ServiceServer, d.Id); }
private static string SessionStr(Session s, Discussion d) { var tsConv = new TimeslotConverter(); return s.Name + " (" + s.EstimatedDateTime.ToString("D") + " " + (string) tsConv.Convert(s.EstimatedTimeSlot, null, null, null) + "), " + d.Subject; }
public PublicCenter(UISharedRTClient sharedClient, Main.OnDiscFrmClosing closing, int screenshotTopicId, int screenshotDiscussionId) { this._discussion = SessionInfo.Get().discussion; _sharedClient = sharedClient; _closing = closing; _topicId = screenshotTopicId; _discussionId = screenshotDiscussionId; InitializeComponent(); if (CurrentTopic != null) ExplanationModeMediator.Inst.CurrentTopicId = CurrentTopic.Id; else ExplanationModeMediator.Inst.CurrentTopicId = null; topicNavPanel.topicChanged += topicSelectionChanged; topicNavPanel.discussion = SessionInfo.Get().discussion; topicNavPanel.topicAnimate += TopicAnimate; btnExplanationMode.DataContext = ExplanationModeMediator.Inst; btnLaserPointer.DataContext = ExplanationModeMediator.Inst; localAccount.DataContext = SessionInfo.Get().person; _botsViewModel = new BotsViewModel(this); //btnEnlargeOpenCommentClose.DataContext = _botsViewModel; //btnEnlargeOpenAttachmentClose.DataContext = _botsViewModel; //btnSuperBotEnabled.DataContext = _botsViewModel; //btnEnlargeOpenSourceClose.DataContext = _botsViewModel; btnDEditorBotEnabled.DataContext = _botsViewModel; avaBar.Init(_sharedClient); avaBar.paletteOwnerChanged += PaletteOwnerChanged; SetListeners(_sharedClient, true); _zoomSeries = new ZoomSeriesAnalyser(OnSeriesEnd); TouchVisualizer.SetShowsVisualizations(laserScene, false); if (SessionInfo.Get().person.Name.StartsWith(DaoUtils.MODER_SUBNAME)) { startStopWatch(); } // scene.Height = 0.6 * System.Windows.SystemParameters.PrimaryScreenHeight; // inkCanv.Height = scene.Height; //var scaleTr = Matrix.Identity; //scaleTr.Translate(0, -scene.Height / 2); //scaleTr.ScaleAt(2,2, // 0.5, // 0.5); //SetWorkingAreaTransform(scaleTr, false, false, false, false); }
private void ForgetDBDiscussionState() { //forget cached state PublicBoardCtx.DropContext(); _discussion = SessionInfo.Get().discussion; DataContext = this; }
private void ParticipantChanged(object selected) { _discussion = null; _person = selected as Person; //enum all discussions of the person DiscCtx ctx = PublicBoardCtx.Get(); IQueryable<Discussion> lookup = (from t in ctx.Topic where t.Person.Any(p0 => p0.Id == _person.Id) select t.Discussion).Distinct(); discSelector.Set(lookup, "Subject"); discSelector.IsEnabled = true; }
/// <summary> /// Deprecated Method for adding a new object to the Discussion EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToDiscussion(Discussion discussion) { base.AddObject("Discussion", discussion); }
public static bool DiscussionExists(Discussion disc) { return PublicBoardCtx.Get().Discussion.FirstOrDefault(d => d.Id == disc.Id) != null; }
public static IEnumerable<ArgPoint> ArgPointsOf(Person pers, Discussion d, Topic t) { return pers.ArgPoint.Where(ap => ap.Topic != null && ap.Topic.Id == t.Id); }
private void UpdateTopicsOfDiscussion(Discussion d) { TopicsOfDiscussion.Clear(); if (d == null) return; int selfId = SessionInfo.Get().person.Id; var topicsOfDiscussion = d.Topic; foreach (Topic t in topicsOfDiscussion) { if (t.Person.Any(p0 => p0.Id == selfId)) TopicsOfDiscussion.Add(t); } if (TopicsOfDiscussion.Count > 0) lstTopics.SelectedIndex = 0; }
private void btnAddDiscussion_Click(object sender, RoutedEventArgs e) { var newDisc = new Discussion(); newDisc.Subject = txtBxDiscussion.Text; newDisc.Background = new RichText(); newDisc.Background.Text = ""; EditedDiscussion = newDisc; PublicBoardCtx.Get().AddToDiscussion(EditedDiscussion); PublicBoardCtx.Get().SaveChanges(); discussionSelector.Set(PublicBoardCtx.Get().Discussion, "Subject"); discussionSelector.Select(EditedDiscussion); }