From d30259fc0695afb73451a96e2202ea76d55cbd0f Mon Sep 17 00:00:00 2001 From: YuSeop Choung Date: Sat, 5 Jun 2021 21:05:59 +0900 Subject: [PATCH] add schedule in formmain --- Client/Forms/FormMain.Designer.cs | 58 ++++++++++++++++++++----------- Client/Forms/FormMain.cs | 2 +- Client/Forms/FormMain.resx | 2 +- Client/Panels/PanelSchedule.cs | 3 ++ 4 files changed, 43 insertions(+), 22 deletions(-) diff --git a/Client/Forms/FormMain.Designer.cs b/Client/Forms/FormMain.Designer.cs index f8db67a..da35d6e 100644 --- a/Client/Forms/FormMain.Designer.cs +++ b/Client/Forms/FormMain.Designer.cs @@ -38,7 +38,6 @@ private void InitializeComponent() this.txtSearch = new MetroFramework.Controls.MetroTextBox(); this.tvwOrganization = new System.Windows.Forms.TreeView(); this.ilistEmployee = new System.Windows.Forms.ImageList(this.components); - this.tpSchedule = new MetroFramework.Controls.MetroTabPage(); this.tpChat = new MetroFramework.Controls.MetroTabPage(); this.pnlChat = new System.Windows.Forms.FlowLayoutPanel(); this.metroStyleManager1 = new MetroFramework.Components.MetroStyleManager(this.components); @@ -48,6 +47,8 @@ private void InitializeComponent() this.picSetting = new System.Windows.Forms.PictureBox(); this.picLogout = new System.Windows.Forms.PictureBox(); this.picProfile = new System.Windows.Forms.PictureBox(); + this.pnlSchedule = new System.Windows.Forms.FlowLayoutPanel(); + this.tpSchedule = new MetroFramework.Controls.MetroTabPage(); this.tabMenu.SuspendLayout(); this.tpOrganization.SuspendLayout(); this.tpChat.SuspendLayout(); @@ -55,6 +56,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.picSetting)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.picLogout)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.picProfile)).BeginInit(); + this.tpSchedule.SuspendLayout(); this.SuspendLayout(); // // tabMenu @@ -67,7 +69,7 @@ private void InitializeComponent() this.tabMenu.Controls.Add(this.tpChat); this.tabMenu.Location = new System.Drawing.Point(6, 83); this.tabMenu.Name = "tabMenu"; - this.tabMenu.SelectedIndex = 2; + this.tabMenu.SelectedIndex = 1; this.tabMenu.Size = new System.Drawing.Size(348, 511); this.tabMenu.TabIndex = 1; this.tabMenu.UseSelectable = true; @@ -177,23 +179,6 @@ private void InitializeComponent() this.ilistEmployee.TransparentColor = System.Drawing.Color.Transparent; this.ilistEmployee.Images.SetKeyName(0, "treenode.png"); // - // tpSchedule - // - this.tpSchedule.AutoScroll = true; - this.tpSchedule.HorizontalScrollbar = true; - this.tpSchedule.HorizontalScrollbarBarColor = true; - this.tpSchedule.HorizontalScrollbarHighlightOnWheel = false; - this.tpSchedule.HorizontalScrollbarSize = 2; - this.tpSchedule.Location = new System.Drawing.Point(4, 38); - this.tpSchedule.Name = "tpSchedule"; - this.tpSchedule.Size = new System.Drawing.Size(340, 469); - this.tpSchedule.TabIndex = 2; - this.tpSchedule.Text = "일정"; - this.tpSchedule.VerticalScrollbar = true; - this.tpSchedule.VerticalScrollbarBarColor = true; - this.tpSchedule.VerticalScrollbarHighlightOnWheel = false; - this.tpSchedule.VerticalScrollbarSize = 11; - // // tpChat // this.tpChat.Controls.Add(this.pnlChat); @@ -307,6 +292,37 @@ private void InitializeComponent() this.picProfile.MouseEnter += new System.EventHandler(this.pic_MouseEnter); this.picProfile.MouseLeave += new System.EventHandler(this.pic_MouseLeave); // + // pnlSchedule + // + this.pnlSchedule.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlSchedule.AutoScroll = true; + this.pnlSchedule.BackColor = System.Drawing.Color.White; + this.pnlSchedule.Location = new System.Drawing.Point(1, 1); + this.pnlSchedule.Margin = new System.Windows.Forms.Padding(1); + this.pnlSchedule.Name = "pnlSchedule"; + this.pnlSchedule.Size = new System.Drawing.Size(338, 467); + this.pnlSchedule.TabIndex = 3; + // + // tpSchedule + // + this.tpSchedule.AutoScroll = true; + this.tpSchedule.Controls.Add(this.pnlSchedule); + this.tpSchedule.HorizontalScrollbar = true; + this.tpSchedule.HorizontalScrollbarBarColor = true; + this.tpSchedule.HorizontalScrollbarHighlightOnWheel = false; + this.tpSchedule.HorizontalScrollbarSize = 2; + this.tpSchedule.Location = new System.Drawing.Point(4, 38); + this.tpSchedule.Name = "tpSchedule"; + this.tpSchedule.Size = new System.Drawing.Size(340, 469); + this.tpSchedule.TabIndex = 2; + this.tpSchedule.Text = "일정"; + this.tpSchedule.VerticalScrollbar = true; + this.tpSchedule.VerticalScrollbarBarColor = true; + this.tpSchedule.VerticalScrollbarHighlightOnWheel = false; + this.tpSchedule.VerticalScrollbarSize = 11; + // // FormMain // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); @@ -338,6 +354,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.picSetting)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.picLogout)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.picProfile)).EndInit(); + this.tpSchedule.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -346,7 +363,6 @@ private void InitializeComponent() #endregion private MetroFramework.Controls.MetroTabControl tabMenu; private MetroFramework.Controls.MetroTabPage tpOrganization; - private MetroFramework.Controls.MetroTabPage tpSchedule; private System.Windows.Forms.TreeView tvwOrganization; private MetroFramework.Controls.MetroTextBox txtSearch; private MetroFramework.Components.MetroStyleManager metroStyleManager1; @@ -360,6 +376,8 @@ private void InitializeComponent() private MetroFramework.Controls.MetroTextBox txtOrgSearch; private System.Windows.Forms.ImageList ilistEmployee; private System.Windows.Forms.FlowLayoutPanel pnlChat; + private MetroFramework.Controls.MetroTabPage tpSchedule; + private System.Windows.Forms.FlowLayoutPanel pnlSchedule; } } diff --git a/Client/Forms/FormMain.cs b/Client/Forms/FormMain.cs index afdf78f..c7aa4e8 100644 --- a/Client/Forms/FormMain.cs +++ b/Client/Forms/FormMain.cs @@ -271,7 +271,7 @@ void AddScheduleCard(Schedule schedule) //스케줄카드 생성 //스케줄 카드 추가 if (DateTime.Now < schedule.end) { - tpSchedule.Controls.Add(Cardschedule); + pnlSchedule.Controls.Add(Cardschedule); ScheduleCards.Add(schedule); } } diff --git a/Client/Forms/FormMain.resx b/Client/Forms/FormMain.resx index 833ef13..e67e275 100644 --- a/Client/Forms/FormMain.resx +++ b/Client/Forms/FormMain.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAy - BwAAAk1TRnQBSQFMAwEBAAFQAQABUAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA + BwAAAk1TRnQBSQFMAwEBAAFYAQABWAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm diff --git a/Client/Panels/PanelSchedule.cs b/Client/Panels/PanelSchedule.cs index 3ce0cd6..d5e25bb 100644 --- a/Client/Panels/PanelSchedule.cs +++ b/Client/Panels/PanelSchedule.cs @@ -12,10 +12,13 @@ namespace Client.Panels { public partial class PanelSchedule : PanelSlider { + FormMain owner; public PanelSchedule(Form owner, SlidingType type) : base(owner, type) { InitializeComponent(); Init(); + + this.owner = owner as FormMain; } private void PanelSchedule_Load(object sender, EventArgs e) {