private void SaveList_SelectionChanged(object sender, SelectionChangedEventArgs e) { var psave = SaveList.SelectedItem; if (psave is ProfileSave ps) { SaveInfo_Name.Content = "이름: " + ps.savename; SaveInfo_Dir.Content = "폴더: " + ps.directory; SaveInfo_Date.Content = "날짜: " + ps.formattedtime; if (SaveInfo.Visibility != Visibility.Visible) { var anim = new DoubleAnimation(0, 1, new Duration(TimeSpan.FromSeconds(0.2))) { DecelerationRatio = 1 }; SaveInfo.BeginAnimation(StackPanel.OpacityProperty, anim); var anim0 = new DoubleAnimation(1, 0.8, new Duration(TimeSpan.FromSeconds(0.1))) { DecelerationRatio = 1, AutoReverse = true }; SaveList.BeginAnimation(ListBox.OpacityProperty, anim0); } SaveInfo.Visibility = Visibility.Visible; if (TaskListPanel.Visibility == Visibility.Visible) { SavegameChanged(true); } } }
public override void _Ready() { saveList = GetNode <SaveList>(SaveListPath); saveNameBox = GetNode <LineEdit>(SaveNameBoxPath); saveButton = GetNode <Button>(SaveButtonPath); overwriteConfirm = GetNode <CustomConfirmationDialog>(OverwriteConfirmPath); }
// This is the function if the button add backup is triggered public void Button_AddBackup(object sender, RoutedEventArgs e) { bool _checkName = SaveList.SearchNameExist(NBTextbox.Text); if (_checkName == false) { string typeOfSave = ""; if (Differential_Backup.IsChecked == true) { typeOfSave = "Diff"; } else if (Full_Backup.IsChecked == true) { typeOfSave = "Full"; } else { System.Windows.Forms.MessageBox.Show(" you need to choose one button "); } SaveList.addSave(NBTextbox.Text, SFTextBox.Text, TFTextBox.Text, typeOfSave, LCFTextBox.Text); BackupListDisplay.ItemsSource = SaveList.ImportSaveList(); } else if (_checkName == true) { System.Windows.MessageBox.Show("Name is already Exist"); } }
public override void _Ready() { primaryMenu = GetNode <Control>(PrimaryMenuPath); loadMenu = GetNode <Control>(LoadMenuPath); saveMenu = GetNode <NewSaveMenu>(SaveMenuPath); loadSaveList = GetNode <SaveList>(LoadSaveListPath); }
// This is the function if the button delete backup is triggered private void BtnDelete_Click(object sender, RoutedEventArgs e) { Save SaveSelected = (Save)BackupListDisplay.SelectedItem; SaveList.DeleteSave(SaveSelected); System.Windows.MessageBox.Show(SaveSelected.name + " is dead"); BackupListDisplay.ItemsSource = SaveList.ImportSaveList(); }
private async Task PrepareSave() { await PrepareEdit(); SaveList = EditList == null?Enumerable.Empty <Media>() : EditList.Where(el => el.SearchResult != null && el.Media != null).Select(el => el.Media).ToList(); CanSave = SaveList.Any() || !string.IsNullOrEmpty(SelectedDirectory); }
// Here we load everything we need public MainWindow() { InitializeComponent(); comboBox.Items.Add("Français"); comboBox.Items.Add("English"); BackupListDisplay.ItemsSource = SaveList.ImportSaveList(); ProcessListDisplay.ItemsSource = ProcessList.ImportProcessList(); }
private void Awake() { save = new Save(); saveList = new SaveList(); saveList = Save.GetSave(); _audioSpectrum = new float[128]; Debug.Log(_songName); androidPath = Application.persistentDataPath + "/";// make to android path }
private void Awake() { uiContent = FindObjectsOfType <UIContent>(); if (PlayerPrefs.HasKey(saveListKey)) { saveList = JsonUtility.FromJson <SaveList>(PlayerPrefs.GetString(saveListKey)); } }
public void RenameSave(string oldPath, string newPath) { SaveList.Remove(oldPath); SaveList.Add(newPath); newPath = ".\\Saves\\" + newPath; oldPath = ".\\Saves\\" + oldPath; File.Copy(oldPath, newPath); File.Delete(oldPath); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { notifyIcon1.Visible = false; notifyIcon1.Dispose(); Items.ItemList itemListsave = new Items.ItemList(); itemListsave.Items = itemList.ToArray(); itemListsave.GroupName = "DefaultList"; SaveList.AddedOrChangeItemList(itemListsave); SaveList.SaveAllSaveFiles(); }
public void DeleteSave(string FileName) { DialogResult dialogResult = MessageBox.Show("You are about to delete " + FileName + ". Continue?", "Confirm Deletion", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { File.Delete(".\\Saves\\" + FileName); SaveList.Remove(FileName); } }
public CountdownViewModel(SaveList saveList) { OutputFilename = ConfigurationManager.AppSettings["Filename"]; Countdown = new CountdownModel(); timer = new AppTimer(200); timer.AfterTick += AfterTick; TimerSheets = new ObservableCollection <TimerSheetViewModel>(); CreateCommand = new DelegateCommandResolver(SaveChanged, () => CanUpdate); System.IO.File.Create(OutputFilename); DoSaveList += saveList; }
private static void LoadEntryInitial(DataGridView dgData, SaveList <SavePreview> list, SavePreview sav) { list.Add(sav); dgData.DataSource = list; dgData.AutoGenerateColumns = true; for (int i = 0; i < dgData.Columns.Count; i++) { dgData.Columns[i].SortMode = DataGridViewColumnSortMode.Automatic; } dgData.AutoResizeColumns(); // Trigger Resizing }
protected void SaveBind(bool current = false) { if (current) { TabPlay("save"); } int pageCount = 0; List <WMUserSets> list = WMUserSets.GetList(out pageCount, 401, UserId, SavePager.CurrentPageIndex - 1, SavePager.PageSize); SaveList.DataSource = list; SaveList.DataBind(); SavePager.RecordCount = pageCount; }
public SaveList(SaveList saveList) { job = saveList.job; lv = saveList.lv; hp = saveList.hp; mp = saveList.mp; str = saveList.str; def = saveList.def; dex = saveList.dex; cripro = saveList.cripro; cridem = saveList.cridem; exp = saveList.exp; skillIconImage = saveList.skillIconImage; saveInven = saveList.saveInven; }
private SaveList <SavePreview> PopulateData(DataGridView dgData, IEnumerable <SaveFile> saves) { var list = new SaveList <SavePreview>(); var enumerator = saves.GetEnumerator(); while (enumerator.Current == null) { if (!enumerator.MoveNext()) { return(list); } } var first = enumerator.Current; var sav1 = new SavePreview(first, GetParentFolderName(first)); LoadEntryInitial(dgData, list, sav1); int ctr = 1; // refresh every 7 until 15+ are loaded Task.Run(async() => // load the rest async { while (!dgData.IsHandleCreated) { await Task.Delay(15).ConfigureAwait(false); } while (enumerator.MoveNext()) { var next = enumerator.Current; if (next == null) { continue; } var sav = new SavePreview(next, GetParentFolderName(next)); dgData.Invoke(new Action(() => LoadEntry(dgData, list, sav))); ctr++; if (ctr < 15 && ctr % 7 == 0) { dgData.Invoke(new Action(() => Refresh(dgData))); } } dgData.Invoke(new Action(() => Refresh(dgData))); enumerator.Dispose(); }); return(list); }
public void SavePlayerData() { if (this.SaveList == null) { this.SaveList = new List <Player>(); } int id = PlayerList[0].Id; int blood = PlayerList[0].Blood; int haveblood = PlayerList[0].HaveBlood; int activity = PlayerList[0].Activity; int haveactivity = PlayerList[0].HaveActivit; int attick = PlayerList[0].Attick; int defense = PlayerList[0].Defense; int item1 = PlayerList[0].Item1; int item2 = PlayerList[0].Item2; int item3 = PlayerList[0].Item3; int item4 = PlayerList[0].Item4; Player player = new Player(id, blood, haveblood, activity, haveactivity, attick, defense, item1, item2, item3, item4); SaveList.Add(player); //Debug.Log(SaveList[0].HaveBlood); //JsonData playersaveData; //this.playersaveData=new JsonData(); playerData[0]["Id"] = SaveList[0].Id; playerData[0]["Blood"] = SaveList[0].Blood; playerData[0]["HaveBlood"] = SaveList[0].HaveBlood; Debug.Log(SaveList[0].HaveBlood); playerData[0]["Activity"] = SaveList[0].Activity; playerData[0]["HaveActivity"] = SaveList[0].HaveActivit; playerData[0]["Attack"] = SaveList[0].Attick; playerData[0]["Defense"] = SaveList[0].Defense; playerData[0]["Item1"] = SaveList[0].Item1; playerData[0]["Item2"] = SaveList[0].Item2; playerData[0]["Item3"] = SaveList[0].Item3; playerData[0]["Item4"] = SaveList[0].Item4; string test1 = JsonMapper.ToJson(playerData); Debug.Log(test1); FileInfo file = new FileInfo(Application.persistentDataPath + "file///Assets/Json/Player.json"); // Debug.Log(Application.dataPath + "/Json/Player.json"); StreamWriter sw = file.CreateText(); // byte[] bts = System.Text.Encoding.UTF8.GetBytes(test1); sw.WriteLine(test1); sw.Close(); sw.Dispose(); }
private void button1_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(textBox1.Text)) { this.CurName = textBox1.Text; if (!String.IsNullOrEmpty(richTextBox1.Text)) { this.CurList = new List <string>(); foreach (var line in richTextBox1.Lines) { CurList.Add(line); } SaveList?.Invoke(this, EventArgs.Empty); } } }
public void CreateSave(string FilePath) { if (!SaveList.Contains(FilePath)) { File.Copy(WorldPath + "\\SAVEDATA1000", ".\\Saves\\" + FilePath); CurrentSavePath = FilePath.Replace(".\\Saves\\", ""); MainLoaded = false; SaveList.Add(FilePath); } else { DialogResult result = MessageBox.Show("A save with that name already exists. Would you like to replace it?", "Save Already Exists", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { File.Delete(".\\Saves\\" + FilePath); File.Copy(WorldPath + "\\SAVEDATA1000", ".\\Saves\\" + FilePath); CurrentSavePath = FilePath.Replace(".\\Saves\\", ""); MainLoaded = false; } } }
public Form1() { InitializeComponent(); PluginList.ReadAllPluginsInTypes(); SaveList.ReadAllSaveFiles(); if (SaveList.saveList.Count > 0) { if (SaveList.saveList[0].Items != null) { itemList = new List <Items.Item>(SaveList.saveList[0].Items); } else { itemList = new List <Items.Item>(); } } else { itemList = new List <Items.Item>(); } findStyleBox.SelectedIndex = 0; RefreshList(); }
public override void _Ready() { saveList = GetNode <SaveList>(SaveListPath); saveNameBox = GetNode <TextEdit>(SaveNameBoxPath); overwriteConfirm = GetNode <ConfirmationDialog>(OverwriteConfirmPath); }