Skip to content

Commit

Permalink
edit controlSchedule, edit Formain, edit Client, edit SchedulePacket
Browse files Browse the repository at this point in the history
  • Loading branch information
yuseop-choung committed Jun 4, 2021
1 parent f866a92 commit f34f2e1
Show file tree
Hide file tree
Showing 16 changed files with 166 additions and 31 deletions.
5 changes: 5 additions & 0 deletions Client/Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@
</ItemGroup>
<ItemGroup>
<Content Include="logo.ico" />
<None Include="Resources\trash.png" />
<None Include="Resources\light_green.jpg" />
<None Include="Resources\light_blue.jpg" />
<None Include="Resources\lavendar.jpg" />
<None Include="Resources\gold.png" />
<None Include="Resources\add.png" />
<None Include="Resources\picture.png" />
</ItemGroup>
Expand Down
44 changes: 30 additions & 14 deletions Client/Forms/ControlSchedule.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions Client/Forms/ControlSchedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,44 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Client.Properties;
using MetroFramework.Controls;
using OSTLibrary.Classes;

namespace Client.Forms
{
public partial class ControlSchedule : MetroUserControl
{
public ControlSchedule()
public ControlSchedule(Schedule schedule)
{
InitializeComponent();

determine_Color();
if (schedule.range == "회사 전체")
picRangeColor.Image = Resources.lavendar;
else if (schedule.range == "본부 전체")
picRangeColor.Image = Resources.light_blue;
else if (schedule.range == "팀 전체")
picRangeColor.Image = Resources.light_green;
else if (schedule.range == "개인")
picRangeColor.Image = Resources.gold;

lblSche_Name.Text = schedule.title;
lblStart.Text = schedule.start.ToString("MM-dd");
lblEnd.Text = schedule.end.ToString("MM-dd");

}

private void determine_Color()
{
//경우에 따라 imagelist color 설정
}

private void picContent_Click(object sender, EventArgs e)
{
//'+' 아이콘 클릭 시 일정 내용 메세지박스로 출력
//MessageBox.Show();

}

private void picDelete_Click(object sender, EventArgs e)
{
//클릭 시 스케줄 수동 삭제
}
}
}
2 changes: 1 addition & 1 deletion Client/Forms/ControlSchedule.resx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACq
BwAAAk1TRnQBSQFMAgEBBAEAARgBAAEYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
BwAAAk1TRnQBSQFMAgEBBAEAAVABAAFQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
Expand Down
15 changes: 14 additions & 1 deletion Client/Forms/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ namespace Client.Forms
public partial class FormMain : MetroForm
{
Dictionary<string, FormRoom> formChats; // 켜져있는 채팅방들
Dictionary<string, ControlRoomCard> roomCards; // 나의 채팅방 카드들
Dictionary<string, ControlRoomCard> roomCards; // 나의 채팅방 카드들
Dictionary<string, ControlSchedule> scheduleCards; //나의 스케줄 카드들

public FormMain()
{
Expand Down Expand Up @@ -254,6 +255,12 @@ void AddRoomCard(Room room)
// 채팅 카드 추가
pnlChat.Controls.Add(cardRoom);
roomCards.Add(room.id, cardRoom);
}
void AddScheduleCard(Schedule schedule)
{
ControlSchedule Cschedule = new ControlSchedule(schedule);


}
void ReceiveRoom(Packet p)
{
Expand Down Expand Up @@ -294,5 +301,11 @@ void ReceiveChat(Packet p)
}
}
}
void ReceiveSchedule(Packet p)
{
SchedulePacket sp = p as SchedulePacket;

Program.schedules.Add(sp.schedule);
}
}
}
1 change: 1 addition & 0 deletions Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ static class Program

public static Employee employee; // 나의 사원 정보
public static List<Room> rooms; // 채팅방 정보
public static List<Schedule> schedules; // 스케줄 정보
public static Dictionary<int, Employee> employees; // 사원들 정보
public static FormMain formMain; // 적당한 폼 상호작용을 위한 메인폼

Expand Down
50 changes: 50 additions & 0 deletions Client/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 24 additions & 9 deletions Client/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,20 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="gold" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\gold.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logout" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logout.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="phone" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\phone.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="office_building" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\office-building.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="send" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\send.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="light_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\light_blue.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="central" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\central.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
Expand All @@ -136,18 +142,21 @@
<data name="back" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="light_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\light_green.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="user" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\user.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="next" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\next.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="manager" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\manager.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="key" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\key.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="picture" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\picture.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand All @@ -157,6 +166,9 @@
<data name="star" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\star.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="send" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\send.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="settings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand All @@ -166,13 +178,16 @@
<data name="team" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\team.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="lavendar" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\lavendar.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="calendar" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\calendar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="phone" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\phone.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="manager" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\manager.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="trash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\trash.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file added Client/Resources/gold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Client/Resources/lavendar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Client/Resources/light_blue.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Client/Resources/light_green.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Client/Resources/trash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions OSTLibrary/Networks/SchedulePacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace OSTLibrary.Networks
[Serializable]
public class SchedulePacket : Packet
{
public Schedule schedule;
public List<Schedule> schedules;

public SchedulePacket(List<Schedule> schedules)
Expand Down
5 changes: 5 additions & 0 deletions Server/Classes/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ public void Recieve()
Program.clients[eid].Send(new ChatsPacket(p.chats[0]));
});
}
else if(packet.type == PacketType.Schedule)
{
SchedulePacket sp = packet as SchedulePacket;

}

// 그 외
else
Expand Down
13 changes: 13 additions & 0 deletions Server/Classes/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.8.5" targetFramework="net472" />
<package id="Google.Protobuf" version="3.14.0" targetFramework="net472" />
<package id="K4os.Compression.LZ4" version="1.1.11" targetFramework="net472" />
<package id="K4os.Compression.LZ4.Streams" version="1.1.11" targetFramework="net472" />
<package id="K4os.Hash.xxHash" version="1.0.6" targetFramework="net472" />
<package id="MySql.Data" version="8.0.25" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.3" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
</packages>

0 comments on commit f34f2e1

Please sign in to comment.