2023-05-11 21:49:03 +00:00
|
|
|
#![allow(non_snake_case)]
|
|
|
|
mod components;
|
2023-05-12 00:47:31 +00:00
|
|
|
mod data;
|
2023-05-11 21:49:03 +00:00
|
|
|
|
2023-05-21 16:45:12 +00:00
|
|
|
use components::main_window::MainWindow;
|
2023-06-01 17:04:03 +00:00
|
|
|
use yew::prelude::*;
|
2023-05-11 21:49:03 +00:00
|
|
|
|
2023-05-12 20:38:14 +00:00
|
|
|
#[cfg(debug_assertions)]
|
|
|
|
use data::*;
|
|
|
|
|
2023-05-22 15:26:08 +00:00
|
|
|
#[function_component]
|
|
|
|
pub fn App() -> Html {
|
|
|
|
html! {
|
|
|
|
<MainWindow />
|
|
|
|
}
|
2023-05-11 21:49:03 +00:00
|
|
|
}
|
2023-05-12 20:38:14 +00:00
|
|
|
|
2023-05-22 01:47:29 +00:00
|
|
|
#[cfg(debug_assertions)]
|
2023-05-12 20:38:14 +00:00
|
|
|
pub fn plate_test() {
|
|
|
|
let source = plate::Plate::new(plate::PlateType::Source, plate::PlateFormat::W96);
|
2023-05-13 23:13:03 +00:00
|
|
|
let destination = plate::Plate::new(plate::PlateType::Destination, plate::PlateFormat::W384);
|
2023-05-12 20:38:14 +00:00
|
|
|
|
|
|
|
let transfer = transfer_region::TransferRegion {
|
2023-05-22 22:11:49 +00:00
|
|
|
source_plate: source,
|
2023-05-21 01:29:21 +00:00
|
|
|
source_region: transfer_region::Region::Rect((1, 1), (2, 2)),
|
2023-05-22 22:11:49 +00:00
|
|
|
dest_plate: destination,
|
2023-06-01 17:04:03 +00:00
|
|
|
dest_region: transfer_region::Region::Rect((2, 2), (11, 11)),
|
|
|
|
interleave_source: (1, 1),
|
|
|
|
interleave_dest: (3, 3),
|
2023-05-12 20:38:14 +00:00
|
|
|
};
|
2023-05-13 00:25:21 +00:00
|
|
|
println!("{}", transfer);
|
2023-05-21 01:29:21 +00:00
|
|
|
let sws = transfer.get_source_wells();
|
|
|
|
let m = transfer.calculate_map();
|
|
|
|
for w in sws {
|
2023-06-01 17:04:03 +00:00
|
|
|
println!("{:?} -> {:?}", w, m(w));
|
2023-05-21 01:29:21 +00:00
|
|
|
}
|
2023-05-12 20:38:14 +00:00
|
|
|
}
|