public MainWindow() { InitializeComponent(); _selector = new AdaptiveSelector.AdaptiveSelector(new MaintainMethod(), ""); matrixControl.SetMatrix(_selector.GetMatrix()); }
private Boolean _readyToSendItems = true;//default to true so we always send the first scheduled item public MainWindow() { _items = new Dictionary<string, T_Item>(); _ptItems = new Dictionary<string, T_Item>(); _timelineEvents = new ScheduledItemsList(); _dmCPEs = new Dictionary<string, CPEPair>(); _ddd = new DDDAdapter(); _ddd.SetTickCallback(new DDDAdapter.TimeTickDelegate(TimeTick)); InitializeComponent(); LoadCommandLineArgs(); tbHostname.Text = _dddHostname; tbPort.Text = _dddPort.ToString(); tbShareName.Text = _dddShare; _itemSelector = new AdaptiveSelector.AdaptiveSelector(new ChallengeMethod(), ""); }
private Boolean _readyToSendItems = true;//default to true so we always send the first scheduled item public MainWindow() { _items = new Dictionary <string, T_Item>(); _ptItems = new Dictionary <string, T_Item>(); _timelineEvents = new ScheduledItemsList(); _dmCPEs = new Dictionary <string, CPEPair>(); _ddd = new DDDAdapter(); _ddd.SetTickCallback(new DDDAdapter.TimeTickDelegate(TimeTick)); InitializeComponent(); LoadCommandLineArgs(); tbHostname.Text = _dddHostname; tbPort.Text = _dddPort.ToString(); tbShareName.Text = _dddShare; _itemSelector = new AdaptiveSelector.AdaptiveSelector(new ChallengeMethod(), ""); }
internal void SetMatrix(AdaptiveSelector.CpeMatrix cpeMatrix) { labelBlank.Visibility = System.Windows.Visibility.Collapsed; int cols = cpeMatrix.GetColumnCount(); int rows = cpeMatrix.GetRowCount(); double colWidth = this.Width / (cols - 1); double rowHeight = this.Height / (rows - 1); ColumnDefinition cd; RowDefinition rd; for (int x = 0; x < cols; x++) { cd = new ColumnDefinition(); cd.Width = new GridLength(colWidth, GridUnitType.Star); mainGrid.ColumnDefinitions.Add(cd); } for (int x = 0; x < rows; x++) { rd = new RowDefinition(); rd.Height = new GridLength(rowHeight, GridUnitType.Star); mainGrid.RowDefinitions.Add(rd); } SingleItemBox box; CellRange c; for (int y = 0; y < rows; y++) { for (int x = 0; x < cols; x++) { c = cpeMatrix.GetCellByIndex(y, x); Console.WriteLine(String.Format("Making item '{0}' at x={1};y={2};", c.CellNumber,x,y)); box = new SingleItemBox(c); box.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; box.VerticalAlignment = System.Windows.VerticalAlignment.Stretch; box.Name = "box_" + c.CellNumber; Grid.SetColumn(box, x); Grid.SetRow(box, y); _workaround[c.CellNumber] = box; mainGrid.Children.Add(box); } } }
public MainWindow() { InitializeComponent(); _selector = new AdaptiveSelector.AdaptiveSelector(new MaintainMethod(), ""); matrixControl.SetMatrix(_selector.GetMatrix()); }