private void Start() { canvas = GetComponentInParent <Canvas>(); fish = GetComponentInChildren <UI_Fish>(); ddr = GetComponentInChildren <DDR>(); originalFishY = fish.fishCenter.y; }
public void Dispose() { _service = null; _mockDDRRepo = null; _mockComponentRepo = null; _win32PhysicalMemory1 = null; _win32PhysicalMemory2 = null; _win32PhysicalMemory3 = null; _win32PhysicalMemories = null; _ddr1 = null; _ddr2 = null; _ddr3 = null; _ddrs = null; GC.SuppressFinalize(this); }
public static DDR From(Win32_PhysicalMemory win32PhysicalMemory) { var output = new DDR(); output.Capacity = win32PhysicalMemory.Capacity.HasValue ? (double)win32PhysicalMemory.Capacity.Value / Constants.Gibibyte : double.NaN; output.Clocking = win32PhysicalMemory.ConfiguredClockSpeed.HasValue ? (int)win32PhysicalMemory.ConfiguredClockSpeed.Value : Constants.DefaultNumericValue; output.FormFactor = FormFactorDecoder.Decode(win32PhysicalMemory.FormFactor ?? 0); output.Vendor = string.IsNullOrWhiteSpace(win32PhysicalMemory.Manufacturer) ? "Unknown manufacturer" : win32PhysicalMemory.Manufacturer; return(output); }
private void SetupData() { _win32PhysicalMemoryException = false; _ddrException = false; _win32PhysicalMemory1 = new Win32_PhysicalMemory { Capacity = 8589934592, ConfiguredClockSpeed = 1000, FormFactor = 1, Manufacturer = "Manufacturer1" }; _win32PhysicalMemory2 = new Win32_PhysicalMemory { Capacity = 8589934592, ConfiguredClockSpeed = 2000, FormFactor = 2, Manufacturer = "Manufacturer2" }; _win32PhysicalMemory3 = new Win32_PhysicalMemory { Capacity = 17179869184, ConfiguredClockSpeed = 3000, FormFactor = 3, Manufacturer = "Manufacturer3" }; _win32PhysicalMemories = new List <Win32_PhysicalMemory> { _win32PhysicalMemory1, _win32PhysicalMemory2, _win32PhysicalMemory3 }; _ddr1 = new DDR { ID = 1, Deleted = true, SetID = new Guid(new string('0', 32)), Capacity = 1, Clocking = 1, FormFactor = "FormFactor1", Vendor = "Manufacturer1" }; _ddr2 = new DDR { ID = 2, Deleted = false, SetID = new Guid(new string('0', 32)), Capacity = 2, Clocking = 2, FormFactor = "FormFactor2", Vendor = "Manufacturer2" }; _ddr3 = new DDR { ID = 3, Deleted = false, SetID = new Guid(new string('0', 31) + "1"), Capacity = 3, Clocking = 3, FormFactor = "FormFactor3", Vendor = "Manufacturer3" }; _ddrs = new List <DDR> { _ddr1, _ddr2, _ddr3 }; }
private void Delete_click(object sender, RoutedEventArgs e) { /// if (DD.Visibility == Visibility.Visible) { #region DataGrid #1 DD.BeginSelection(); string index = ""; var acc = new Assest.OrcDataAcess(); int counting = 0; foreach (int handle in DD.GetSelectedRowHandles()) { if (counting == 0) { MessageBoxResult a = DXMessageBox.Show("سيتم حذف جميع الفواتير المحدد عليها, هل ترغب بمواصلة العملية؟", "تنبيه", MessageBoxButton.YesNo, MessageBoxImage.Information); switch (a) { case MessageBoxResult.None: break; case MessageBoxResult.OK: { break; } case MessageBoxResult.Cancel: break; case MessageBoxResult.Yes: { index = (string)DD.GetCellValue(handle, "id"); acc.Delete3(index); break; } case MessageBoxResult.No: break; default: break; } } else if (counting >= 1) { index = (string)DD.GetCellValue(handle, "id"); acc.Delete3(index); } counting++; } if (counting == 0) { MessageBoxResult a = DXMessageBox.Show("سيتم حذف جميع الفواتير, هل ترغب بمواصلة العملية؟", "تنبيه", MessageBoxButton.YesNo, MessageBoxImage.Information); switch (a) { case MessageBoxResult.None: break; case MessageBoxResult.OK: { break; } case MessageBoxResult.Cancel: break; case MessageBoxResult.Yes: { acc.Delete3(); break; } case MessageBoxResult.No: break; default: break; } } DD.EndSelection(); var datatablee = new DataTable(); show.show3(datatablee); System.Windows.Forms.BindingSource BindS = new System.Windows.Forms.BindingSource(); BindS.DataSource = datatablee; DD.ItemsSource = BindS; Resultpri.Text = Fos.sumPrice(); Resultpri_a.Text = Fos.sumPrice_a(); #endregion } else if (DDR.Visibility == Visibility.Visible) { #region Datagrid #2 DDR.BeginSelection(); var listU = new List <string>(); listU = SaveDelete(); string iindex = ""; int countingg = 0; var megav = new ModelMega(); foreach (int handle in DDR.GetSelectedRowHandles()) { if (countingg == 0) { MessageBoxResult a = DXMessageBox.Show("سيتم حذف جميع البيانات المحدد عليها, هل ترغب بمواصلة العملية؟", "تنبيه", MessageBoxButton.YesNo, MessageBoxImage.Information); switch (a) { case MessageBoxResult.None: break; case MessageBoxResult.OK: { break; } case MessageBoxResult.Cancel: break; case MessageBoxResult.Yes: { iindex = (string)DDR.GetCellValue(handle, "رمز المنتج"); megav.Delete(iindex); break; } case MessageBoxResult.No: break; default: break; } } else if (countingg >= 1) { iindex = (string)DDR.GetCellValue(handle, "رمز المنتج"); megav.Delete(iindex); } countingg++; } if (countingg == 0) { MessageBoxResult a = DXMessageBox.Show("سيتم حذف جميع البيانات, هل ترغب بمواصلة العملية؟", "تنبيه", MessageBoxButton.YesNo, MessageBoxImage.Information); switch (a) { case MessageBoxResult.None: break; case MessageBoxResult.OK: { break; } case MessageBoxResult.Cancel: break; case MessageBoxResult.Yes: { ///Need To Fix_+_+_+_+__++_+_+__+_+_++_+_+_+__+_+__+_ megav.Delete(); break; } case MessageBoxResult.No: break; default: break; } } DDR.EndSelection(); var obr = new ObservableCollectionCore <Models.RepairView>(); var megaView = new MegaView(); foreach (DataRow item in megaView.GetAllItemsHasSold().Rows) { obr.Add(new Models.RepairView() { ID = item.Field <string>("ID"), conprou = item.Field <string>("conprou"), PRICE = item.Field <string>("PRICE"), DAT = item.Field <string>("DAT"), NAME = item.Field <string>("NAME"), datrec = item.Field <string>("datrec"), discounts = item.Field <string>("discounts"), typeprou = item.Field <string>("typeprou"), isdone = (item.Field <Int64>("isdone") == -1?true:false) }); } DDR.ItemsSource = obr; Resultpri_a.Text = Fos.sumPrice_a(); #endregion } }