Skip to content

Commit

Permalink
CefSharp로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
sch6393 committed Sep 5, 2019
1 parent a85f8fa commit ba85aa1
Show file tree
Hide file tree
Showing 15 changed files with 217 additions and 71 deletions.
5 changes: 5 additions & 0 deletions YoutubeWallpapers/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="x86"/>
</assemblyBinding>
</runtime>
</configuration>
27 changes: 23 additions & 4 deletions YoutubeWallpapers/Form1.Designer.cs

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

87 changes: 53 additions & 34 deletions YoutubeWallpapers/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

using MetroFramework.Forms;

using SCHLibFont;
using libFont;

namespace YoutubeWallpapers
{
Expand All @@ -31,7 +31,7 @@ public partial class Form1 : MetroForm
/// <summary>
/// 폰트 선언
/// </summary>
protected SCHFont m_SCHFont = new SCHFont();
protected LibFont m_libFont = new LibFont();

/// <summary>
/// Setting 선언
Expand Down Expand Up @@ -60,6 +60,11 @@ public partial class Form1 : MetroForm
/// </summary>
public static int m_iBrightness = 50;

/// <summary>
/// 볼륨 값
/// </summary>
protected int m_iVolume = 0;

/// <summary>
/// Background 변수들
/// (각 폼에서 개별적으로 선언)
Expand Down Expand Up @@ -88,7 +93,7 @@ public Form1()

#endregion

m_SCHFont.FontCollection();
m_libFont.FontCollection();
FontSet();
}

Expand All @@ -110,8 +115,8 @@ private void Form1_Load(object sender, EventArgs e)
// 밝기 조절
SetBrightness(m_iBrightness);

// 볼륨 상태 표시
GetVolume();
// 볼륨 상태 표시 (CefSharp로 변경해서 미사용)
// GetVolume();

// 모니터 출력
if (m_setting.iMonitor != 0)
Expand Down Expand Up @@ -221,27 +226,27 @@ protected static void ShowErrorMessage(Exception ex, string extraMessage)
/// </summary>
protected void FontSet()
{
m_SCHFont.FontSet(label_Help, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_Address, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_Type, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_TypeList, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_TypeSingle, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_VQ, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_Volume, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_VolumeOn, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_VolumeOff, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_VolumeError, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_Brightness, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_Buttons, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_Monitor, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_StartupProgram, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_StartOn, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_StartOff, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_Help, 10f, FontStyle.Regular);
m_SCHFont.FontSet(label_Help, 10f, FontStyle.Regular);

m_SCHFont.FontSet(metroTextBox_Address, 10f, FontStyle.Regular);
m_SCHFont.FontSet(metroTextBox_Number, 10f, FontStyle.Regular);
m_libFont.FontSet(label_Help, 10f, FontStyle.Regular);
m_libFont.FontSet(label_Address, 10f, FontStyle.Regular);
m_libFont.FontSet(label_Type, 10f, FontStyle.Regular);
m_libFont.FontSet(label_TypeList, 10f, FontStyle.Regular);
m_libFont.FontSet(label_TypeSingle, 10f, FontStyle.Regular);
m_libFont.FontSet(label_VQ, 10f, FontStyle.Regular);
m_libFont.FontSet(label_Volume, 10f, FontStyle.Regular);
m_libFont.FontSet(label_VolumeOn, 10f, FontStyle.Regular);
m_libFont.FontSet(label_VolumeOff, 10f, FontStyle.Regular);
m_libFont.FontSet(label_VolumeError, 10f, FontStyle.Regular);
m_libFont.FontSet(label_Brightness, 10f, FontStyle.Regular);
m_libFont.FontSet(label_Buttons, 10f, FontStyle.Regular);
m_libFont.FontSet(label_Monitor, 10f, FontStyle.Regular);
m_libFont.FontSet(label_StartupProgram, 10f, FontStyle.Regular);
m_libFont.FontSet(label_StartOn, 10f, FontStyle.Regular);
m_libFont.FontSet(label_StartOff, 10f, FontStyle.Regular);
m_libFont.FontSet(label_Help, 10f, FontStyle.Regular);
m_libFont.FontSet(label_Help, 10f, FontStyle.Regular);

m_libFont.FontSet(metroTextBox_Address, 10f, FontStyle.Regular);
m_libFont.FontSet(metroTextBox_Number, 10f, FontStyle.Regular);
}

#endregion
Expand Down Expand Up @@ -295,6 +300,7 @@ protected void SaveSetting()
m_setting.strAddress = metroTextBox_Address.Text;
m_setting.strNumber = metroTextBox_Number.Text;
m_setting.iBrightness = metroTrackBar_Brightness.Value;
m_setting.iVolume = metroTrackBar_Volume.Value;

m_setting.SaveToFile(m_strSettingFile);
}
Expand Down Expand Up @@ -347,6 +353,9 @@ protected void ApplySetting()

m_iBrightness = m_setting.iBrightness;
metroTrackBar_Brightness.Value = m_setting.iBrightness;

m_iVolume = m_setting.iVolume;
metroTrackBar_Volume.Value = m_setting.iVolume;
}

#endregion
Expand Down Expand Up @@ -426,6 +435,11 @@ protected void Play()
g_program.m_form2.BrowserURL(stringBuilder.ToString());
}

/// <summary>
/// 파라미터
/// </summary>
/// <param name="bFlag"></param>
/// <param name="stringBuilder"></param>
protected void Parameter(bool bFlag, StringBuilder stringBuilder)
{
if (!m_bCheck)
Expand Down Expand Up @@ -594,7 +608,7 @@ protected string VideoDivision(string strURL)
}

/// <summary>
/// Get Volume
/// Get Volume (CefSharp로 변경해서 미사용)
/// </summary>
protected void GetVolume()
{
Expand Down Expand Up @@ -637,7 +651,7 @@ protected void GetVolume()
}

/// <summary>
/// Set Volume
/// Set Volume (CefSharp로 변경해서 미사용)
/// </summary>
/// <param name="bFlag"></param>
protected void SetVolume(bool bFlag)
Expand Down Expand Up @@ -725,8 +739,13 @@ private void metroTrackBar_Brightness_ValueChanged(object sender, EventArgs e)
m_setting.SaveToFile(m_strSettingFile);
}

private void MetroTrackBar_Volume_ValueChanged(object sender, EventArgs e)
{
Form2.iVolume = metroTrackBar_Volume.Value;


m_setting.iVolume = metroTrackBar_Volume.Value;
m_setting.SaveToFile(m_strSettingFile);
}

#endregion

Expand Down Expand Up @@ -759,25 +778,25 @@ private void metroCheckBox_StartupPrograms_Click(object sender, EventArgs e)
}

/// <summary>
/// 볼륨 설정
/// 볼륨 설정 (CefSharp로 변경해서 미사용)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void metroCheckBox_Volume_Click(object sender, EventArgs e)
{
if (label_VolumeOn.Visible)
{
SetVolume(false);
// SetVolume(false);
}
else if (label_VolumeOff.Visible)
{
SetVolume(true);
// SetVolume(true);
}

Form4.DialogCustom("Volume Setup is Complete!", "Restart Program!");
// Form4.DialogCustom("Volume Setup is Complete!", "Restart Program!");

// 재시작을 해야 볼륨 설정이 적용
Application.Restart();
// Application.Restart();
}

#endregion
Expand Down
1 change: 1 addition & 0 deletions YoutubeWallpapers/Form2.Designer.cs

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

Loading

0 comments on commit ba85aa1

Please sign in to comment.