private void btnFetchFile_Click(object sender, EventArgs e) { if (this.FetchList == null) return; if (this.FetchList.Length == 0) return; string f = FetchList[0]; IncomingTempFolder = Globals.GetExecutablePath() + "TMP" + Globals.GetDateTimeStamp() + "\\"; IncomingTempFolder = Globals.CreateFolder(IncomingTempFolder); if (IncomingTempFolder == null) { MessageBox.Show("Unable to create temp folder."); return; } txtLog.AppendText("\r\n"); txtLog.AppendText("---------------------------------"); txtLog.AppendText("\r\n"); com.FetchFile(f, IncomingTempFolder); }
public void Init() { ctrlQuestion.BgColor = new SolidColorBrush(Color.FromRgb(195, 210, 230)); ctrlAnswer.BgColor = new SolidColorBrush(Color.FromRgb(170, 250, 175)); ctrlReminder.BgColor = new SolidColorBrush(Color.FromRgb(225, 195, 220)); string GroupName = Globals.GetDefaultGroupName(); lblDefaultCardGroupName.Content = string.Format("Group: {0}", GroupName); // Creates a temporary folder and its necessary files and folders for a card. // If user decides to save the card, the folder will be persistent. Else the themporary // folder will be removed. // Note: manifest file is created here. CardFolder = Globals.CreateNewCard(GroupName); ctrlQuestion.CardRootFolder = CardFolder; ctrlQuestion.WorkingFolder = Globals.CreateFolder(CardFolder + "Q\\"); ctrlAnswer.WorkingFolder = Globals.CreateFolder(CardFolder + "A\\"); ctrlAnswer.CardRootFolder = CardFolder; ctrlReminder.WorkingFolder = Globals.CreateFolder(CardFolder + "R\\"); ctrlReminder.CardRootFolder = CardFolder; }