private void attach_ChannelViews(ChannelView entity) { this.SendPropertyChanging(); entity.Clan = this; }
private void detach_ChannelViews(ChannelView entity) { this.SendPropertyChanging(); entity.Clan = null; }
partial void DeleteChannelView(ChannelView instance);
partial void UpdateChannelView(ChannelView instance);
partial void InsertChannelView(ChannelView instance);
private void HandleUser(object sender, UserEventArgs e) { Product p = e.User.Stats.Product; if (p == Product.Warcraft3Retail || p == Product.Warcraft3Expansion) { // check to see if the user has a clan Warcraft3Stats w3s = e.User.Stats as Warcraft3Stats; string tag = w3s.ClanTag; NoteTag(tag, e.User, m_client.Client.ChannelName, e.EventType); } if (e.User.Username == m_client.Client.UniqueUsername) { if (m_nextClanID != 0) { using (var dc = ClansDataContext.Create(m_dbPath)) { var view = new ChannelView { ClanID = m_nextClanID, AllowedView = true, When = DateTime.Now, UserCount = m_client.Client.Channel.Count, UserList = FormatChannel(m_client.Client.Channel) }; dc.ChannelViews.InsertOnSubmit(view); try { dc.SubmitChanges(); } catch (Exception ex) { m_client.MainWindow.AddChat(new ChatNode[] { new ChatNode("JinxBot Clan Gnome error ", Color.DarkRed), new ChatNode("Error saving a clan visit:", Color.Red), ChatNode.NewLine, new ChatNode(ex.ToString(), Color.OrangeRed) }); } } } } }
private void HandleChannelError(object sender, ServerChatEventArgs e) { if (m_nextClanID != 0) { using (var dc = ClansDataContext.Create(m_dbPath)) { var view = new ChannelView { ClanID = m_nextClanID, AllowedView = false, When = DateTime.Now, UserCount = 0, UserList = "" }; dc.ChannelViews.InsertOnSubmit(view); try { dc.SubmitChanges(); } catch (Exception ex) { m_client.MainWindow.AddChat(new ChatNode[] { new ChatNode("JinxBot Clan Gnome error ", Color.DarkRed), new ChatNode("Error saving a new clan:", Color.Red), ChatNode.NewLine, new ChatNode(ex.ToString(), Color.OrangeRed) }); } } } }