public void AddRange(float[] data, int sn, Dispers disp) { SpAtlasPixel[] data_hi = new SpAtlasPixel[data.Length * 10]; for (int pixel = 0; pixel < data.Length - 1; pixel++) { float ly_from = (float)disp.GetLyByLocalPixel(sn, 0); float val_from = data[0]; float ly_to = (float)disp.GetLyByLocalPixel(sn, data.Length - 1); float val_to = data[data.Length - 1]; int from = pixel * 10; //for(data_hi) } int insert_into = 0; if (PixelList.Count > 0) { float ly_from = (float)disp.GetLyByLocalPixel(sn, 0); float ly_to = (float)disp.GetLyByLocalPixel(sn, data.Length - 1); if (ly_from > PixelList[PixelList.Count - 1].Ly || ly_to < PixelList[0].Ly) { Load(); throw new Exception("Нельзя создать атлаc с разрывами..."); } if (ly_from < PixelList[0].Ly) { while (PixelList.Count > 0 && PixelList[0].Ly < ly_to) { PixelList.RemoveAt(0); } } else { for (; insert_into < PixelList.Count && PixelList[insert_into].Ly < ly_from; insert_into++) { ; } if (ly_to > PixelList[PixelList.Count - 1].Ly) { PixelList.RemoveRange(insert_into, PixelList.Count - insert_into); } else { } } return; } for (int pixel = 0; pixel < data.Length; pixel++) { PixelList.Insert(insert_into, new SpAtlasPixel((float)disp.GetLyByLocalPixel(sn, pixel), data[pixel])); } }
public LDbQuery() { InitializeComponent(); Common.Reg(this, "LDbQu"); ESelector.SelectorListener += new ElementSelectorAction(ElSelListener); DialogResult = DialogResult.Cancel; Common.SetupFont(this);//Font = Common.GetDefaultFont(Font); IntensTypeCbx.SelectedIndex = Common.Env.DefaultLineDb; Spectr sp = SpectroWizard.gui.tasks.TaskCheckDev.getLinkingMatrixSpectr(); Dispers disp = sp.GetDispers(); LyFromFld.Value = (decimal)disp.GetLyByLocalPixel(0, 0); int[] ss = disp.GetSensorSizes(); LyToFld.Value = (decimal)disp.GetLyByLocalPixel(ss.Length - 1, ss[ss.Length - 1]); }