private void ListView_SwipeEnded(object sender, Syncfusion.ListView.XForms.SwipeEndedEventArgs e) { if (e.SwipeOffset >= 100) { AssList.ResetSwipe(); Asses.RemoveAt(e.ItemIndex); AssList.ItemsSource = Asses; UpdateOverallScore(); } }
//get asset name form list protected void GetAssetName() { var item = AssList.FirstOrDefault(i => i.ID == AssID); if (item != null) { AssitName = item.Text; } else { AssitName = "Not Exist"; } }
public Form1() { InitializeComponent(); // Load all plugins into ToolStrip items. DirectoryInfo di = new DirectoryInfo(Directory.GetCurrentDirectory() + @"\plugins\"); di.GetFiles("*.dll"); foreach (FileInfo f in di.GetFiles("*.dll")) { AssList.Add(AssemblyName.GetAssemblyName(f.FullName)); ToolStripMenuItem item = new ToolStripMenuItem(AssList.Last().Name, null, LoadAssembly, AssList.Last().Name); pluginToolStripMenuItem.DropDownItems.Add(item); } // Set Label and Button Text for winners. ListViewSetGUI(); // Show/Hide Advanced options GUI. AdvancedToolStripMenuItem_Click(null, null); // Set PowerType and Trackbar label. TrackBar1_Scroll(null, null); // Set random color for button4. button4.BackColor = ColorRandom(); // Disabled Buttons not initially needed. ButtonStates(false); // Update count above ListViews. (initially 0) UpdateEntryCount(); // Load previous session if SessionFile exists. if (File.Exists(SessionFile)) { autoSaveRestoreToolStripMenuItem.Checked = true; RestoreSessionFile(SessionFile); } }
}// Clear assembly settings and dispose of plugin private void LoadAssembly(object sender, EventArgs e) { Assembly assembly = Assembly.Load(AssList.FirstOrDefault(x => x.Name == ((ToolStripMenuItem)sender).Name)); ClearAssembly(); label3.Visible = false; label8.Visible = false; ButtonStates(true); Instance = new MyReflection(pluginBG, assembly).Instance; Instance.ToolProperties.ForceUniqueEntryColors.SetValue(Instance.ToolPropertiesObj, true); Instance.ToolProperties.ArrowPosition.SetValue(Instance.ToolPropertiesObj, (int)ArrowLocation.Left); Instance.ToolProperties.TextToShow.SetValue(Instance.ToolPropertiesObj, (int)TextType.Name); Instance.ToolProperties.AnimationSpeed.SetValue(Instance.ToolPropertiesObj, 0.08f); Instance.ToolProperties.AnimationSpeedBoost.SetValue(Instance.ToolPropertiesObj, checkBox2.Checked); Instance.Properties.AllowExceptions.SetValue(Instance.iRandomInstance, false); UpdateEntryList(); Instance.Methods.Draw.Invoke(Instance.iRandomInstance, new object[] { 15, 6, 150 }); }// Load Assembly and initial settings.