public static void SaveThemes(BindingList <ThemeInfo> themes) { var themesArray = new ThemeInfo[themes.Count - 1 + 1]; themes.CopyTo(themesArray, 0); SaveThemes(themesArray); }
public void DeselectAll() { var entitiesDuplicate = new ISelectable[SelectedEntities.Count]; SelectedEntities.CopyTo(entitiesDuplicate, 0); foreach (var entity in entitiesDuplicate) { entity.Deselect(); } }
public override void fillgrd() { BindingList<Doktor> liste = new BindingList<Doktor>(); Doktor[] doktorlistesi = Persistence.ReadList<Doktor>(); liste.CopyTo(doktorlistesi, 0); if (doktorlistesi != null && doktorlistesi.Length > 0) { foreach (Entity item in doktorlistesi) { liste.Add((Doktor)item); } } formbs.DataSource = liste; base.fillgrd(); }
public override void fillgrd() { BindingList<Kullanici> kullanicilistesi = new BindingList<Kullanici>(); Kullanici[] kullanicililar = Persistence.ReadList<Kullanici>(); kullanicilistesi.CopyTo(kullanicililar, 0); if (kullanicililar != null && kullanicililar.Length > 0) { foreach (Entity item in kullanicililar) { kullanicilistesi.Add((Kullanici)item); } } formbs.DataSource = kullanicilistesi; base.fillgrd(); }
public override void fillgrd() { BindingList <Doktor> liste = new BindingList <Doktor>(); Doktor[] doktorlistesi = Persistence.ReadList <Doktor>(); liste.CopyTo(doktorlistesi, 0); if (doktorlistesi != null && doktorlistesi.Length > 0) { foreach (Entity item in doktorlistesi) { liste.Add((Doktor)item); } } formbs.DataSource = liste; base.fillgrd(); }
private bool CheckTaiKhoang(string TaiKhoang, string Nguon) { bool rs = false; Accounts[] list = new Accounts[ListAccount.Count]; ListAccount.CopyTo(list, 0); foreach (var item in list) { if (TaiKhoang == item.TaiKhoan && Nguon == item.Nguon) { rs = true; break; } } return(rs); }
public override void fillgrd() { BindingList <Kullanici> kullanicilistesi = new BindingList <Kullanici>(); Kullanici[] kullanicililar = Persistence.ReadList <Kullanici>(); kullanicilistesi.CopyTo(kullanicililar, 0); if (kullanicililar != null && kullanicililar.Length > 0) { foreach (Entity item in kullanicililar) { kullanicilistesi.Add((Kullanici)item); } } formbs.DataSource = kullanicilistesi; base.fillgrd(); }
}/*private List<int> MakeSavedIndexesUsefulForPricing()*/ /// <summary> /// Gets the raw display items from the MealView and parses out /// the vital information. /// </summary> /// <remarks> /// NAME: PerformMealViewFormatting /// AUTHOR: Ryan Osgood /// DATE: 8/16/2019 /// </remarks> /// <param name="a_view">The MealView to parse data from.</param> private void PerformMealViewFormatting(MealView a_view) { a_view.FillMealDisplay(); BindingList <string> viewDisplayDetails = a_view.GetDisplay(); string[] indexArr = new string[viewDisplayDetails.Count]; viewDisplayDetails.CopyTo(indexArr, 0); SaveNumberOfDisplayLinesOnEachAddition(indexArr); foreach (string val in viewDisplayDetails) { if (!val.Equals("") && !val.Equals(m_lineFeed) && !val.Equals(m_tilde)) { m_menuItemsForDisplay.Add(val); } } }/*private void PerformMealViewFormatting(MealView a_view)*/
private void ctxButtonDelete_Click(object sender, EventArgs e) { var result = MessageBox.Show("Emin misin?", "UYARI", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { var selectedUser = lstInfoUsers.SelectedItem as Persons; var myExpensesKullanıcılarCopy = new Expenses[myExpensesKullanıcılar.Count]; myExpensesKullanıcılar.CopyTo(myExpensesKullanıcılarCopy, 0); foreach (var expense in myExpensesKullanıcılarCopy) { if (expense.UserOwnExpense == selectedUser) { myExpensesKullanıcılar.Remove(expense); } } myUsersKullanıcılar.Remove(selectedUser); } }
private void SaveSettings() { if (settings == null) { settings = new Settings(); } settings.Path = tbSoundPath.Text; settings.RepeatInterval = (int)numInterval.Value; settings.Shortcuts = new Shortcut[eventsList.Count]; eventsList.CopyTo(settings.Shortcuts, 0); string serialized = JsonConvert.SerializeObject(settings); if (!File.Exists(SettingsPath)) { Directory.CreateDirectory(SettingsDir); File.Create(SettingsPath).Close(); } File.WriteAllText(SettingsPath, serialized); }
public frmFixedLengthConfig(int applicationId, string applicationName, DataFormatTypes formatType) { _ApplicationId = applicationId; _ApplicationName = applicationName; _formatType = formatType; InitializeComponent(); switch (formatType) { case DataFormatTypes.Sql: this.Text = "Paste SQL Query"; grpHeader.Visible = false; grpFooter.Visible = false; break; case DataFormatTypes.FixedLength: this.Text = "Paste Fixed Length Schema"; grpHeader.Visible = true; grpFooter.Visible = true; break; default: this.Text = ""; btnSave.Enabled = false; grpHeader.Visible = false; grpFooter.Visible = false; break; } _Attributes = new Data.UtilDataManager().GetAttributes(_ApplicationId); cmbAttributeFooter.DataSource = _Attributes; cmbAttributeFooter.DisplayMember = "Name"; Data.Attribute[] aa2 = new Data.Attribute[_Attributes.Count]; _Attributes.CopyTo(aa2, 0); cmbAttributeHeader.DataSource = aa2; cmbAttributeHeader.DisplayMember = "Name"; this.fixedLengthSchemaGenerator1.Attributes = _Attributes.Where(aa => aa.IsAcceptable == true).Select(a => a.Name).ToArray(); }
private void PasteSelection() { throw new NotImplementedException(); BindingList <WActorNode> serializedObjects = AttemptToDeserializeObjectsFromClipboard(); if (serializedObjects == null) { return; } WActorNode[] actorRange = new WActorNode[serializedObjects.Count]; serializedObjects.CopyTo(actorRange, 0); ModifySelection(SelectionType.Add, actorRange, true); //m_selectionList.Clear(); foreach (var item in serializedObjects) { //m_world.FocusedScene.RegisterObject(item); //m_selectionList.Add(item); } }
private void ModifySelection(SelectionType action, WActorNode[] actors, bool clearSelection) { // Cache the current selection list. WActorNode[] currentSelection = new WActorNode[m_selectionList.Count]; m_selectionList.CopyTo(currentSelection, 0); List <WActorNode> newSelection = new List <WActorNode>(currentSelection); // Now build us a new array depending on the action. if (clearSelection) { newSelection.Clear(); } if (action == SelectionType.Add) { for (int i = 0; i < actors.Length; i++) { if (actors[i] != null) { newSelection.Add(actors[i]); } } } else if (action == SelectionType.Remove) { for (int i = 0; i < actors.Length; i++) { if (actors[i] != null) { newSelection.Remove(actors[i]); } } } WSelectionChangedAction selectionAction = new WSelectionChangedAction(this, currentSelection, newSelection.ToArray(), m_selectionList); m_world.UndoStack.Push(selectionAction); }
public static async void ConvertAndStoreFilesInList(BindingList <FileListItem> fileListItems, string configFileName, string outputFolder = null) { if (isRunning) { return; } isRunning = true; while (fileListItems.Count != 0) { SemaphoreSlim semaphore = new SemaphoreSlim(MaxTask, MaxTask); var fileListItemsClone = new FileListItem[fileListItems.Count]; fileListItems.CopyTo(fileListItemsClone, 0); var tasks = new List <Task>(fileListItemsClone.Length); foreach (var item in fileListItemsClone) { tasks.Add(Task.Run(() => ConvertTask(fileListItems, item, configFileName, outputFolder, semaphore))); } await Task.WhenAll(tasks); } isRunning = false; }
public static void SaveThemes(BindingList<ThemeInfo> themes) { var themesArray = new ThemeInfo[themes.Count - 1 + 1]; themes.CopyTo(themesArray, 0); SaveThemes(themesArray); }
public void CopyTo(T[] array, int index) { _internalList.CopyTo(array, index); }
public override void CopyTo(WordListEntry[] array, int arrayIndex) { list.CopyTo(array, arrayIndex); }
public void CopyTo(T[] array, int arrayIndex) { list.CopyTo(array, arrayIndex); }
public void CopyTo(IClipboardItem[] array, int arrayIndex) { _bindingList.CopyTo(array, arrayIndex); }