private void newTargetPlatformSelected(object sender, SelectionChangedEventArgs e) { ComboBoxItem cbi = (comboTargetPlatform.SelectedItem as ComboBoxItem); if (cbi == null) { return; } string currentSelection = cbi.Content.ToString(); Debug.WriteLine(currentSelection); if (currentSelection == "-NEW ENTRY-") { string newTarget = MessageBoxHandler.showEntryBox("Special Target Platform", "Enter New Target Platform Name", "Submit"); if (string.IsNullOrEmpty(newTarget) || string.IsNullOrWhiteSpace(newTarget)) { System.Media.SystemSounds.Exclamation.Play(); MessageBoxHandler.showMessageBox("Entries can NOT be empty!", "Blank Input", "Sowwy ;w;"); MessageBoxHandler.showMessageBox("All is good", "Forgiveness", "♥"); comboTargetPlatform.SelectedIndex = 0; return; } else { ComboBoxItem newItem = new ComboBoxItem(); newItem.Content = newTarget; comboTargetPlatform.Items.Add(newItem); comboTargetPlatform.SelectedItem = newItem; } } }
private void btnClearAll_Click(object sender, RoutedEventArgs e) { bool _result = MessageBoxHandler.showYesNoBox("Clear all drawing details?\nThis will NOT clear your app settings", "Clear Details?", "Yeah", "Nah"); if (_result == false) { return; } clearVolatiles(); }
private void btnDeleteCharacter_Click(object sender, RoutedEventArgs e) { if (listboxCharacters.SelectedIndex == -1) { System.Media.SystemSounds.Exclamation.Play(); MessageBoxHandler.showMessageBox("You must select a character to delete", "No Character Selected", "Alrighty! ^^♥"); return; } listboxCharacters.Items.RemoveAt(listboxCharacters.SelectedIndex); }
private void btnCreateFiles_Click(object sender, RoutedEventArgs e) { bool _result = MessageBoxHandler.showYesNoBox("Are you sure that you want to create the directories?", "Create Directories?", "Yeah", "Nah"); if (_result == false) { return; } DirectoryParser _dirParse = new DirectoryParser(); string folderRoot = System.IO.Path.Combine(_dirParse.parseFormatString(DirectoryParser.folderFormat)); string fileName = System.IO.Path.Combine(_dirParse.parseFormatString(DirectoryParser.fileNameFormat)); string[] _subs = { "", "REFERENCES\\RENDERS", "PROGRESS", "EXPORT\\Original", "EXPORT\\1280", "EXPORT\\Square" }; makeFolders(folderRoot, _subs); var _directories = Directory.GetDirectories(folderRoot); foreach (string sub in _subs) { string _editedFileName = fileName; var _sub_subs = sub.Split('\\'); if (sub.Length > 0) { _editedFileName = fileName.Replace("PROJECT", _sub_subs[0]); } string _fullPath = System.IO.Path.Combine(folderRoot, sub) + "\\" + _editedFileName + ".txt"; using (StreamWriter sw = File.AppendText(_fullPath)) { Console.WriteLine(_fullPath); sw.Write(publicDataContext.EntryInfo.drawingDescription); } } try { _result = MessageBoxHandler.showYesNoBox("Would you like to open your new folders?", "Open Directories?", "Pwease! OwO", "No Thankis. UwU"); if (_result == true) { System.Diagnostics.Process.Start("explorer.exe", folderRoot); } } catch (System.ComponentModel.Win32Exception win32Exception) { //The system cannot find the file specified... Console.WriteLine(win32Exception.Message); } }
private void btnAddCharacter_Copy_Click(object sender, RoutedEventArgs e) { string cName = (string.IsNullOrEmpty(txtCharacterName.Text)) ? "NULL" : txtCharacterName.Text; string cSpecies = (string.IsNullOrEmpty(txtCharacterSpecies.Text)) ? "NULL" : txtCharacterSpecies.Text; if (cName == "NULL" && cSpecies == "NULL") { MessageBoxHandler.showMessageBox("Name and Species can NOT be empty", "Invalid Character", "I'm Sowwy ;w;"); return; } listboxCharacters.Items.Add(cName + " - " + cSpecies); }
private async void btnCreateTrelloCard_Click(object sender, RoutedEventArgs e) { bool _result = MessageBoxHandler.showYesNoBox("Are you sure that you want to create the a Trello Card?", "Create Trello Card?", "Yeah", "Nah"); if (_result == false) { return; } Manatee.Trello.IBoard myBoard = null; trelloClass.AuthTrello(); myBoard = trelloClass.GetTrelloBoard(publicDataContext.UserInfo.trelloBoardID); System.Diagnostics.Debug.WriteLine(myBoard); while (myBoard == null) { Console.WriteLine("Busy Getting Board"); await Task.Delay(25); } trelloClass.AddTrelloCard(myBoard); }