public DlgClanProfile(FrmMain mainForm) : base(mainForm) { this.components = null; this.ClanNameLookup = new Dictionary<string, ClanView>(); this.PlayerNameLookup = new Dictionary<string, ClanView>(); this.mCurrentClan = null; this.mViewList = new LinkedList<ClanView>(); this.mSelectedParticipantView = null; this.RankContainerLookup = new Dictionary<string, TextContainer>(); this.RankContainers = new BoundContainerList(); this.mDescriptionModified = false; this.InitializeComponent(); }
private void InitChatContainers() { this.ChatContainerLookup = new Dictionary<string, TextContainer<StatusTextLine>>(7); this.ChatContainers = new BoundContainerList<StatusTextLine>(); this.ChatContainerLookup["Admin"] = new TextContainer<StatusTextLine>(Loc.Get("<LOC>Admin")); this.ChatContainers.Add(this.ChatContainerLookup["Admin"]); this.ChatContainerLookup["Speaking"] = new TextContainer<StatusTextLine>(Loc.Get("<LOC>Speaking")); this.ChatContainers.Add(this.ChatContainerLookup["Speaking"]); this.ChatContainerLookup["Clan"] = new TextContainer<StatusTextLine>(Loc.Get("<LOC>Clan")); this.ChatContainers.Add(this.ChatContainerLookup["Clan"]); this.ChatContainerLookup["Friend"] = new TextContainer<StatusTextLine>(Loc.Get("<LOC>Friend")); this.ChatContainers.Add(this.ChatContainerLookup["Friend"]); this.ChatContainerLookup["Online"] = new TextContainer<StatusTextLine>(Loc.Get("<LOC>Online")); this.ChatContainers.Add(this.ChatContainerLookup["Online"]); this.ChatContainerLookup["Away"] = new TextContainer<StatusTextLine>(Loc.Get("<LOC>Away")); this.ChatContainers.Add(this.ChatContainerLookup["Away"]); }
public FrmMain() { WaitCallback callBack = null; MessageEventHandler handler = null; EventHandler handler2 = null; EventHandler handler3 = null; this.components = null; this.WebURL = null; this.IsGPGNetPatching = true; this.mNotFound = ""; this.IsLatestVer = false; this.mPatchFileName = ""; this.mServerGameVersion = null; this.mLastSelectedGame = null; this.mIsSupComVersionEnforced = null; this.mIsSupComPatching = false; this.DlgUpdate = null; this.SupComPatchThread = null; this.FriendsLoaded = false; this.FriendContainers = new BoundContainerList(); this.FriendContainerLookup = new Dictionary<string, TextContainer>(); this.ActiveDialogRequests = new List<string>(); this.FriendRequests = new MappedObjectList<FriendRequest>(); this.AwaitingLogin = true; this.ContinueLoading = null; this.LadderViews = new Dictionary<int, FrmLadderView>(); this.mGameMenuItems = new List<ToolStripMenuItem>(); this.mLastMoveItem = null; this.mConfigSleepRate = 0x493e0; this.mFirstConfig = true; this.mLastMOTD = ""; this.mLastProcessList = ""; this.mConfigThread = null; this.mConnected = true; this.mShuttingDown = false; this.CancelFade = false; this.HasFadeStarted = false; this.IsFading = false; this.TargetFade = 0.0; this.FadeIncrement = 0.0; this.StayActive = false; this.mIsActiveWindow = false; this.mWelcomePage = null; this.mRanInitializeChat = false; this.mHeightDiff = 0; this.mWidthDiff = 0; this.mLastX = 0; this.mLastY = 0; this.mLastMouseX = 0; this.mLastMouseY = 0; this.mLastWidth = 0; this.mLastHeight = 0; this.mIsMoving = false; this.mIsResizing = false; this.mStartResizing = false; this.RESIZE_RECT = 40; this.mResizeRect = new Rectangle(); this.FirstPaint = true; this.mIsMaximized = false; this.mRestore = new Rectangle(0, 0, 100, 100); this.MinimizeLoc = new Point(-32000, -32000); this.MinimizeSize = new Size(640, 500); this.StatusTimer = null; this.mActiveDialogs = new List<DlgBase>(); this.mActiveWindow = null; this.DlgAbout = null; this.DlgOptions = null; this.DlgUserFeedback = null; this.FrmStatsLadders = new List<FrmStatsLadder>(); this.DlgGameKeys = null; this.DlgEmotes = null; this.DlgSelectChannel = null; this.DlgKeywordSearch = null; this.DlgSearchResults = null; this.DlgSolution = null; this.DlgSearchReplays = null; this.DlgTeamGame = null; this.DlgSelectGame = null; this.DlgActiveEfforts = null; this.DlgContentManager = null; this.mSearchingForAutomatch = false; this.mLastStatus = ""; this.mCalcGridHeight = false; this.ToolstripSizeChanged = false; this.mCustomPaint = new List<ToolStripItem>(); this.mLastCheckTime = DateTime.Now; this.mDlgWorldMap = null; this.mSelectedTab = null; this.mGameLinkClickTime = DateTime.Now; this.ChatRowPoints = new Dictionary<int, Rectangle>(); this.ChatRowHeights = new Dictionary<int, int>(); this.mFirstChatDraw = true; this.SelectedEmote = null; this.LastTick = 0; this.Divider = 1; this.CurrentFrame = 1; this.EmoteCount = 0; this.CountEmotes = true; this.PaintPending = false; this.mSelectedParticipantView = null; this.UIQueue = new ThreadQueue(true); this.IsSortingChatroom = false; this.IsSynchronizingChatroom = false; this.ChatSyncTimer = null; this._AddUser = null; this._UpdateUser = null; this._RemoveUser = null; this.mSelectedChatParticipant = null; this.ChatContainerLookup = new Dictionary<string, TextContainer<StatusTextLine>>(); this.ChatContainers = new BoundContainerList<StatusTextLine>(); this.RefreshData = false; this.BetweenChannels = false; this.mMainChatrom = ""; this.ChatroomQueue = new ThreadQueue(true); this.mLastChatTimes = Hashtable.Synchronized(new Hashtable()); this.mLastChatContent = Hashtable.Synchronized(new Hashtable()); this.mChatLines = new BindingList<ChatLine>(); this.PlayerChatEffects = new Dictionary<string, ChatEffectBase>(); this.mSpeakingTimers = new Dictionary<string, StateTimer>(); this.AwayTimer = new StateTimer(); this.SelfLeaveTimer = new StateTimer(); this.LastAction = DateTime.Now; this.mChatHistory = new LinkedList<string>(); this.HistoryIndex = -1; this.SelectingTextList = false; this.PMTargets = new List<string>(); this.mPrivateChats = new Dictionary<string, FrmPrivateChat>(); this.PlayerProfileForm = null; this.ClanLoaded = false; this.ClanContainers = new BoundContainerList(); this.ClanContainerLookup = new Dictionary<string, TextContainer>(); this.ClanRequests = null; this.ClanInvites = null; this.ClanProfileForm = null; this.mBeforeGameChatroom = ""; this.mIsInGame = false; this.StatusButtonRankedGameCancel = new SkinStatusButton(); this.mGameName = ""; this.mGameURL = ""; this.mHostName = ""; this.mSupcomGameManager = null; this.mPassword = ""; this.mFirstRankedSupcomGame = true; this.PlayNowMatch = false; this.mAutoStatus = Loc.Get("<LOC>Searching for game "); this.LastGameChallenges = new Dictionary<int, bool>(); this.LadderInvitePending = false; this.mCanDirectChallenge = true; this.mDirectChallengePlayer = ""; this.AllowDirectChallenge = true; this.BeforeTeamGameChatroom = null; this.mTeamAutomatchExit = false; this.InviteAccepted = false; this.InvitePending = false; this.PendingJoinFrom = null; ThreadID = Thread.CurrentThread.ManagedThreadId; if (new DlgLogin().ShowDialog() == DialogResult.OK) { if (callBack == null) { callBack = delegate (object p) { GameInformation.LoadGamesFromDB(); new QuazalQuery("RemoveSpaceSiegeGame", new object[0]).ExecuteNonQuery(); ConfigSettings.LoadSettings(DataAccess.GetQueryData("GetAllConfigs", new object[0])); try { DataList queryData = null; queryData = DataAccess.GetQueryData("GetTOSPrompt", new object[0]); if ((queryData != null) && (queryData.Count < 1)) { DataAccess.ExecuteQuery("CreatePlayerInfo", new object[0]); queryData = DataAccess.GetQueryData("GetTOSPrompt", new object[0]); } if ((queryData != null) && (queryData.Count > 0)) { if (Convert.ToInt32(queryData[0]["term_of_service_prompt"]) > 0) { if (new DlgTermsOfService(this, queryData[0]["url"]).ShowDialog() == DialogResult.OK) { ThreadQueue.Quazal.Enqueue((VGen0)delegate { DataAccess.ExecuteQuery("SetTOSPrompt", new object[] { 0 }); }, new object[0]); this.ContinueLoading = true; } else { this.ContinueLoading = false; } } else { this.ContinueLoading = true; } } else { AuditLog.WriteLine("Unable to find Terms of Service agreement.", new object[0]); this.ContinueLoading = true; } } catch (Exception exception) { ErrorLog.WriteLine(exception); this.ContinueLoading = false; } }; } ThreadQueue.QueueUserWorkItem(callBack, new object[0]); while (!this.ContinueLoading.HasValue) { Thread.Sleep(100); } if (this.ContinueLoading.Value) { if (ConfigSettings.GetBool("DoOldGameList", false)) { if (((User.Current.IsAdmin || (GameInformation.SelectedGame.GameID == -1)) || (GameKey.BetaKeys.Count > 0)) || ((GameKey.BetaKeys.Count < 1) && (new DlgNoBetaKey(this).ShowDialog() == DialogResult.OK))) { this.AwaitingLogin = false; } else { User.Logout(); this.ContinueLoading = false; this.AwaitingLogin = false; } } else if (((User.Current.IsAdmin || (GameInformation.SelectedGame.GameID == -1)) || (GameInformation.SelectedGame.CDKey != "")) || (new DlgNoBetaKey(this).ShowDialog() == DialogResult.OK)) { this.AwaitingLogin = false; } else { User.Logout(); this.ContinueLoading = false; this.AwaitingLogin = false; } } else { Application.Exit(); this.AwaitingLogin = false; } } else { this.AwaitingLogin = false; if (OnCancelLoad != null) { OnCancelLoad(this, EventArgs.Empty); } } if (((User.Current == null) || base.Disposing) || base.IsDisposed) { if (OnCancelLoad != null) { OnCancelLoad(this, EventArgs.Empty); } base.Close(); } else if (!(!this.ContinueLoading.HasValue ? false : this.ContinueLoading.Value)) { if (OnCancelLoad != null) { OnCancelLoad(this, EventArgs.Empty); } base.Close(); } else { Exception exception; this.InitializeComponent(); this.InitializePlugins(); this.SetToolTips(); this.gpgChatGrid.IsCheckingExpand = false; DlgMessage.RegistermainForm(this); DlgSupcomTeamSelection.sFrmMain = this; if (this.GatheringDisplaycontrol is SkinGatheringDisplay) { (this.GatheringDisplaycontrol as SkinGatheringDisplay).MainForm = this; } this.ResetLobby(); base.ShowInTaskbar = false; IntPtr handle = base.Handle; this.DoubleBuffered = true; this.SetSkin(Program.Settings.SkinName); this.StyleApplication(this, null); this.StyleChatroom(this, null); base.FormBorderStyle = FormBorderStyle.Sizable; User.LoggedOut += new EventHandler(this.LogoutLobby); this.SetRegion(); this.PopulateLadderMenuItems(); this.InitStatusDropdown(); this.ChatFiltersChanged(); this.SetLogo(this); this.ciChat_TeamInvite.DrawItem += new DrawItemEventHandler(this.miArrangedTeamsPopup_DrawItem); this.skinDropDownStatus.Enabled = false; this.textBoxMsg.Properties.MaxLength = 300; this.GatheringDisplaycontrol.Popup += new EventHandler(this.comboBoxGatherings_Popup); this.CheckControl(this); Messaging.NetDataRecieved += new NetDataEventHandler(FrmMain.Messaging_NetDataRecieved); Messaging.MessageRecieved += new MessageEventHandler(this.Messaging_MessageRecieved); Messaging.CommandRecieved += new MessageEventHandler(this.Messaging_CommandRecieved); if (handler == null) { handler = delegate (MessageEventArgs e) { this.ParseCustomCommand(e.Command, e.CommandArgs); }; } Messaging.CustomCommandRecieved += handler; if (handler2 == null) { handler2 = delegate (object s, EventArgs e) { base.Invalidate(false); }; } base.SizeChanged += handler2; if (handler3 == null) { handler3 = delegate (object s, EventArgs e) { if (this.ActiveWindow != null) { this.ActiveWindow = null; } }; } base.Activated += handler3; base.MouseDown += new MouseEventHandler(this.this_MouseDown); this.pbTop.MouseDown += new MouseEventHandler(this.this_MouseDown); this.pbTopLeft.MouseDown += new MouseEventHandler(this.this_MouseDown); this.pbTopRight.MouseDown += new MouseEventHandler(this.this_MouseDown); this.pbBottomRight.MouseDown += new MouseEventHandler(this.this_MouseDown); base.MouseUp += new MouseEventHandler(this.this_MouseUp); this.pbTop.MouseUp += new MouseEventHandler(this.this_MouseUp); this.pbTopLeft.MouseUp += new MouseEventHandler(this.this_MouseUp); this.pbTopRight.MouseUp += new MouseEventHandler(this.this_MouseUp); this.gvChat.RowSeparatorHeight = Program.Settings.Chat.Appearance.ChatLineSpacing; this.BindToSettings(); this.PreLoadChat(); while (this.AwaitingLogin && (!base.Disposing && !base.IsDisposed)) { Thread.Sleep(100); } ThreadQueue.Quazal.Enqueue(typeof(DataAccess), "GetQueryData", this, "OnGetConfigs", new object[] { "GetAllConfigs" }); ThreadQueue.Quazal.Enqueue(typeof(DataAccess), "GetQueryData", this, "AddMenuItems", new object[] { "GetMenuItems" }); try { ThreadQueue.QueueUserWorkItem(delegate (object state) { DataAccess.ExecuteQuery("SetIP2", new object[] { User.HashPassword(DlgLogin.LastPass) }); DlgLogin.LastPass = ""; }, new object[0]); } catch (Exception exception1) { exception = exception1; ErrorLog.WriteLine(exception); } ThreadQueue.QueueUserWorkItem(delegate (object state) { DataAccess.ExecuteQuery("AcceptAllLadderChallenges", new object[] { User.Current.ID }); }, new object[0]); if (User.Current.IsAdmin) { this.miTranslate.Visible = true; } if (AccessControlList.HasAccessTo("PatchAdmins")) { this.miTools_LocPatches.Visible = true; this.miTools_LocPatches.Enabled = true; } if (AccessControlList.HasAccessTo("PrizeWinners")) { this.miGame_RedeemPrize.Visible = true; this.miGame_RedeemPrize.Enabled = true; } try { this.CreateGameList(); this.RefreshGameList(); } catch (Exception exception2) { exception = exception2; } } }
private void FrmMain_Friends() { ThreadQueue.Quazal.Enqueue((OGen0)delegate { this.FriendRequests = DataAccess.GetObjects<FriendRequest>("GetFriendRequests", new object[0]); return null; }, (VGen1)delegate (object o) { this.RefreshFriendInvites(); }, new object[0]); ThreadQueue.QueueUserWorkItem(delegate (object none) { MappedObjectList<User> friends = DataAccess.GetObjects<User>("GetFriendsByPlayerID", new object[] { User.Current.ID }); User.CurrentFriends = friends; if (!(!this.ClanLoaded || this.FriendsLoaded)) { this.NotifyOnLogin(); } this.FriendsLoaded = true; ThreadPool.QueueUserWorkItem(delegate (object state) { bool flag = false; foreach (User user in friends) { User user2; if (this.FriendRequests.ContainsIndex("name", user.Name)) { flag = true; this.FriendRequests.RemoveByIndex("name", user.Name); ThreadQueue.Quazal.Enqueue((VGen1)delegate (object o) { DataAccess.ExecuteQuery("RemoveFriendRequest", new object[] { o }); }, new object[] { user.ID }); } if (Chatroom.GatheringParticipants.TryFindByIndex("name", user.Name, out user2) && !user2.IsFriend) { user2.IsFriend = true; this.UpdateUser(user2); } user.IsFriend = true; } this.pnlUserListFriends.AddUsers(friends, false); if (flag) { this.RefreshFriendInvites(); } }); base.Invoke((VGen0)delegate { VGen0 method = null; VGen0 gen2 = null; if (friends.Count > 0) { this.FriendContainers = new BoundContainerList(); this.FriendContainerLookup = new Dictionary<string, TextContainer>(); this.FriendContainers.Clear(); this.FriendContainerLookup.Clear(); this.FriendContainerLookup["Online"] = new TextContainer(Loc.Get("<LOC>Friends Online")); this.FriendContainerLookup["Online"].AutoSort = false; this.FriendContainers.Add(this.FriendContainerLookup["Online"]); this.FriendContainerLookup["Offline"] = new TextContainer(Loc.Get("<LOC>Friends Offline")); this.FriendContainerLookup["Offline"].AutoSort = false; this.FriendContainers.Add(this.FriendContainerLookup["Offline"]); if ((this.InvokeRequired && !this.Disposing) && !this.IsDisposed) { if (method == null) { method = delegate { this.pnlUserListFriends.Visible = true; this.gpgLabelNoFriends.Visible = false; }; } this.BeginInvoke(method); } else { this.pnlUserListFriends.Visible = true; this.gpgLabelNoFriends.Visible = false; } foreach (FrmPrivateChat chat in this.PrivateChats.Values) { if (!(chat.Disposing || chat.IsDisposed)) { chat.ChatTarget.IsFriend = friends.ContainsIndex("name", chat.ChatTarget.Name); chat.RefreshToolstrip(); } } } else { if ((this.InvokeRequired && !this.Disposing) && !this.IsDisposed) { if (gen2 == null) { gen2 = delegate { this.pnlUserListFriends.Visible = false; this.gpgLabelNoFriends.Visible = true; }; } this.BeginInvoke(gen2); } else { this.pnlUserListFriends.Visible = false; this.gpgLabelNoFriends.Visible = true; } foreach (FrmPrivateChat chat in this.PrivateChats.Values) { if (!(chat.Disposing || chat.IsDisposed)) { chat.ChatTarget.IsFriend = false; chat.RefreshToolstrip(); } } } }); }, new object[0]); }
public DlgPlayerProfile(FrmMain mainform) : base(mainform) { this.components = null; this.mCurrentStats = null; this.mViewList = new LinkedList<PlayerView>(); this.PlayerViewLookups = new Dictionary<string, PlayerView>(); this.FriendContainers = new BoundContainerList(); this.FriendContainerLookup = new Dictionary<string, TextContainer>(); this.mSelectedParticipantView = null; this.mDescriptionModified = false; this.InitializeComponent(); this.gvFriend_Member.CustomDrawCell += new RowCellCustomDrawEventHandler(this.gvFriend_Member_CustomDrawCell); this.gvFriend_Member.MouseDown += new MouseEventHandler(this.SetCurrentGridView); this.gvFriend_Member.MouseUp += new MouseEventHandler(this.ChatGridMouseDown); this.gvFriend_Member.DoubleClick += new EventHandler(this.gvFriend_Member_DoubleClick); }
internal void Construct() { if (!this.ViewList.Contains(this.CurrentPlayer)) { this.ViewList.AddLast(new LinkedListNode<PlayerView>(this.CurrentPlayer)); } this.skinButtonNext.Visible = !this.ViewList.Last.Value.Equals(this.CurrentPlayer); this.skinButtonLast.Visible = !this.ViewList.First.Value.Equals(this.CurrentPlayer); User player = this.CurrentPlayer.Player; MappedObjectList<User> friends = this.CurrentPlayer.Friends; this.Text = string.Format(Loc.Get("<LOC>Profile: {0}"), player.Name); this.Refresh(); this.gpgLabelName.Text = player.Name; this.pictureBoxPlayerIcon.Image = player.PlayerIcon; if (this.pictureBoxPlayerIcon.Image == null) { this.pictureBoxPlayerIcon.Visible = false; } if (((player.Description == null) || (player.Description == "")) || (player.Description == "(null)")) { this.gpgLabelDescription.Text = Loc.Get("<LOC>(no description)"); this.gpgTextAreaDescription.Text = ""; } else { this.gpgLabelDescription.Text = player.Description; this.gpgTextAreaDescription.Text = player.Description; } this.ResizeDescriptionText(); using (Graphics graphics = base.CreateGraphics()) { this.gpgLabelDescription.Height = Convert.ToInt32(DrawUtil.MeasureString(graphics, this.gpgLabelDescription.Text, this.gpgLabelDescription.Font, (float) this.gpgLabelDescription.Width).Height) + 10; } if (player.Equals(User.Current)) { this.skinButtonEdit.Visible = true; this.gpgPanelEdit.Visible = true; this.gpgPanelEdit.Height -= this.gpgTextAreaDescription.Height; this.gpgPanelEdit.Panel2Collapsed = true; } else { this.skinButtonEdit.Visible = false; this.gpgPanelEdit.Visible = false; } int num = 4; if (player.IsInClan) { this.pictureBoxClanIcon.Visible = true; this.pictureBoxClanRank.Visible = true; this.gpgLinkLabelClan.Visible = true; this.gpgLinkLabelClan.Text = player.ClanAbbreviation; this.gpgLinkLabelClan.Location = new Point(this.gpgLabelName.TextWidth + 6, this.gpgLabelName.Top); this.gpgLinkLabelClan.Width = this.gpgLinkLabelClan.TextWidth + 4; this.gpgLinkLabelClan.BringToFront(); this.gpgLinkLabelClan.ForeColor = Program.Settings.Chat.Appearance.ClanColor; string imageSource = ClanRanking.FindBySeniority(player.Rank).ImageSource; object obj2 = ClanImages.ResourceManager.GetObject(imageSource); this.pictureBoxClanRank.Image = obj2 as Image; this.pictureBoxClanIcon.Visible = false; if (this.pictureBoxPlayerIcon.Image != null) { this.pictureBoxPlayerIcon.Left = ((this.gpgLinkLabelClan.Width - this.pictureBoxClanRank.Width) - num) - this.pictureBoxPlayerIcon.Width; } this.gpgLinkLabelClan.Refresh(); } else { this.pictureBoxClanIcon.Visible = false; this.pictureBoxClanRank.Visible = false; this.gpgLinkLabelClan.Visible = false; this.pictureBoxPlayerIcon.Left = this.gpgLinkLabelClan.Width - this.pictureBoxPlayerIcon.Width; } if (friends.Count > 0) { this.gvFriend_Member.DetailHeight = 0x1f40; this.gpgScrollPanelFriends.Visible = true; this.FriendContainers = new BoundContainerList(); this.FriendContainerLookup = new Dictionary<string, TextContainer>(); this.gvFriend_Container.Columns["Count"].FilterInfo = new ColumnFilterInfo("[Count] > 0"); this.gpgScrollPanelFriends.ChildControl = this.gpgGridFriends; this.FriendContainerLookup["Online"] = new TextContainer(Loc.Get("<LOC>Friends Online")); this.FriendContainers.Add(this.FriendContainerLookup["Online"]); this.FriendContainerLookup["Offline"] = new TextContainer(Loc.Get("<LOC>Friends Offline")); this.FriendContainers.Add(this.FriendContainerLookup["Offline"]); foreach (User user2 in friends) { this.AddFriendParticipant(user2); } this.FriendContainerLookup["Online"].Sort(); this.FriendContainerLookup["Offline"].Sort(); this.gpgGridFriends.DataSource = null; this.gpgGridFriends.DataSource = this.FriendContainers; } else { this.backLabelFriends.Text = Loc.Get("<LOC>0 Friends Found"); this.gpgScrollPanelFriends.Visible = false; } this.mCurrentStats = this.CurrentPlayer.Player.Rating_1v1; this.LoadStats(); }
internal void Construct() { if (!this.ViewList.Contains(this.CurrentClan)) { this.ViewList.AddLast(this.CurrentClan); } this.skinButtonLast.Visible = !this.ViewList.First.Value.Equals(this.CurrentClan); this.skinButtonNext.Visible = !this.ViewList.Last.Value.Equals(this.CurrentClan); this.gpgLabelError.ForeColor = Program.Settings.Chat.Appearance.ErrorColor; Clan clan = this.CurrentClan.Clan; MappedObjectList<ClanMember> members = this.CurrentClan.Members; this.pnlUserListClan.ClanMembers = members; this.RankContainerLookup = new Dictionary<string, TextContainer>(); this.RankContainers = new BoundContainerList(); this.backLabelTitle.Text = clan.Name; this.backLabelTitle.ForeColor = Program.Settings.Chat.Appearance.ClanColor; this.gpgLabelFounded.Text = string.Format(Loc.Get("<LOC>Founded {0}"), clan.CreateDate.ToLongDateString()); this.gpgLabelFounded.ForeColor = Color.Yellow; this.Text = string.Format(Loc.Get("<LOC>Clan Profile: {0}"), clan); this.gpgLabelDescription.Visible = false; this.gpgLabelDescription.Text = clan.Description; this.gpgLabelDescription.Visible = true; this.gpgTextAreaDescription.Text = clan.Description; this.gpgTextAreaDescription.Visible = false; using (Graphics graphics = base.CreateGraphics()) { if ((this.gpgLabelDescription.Text != null) && (this.gpgLabelDescription.Text.Length > 0)) { this.gpgLabelDescription.Height = Convert.ToInt32(DrawUtil.MeasureString(graphics, this.gpgLabelDescription.Text, this.gpgLabelDescription.Font, (float) this.gpgLabelDescription.Width).Height) + 6; } else { this.gpgLabelDescription.Height = 0x23; } } if ((((ClanMember.Current != null) && (Clan.Current != null)) && Clan.Current.Equals(clan)) && ClanMember.Current.HasAbility(ClanAbility.ChangeProfile)) { this.gpgPanelEdit.Visible = true; this.skinButtonEdit.Visible = true; this.skinButtonEdit.Enabled = true; } else { this.gpgPanelEdit.Visible = false; this.skinButtonEdit.Visible = false; this.skinButtonEdit.Enabled = false; } if (this.CurrentClan.Clan.Image != null) { this.gpgPictureBoxClanIcon.Visible = true; this.gpgPictureBoxClanIcon.Image = this.CurrentClan.Clan.Image; } else { this.gpgPictureBoxClanIcon.Visible = false; this.gpgPictureBoxClanIcon.Image = null; } }