/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Form1_Load(object sender, EventArgs e) { String tmpFileName = String.Empty; try { this.fileID = this.googleDriveAccessService.GetFileID(Config.Default.noteXMLPath); if (String.IsNullOrEmpty(this.fileID)) { using (MemoryStream memoryStream = new MemoryStream(Resources.note)) { fileID = this.googleDriveAccessService.Create(memoryStream, Config.Default.noteXMLPath, "application/xml"); } } tmpFileName = this.googleDriveAccessService.GetFile(fileID); XML = new XMLAccess(tmpFileName); if (false == XML.InitSuccessFlg) { Application.Exit(); return; } // 編集機能クラス function = new Function(richTextBox1); // コンテキストメニュークラス _menu = new MyConTextMenu(function); // 右クリックメニュー設定 richTextBox1.ContextMenuStrip = _menu.menu; // 検索機能 search = new Search(listBox1_Index); this.setFont(); SystemFunction_INIT(); } finally { if (File.Exists(tmpFileName)) { File.Delete(tmpFileName); } } }