// クローズボタンが押された時の処理 void Close_button_CLicked(object sender, EventArgs e) { CSV_Save CSV_Write = new CSV_Save(); CSV_Write.Save_CSV(); this.Close(); }
public Form1() { InitializeComponent(); ClockFaceData[0] = "List-1(シンプル)"; ClockFaceData[1] = "List-2(アラビア数字)"; ClockFaceData[2] = "List-3(ローマ数字)"; ClockFaceData[3] = "List-4(アラビア数字)"; ClockFaceData[4] = "List-5(ローマ数字)"; ClockFaceData[5] = "List-6(ローマ数字)"; ClockFaceData[6] = "List-7(アラビア数字)中型"; ClockFaceData[7] = "List-8(目覚まし時計)小型"; ClockHandsData[0] = "List-1(長い針)"; ClockHandsData[1] = "List-2(長い針/赤の秒針)"; ClockHandsData[2] = "List-3(中型の針)"; ClockHandsData[3] = "List-4(中型の針/赤の秒針)"; ClockHandsData[4] = "List-5(短い針)"; ClockHandsData[5] = "List-6(短い針/赤の秒針)"; CSV_Read CSV_Load = new CSV_Read(); try { CSV_Load.Read_CSV(); } catch (Exception) { CSV_Save CSV_Write = new CSV_Save(); CSV_Write.Save_CSV(); } player_T_Signal = new System.Media.SoundPlayer(Properties.Resources.Zihou01_1); if (Alarm_No == 0) { player_Alarm = new System.Media.SoundPlayer(Properties.Resources.Clock_Alarm02_1_Loop_); } else if (Alarm_No == 1) { player_Alarm = new System.Media.SoundPlayer(Properties.Resources.Clock_Alarm04_01); } else { player_Alarm = new System.Media.SoundPlayer(Properties.Resources.Japanese_School_Bell01_1); } this.FormBorderStyle = FormBorderStyle.None; // Windowのタイトルバーと境界線を消す this.TopMost = true; // 最前面表示 this.Opacity = Opacity_Data; // 透過度の設定 Scr_X = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width; Scr_Y = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height; if (Scr_X > Scr_Y) { Size_Max = Scr_Y; } else { Size_Max = Scr_X; } }