private void ResetButton_Click(object sender, RoutedEventArgs e) { RangeSliderHorizontal.SetSelectedRange(0, 100); RangeSliderVertical.SetSelectedRange(0, 100); PlotChart.Model.ResetAllAxes(); PlotChart.InvalidatePlot(true); }
//internal void DrawImage(string imageLocation) //{ // _controller.UpdateSheetWithImage( // //_config.OutputSheetName, // imageLocation // ); //} internal string GetHtmlTable() { // Shaon var tables = _model.GetTableInfoCollection( _model.TableNames, _config.RowInterpolation, _config.ColumnInterpolation); return(PlotChart.CreateSurfaceHTML(CONSTANTS.CONTOUR_MAP_FILE, tables)); }
private void RenderPlotChart(PlotChart plotChart) { ConsoleColor previousForeground = ConsoleAdapter.ForegroundColor; ConsoleAdapter.ForegroundColor = plotChart.PointColor; foreach (var listViewItemsControl in plotChart.Controls.OfType <Image>()) { RenderImage(listViewItemsControl); } ConsoleAdapter.ForegroundColor = previousForeground; }
internal void DrawTables() { var tables = _model.GetTableInfoCollection( _model.TableNames, _config.RowInterpolation, _config.ColumnInterpolation); _controller.UpdateSheetWithTables( tables, _config.OutputSheetName, _config.MaximumItemsPerRow, true); PlotChart.CreateSurfaceHTML(CONSTANTS.CONTOUR_MAP_FILE, tables); }
// Readjust Plot's Minimum/Maximum based on sliders positions. private void RangeSliderVertical_RangeSelectionChanged(object sender, RangeSelectionChangedEventArgs e) { if (PlotChart.Model == null || PriceAxis == null) { return; } var start = RangeSliderVertical.RangeStartSelected; var stop = RangeSliderVertical.RangeStopSelected; PriceAxis.Minimum = PriceAxisDefaultMinimum + (PriceAxisFullRange * start / 100); PriceAxis.Maximum = PriceAxisDefaultMinimum + (PriceAxisFullRange * stop / 100); PlotChart.InvalidatePlot(true); }
protected override void OnShown(EventArgs e) { base.OnShown(e); KeyPreview = true; PlotChart.Update(); if (buyPrices != null) { foreach (KeyValuePair <float, float> kv in buyPrices) { double x = PlotChart.ChartAreas[0].AxisX.ValueToPixelPosition(kv.Key); double y = PlotChart.ChartAreas[0].AxisY.ValueToPixelPosition(kv.Value); Label label = new Label { Text = "B" }; label.BackColor = Color.Transparent; label.Font = new Font("Arial", 14.0f, FontStyle.Bold); label.Location = new Point((int)x, (int)y); label.AutoSize = true; PlotChart.Controls.Add(label); } } if (sellPrices != null) { foreach (KeyValuePair <float, float> kv in sellPrices) { double x = PlotChart.ChartAreas[0].AxisX.ValueToPixelPosition(kv.Key); double y = PlotChart.ChartAreas[0].AxisY.ValueToPixelPosition(kv.Value); Label label = new Label { Text = "S" }; label.BackColor = Color.Transparent; label.Font = new Font("Arial", 14.0f, FontStyle.Bold); label.Location = new Point((int)x, (int)y); label.AutoSize = true; PlotChart.Controls.Add(label); } } }
public override void Initialize() { _menu = new Menu(); var menuButton1 = new MenuItemButton <object>() { Text = "Menu 1", }; menuButton1.AddChild(new MenuItemButton <object>() { Text = "Submenu 1.1" }); _menu.AddChild(menuButton1); var menuButton2 = new MenuItemButton <object>() { Text = "Menu 2", }; menuButton2.AddChild(new MenuItemButton <object>() { Text = "Submenu 2.1" }); menuButton2.AddChild(new MenuItemButton <object>() { Text = "Submenu 2.2" }); _menu.AddChild(menuButton2); Menu = _menu; _checkbox1 = new Checkbox { Location = new Point { Left = 3, Top = 5 }, Text = "Checkbox tentative" }; _checkbox1.CheckedChanged += checkbox1_CheckedChanged; RootPanel.AddChild(_checkbox1); _checkbox2 = new Checkbox { Location = new Point { Left = 3, Top = 7 }, IsChecked = true, Text = "Checkbox checked" }; RootPanel.AddChild(_checkbox2); _checkbox3 = new Checkbox { Location = new Point { Left = 3, Top = 9 }, IsChecked = false, Text = "Checkbox unchecked" }; RootPanel.AddChild(_checkbox3); _checkbox4 = new Checkbox { Location = new Point { Left = 3, Top = 11 }, IsChecked = false, Text = "Checkbox disabled", IsEnabled = false }; RootPanel.AddChild(_checkbox4); _label1 = new Label { Location = new Point { Left = 3, Top = 19 }, Text = "Label" }; RootPanel.AddChild(_label1); _radioButton1 = new RadioButton { Location = new Point { Left = 3, Top = 13 }, Text = "Radio unchecked" }; RootPanel.AddChild(_radioButton1); _radioButton2 = new RadioButton { Location = new Point { Left = 3, Top = 15 }, Text = "Radio checked", IsChecked = true }; RootPanel.AddChild(_radioButton2); _radioButton3 = new RadioButton { Location = new Point { Left = 3, Top = 17 }, Text = "Radio checked", IsChecked = true, IsEnabled = false }; RootPanel.AddChild(_radioButton3); _textBox1 = new TextBox { Location = new Point { Left = 29, Top = 16 } }; _textBox1.TextChanged += textBox1_TextChanged; RootPanel.AddChild(_textBox1); _dateTimeBox1 = new DateTimeBox() { Location = new Point { Left = 29, Top = 18 } }; RootPanel.AddChild(_dateTimeBox1); _numericBox1 = new NumericBox() { Location = new Point { Left = 29, Top = 20 } }; RootPanel.AddChild(_numericBox1); _button1 = new Button { Location = new Point { Left = 3, Top = 22 }, Width = 10 }; _button1.Pressed += button1_Pressed; RootPanel.AddChild(_button1); _button2 = new Button { Location = new Point { Left = 16, Top = 22 }, Width = 10, IsEnabled = false, Text = "Disabled button" }; _button2.Pressed += button2_Pressed; RootPanel.AddChild(_button2); _progressBar1 = new ProgressBar { Location = new Point { Left = 3, Top = 3 }, Width = 74, TextAligment = TitleAligment.Left }; RootPanel.AddChild(_progressBar1); _bnext1 = new Button { Location = new Point { Left = 40, Top = 22 }, Width = 10, Text = "Next 1", Tag = 1 }; _bnext1.Pressed += bNextPressed; RootPanel.AddChild(_bnext1); _bnext2 = new Button { Location = new Point { Left = 51, Top = 22 }, Width = 10, Text = "Next 2", Tag = 2 }; _bnext2.Pressed += bNextPressed; RootPanel.AddChild(_bnext2); _bnext3 = new Button { Location = new Point { Left = 62, Top = 22 }, Width = 10, Text = "Next 3", Tag = 3 }; _bnext3.Pressed += bNextPressed; RootPanel.AddChild(_bnext3); _panel1 = new BorderPanel { Location = new Point { Left = 28, Top = 4 }, Size = new Size { Height = 7, Width = 25 } }; RootPanel.AddChild(_panel1); var subRadiobuton1 = new RadioButton { Location = new Point { Left = 1, Top = 1 } }; _panel1.AddChild(subRadiobuton1); var subRadiobuton2 = new RadioButton { Location = new Point { Left = 1, Top = 3 } }; _panel1.AddChild(subRadiobuton2); var subRadiobuton3 = new RadioButton { Location = new Point { Left = 1, Top = 5 } }; _panel1.AddChild(subRadiobuton3); _comboBox1 = new ComboBox { Location = new Point { Left = 29, Top = 12 }, VisibleItemsCount = 7 }; _comboBox1.Items.AddRange(new[] { new ComboBoxItem() { Key = 1, Text = "EntityFX" }, new ComboBoxItem() { Key = 2, Text = "Green.Dragon" }, new ComboBoxItem() { Key = 3, Text = "Guzalianna" }, new ComboBoxItem() { Key = 4, Text = "Prozz" }, new ComboBoxItem() { Key = 5, Text = "Aik2029" }, new ComboBoxItem() { Key = 6, Text = "Zombie" }, new ComboBoxItem() { Key = 7, Text = "Wesker" }, new ComboBoxItem() { Key = 8, Text = "Perez" }, new ComboBoxItem() { Key = 9, Text = "Chuvak" }, new ComboBoxItem() { Key = 10, Text = "Magistr" }, new ComboBoxItem() { Key = 11, Text = "Mad" }, new ComboBoxItem() { Key = 12, Text = "XOBAH" } }); RootPanel.AddChild(_comboBox1); RootPanel.AddChild(new Checkbox { Location = new Point { Left = 29, Top = 14 }, Text = "Checkbox for overlapp" }); _image = Image.FromString( @"───▄▄▄ ─▄▀░▄░▀▄ ─█░█▄▀░█ ─█░▀▄▄▀█▄█▄▀ ▄▄█▄▄▄▄███▀ "); _image.Location = new Point() { Left = 55, Top = 4 }; RootPanel.AddChild(_image); _plotChart = new PlotChart() { Size = new Size() { Height = 10, Width = 30 }, Location = new Point() { Left = 48, Top = 11 }, PlotSymbol = ':' }; _plotChart.Points = GenerateSinChartPoints(_plotChart.Size, 7); RootPanel.AddChild(_plotChart); StatusStrip = new StatusStrip(); StatusStrip.AddChild(new StatusStripLabel { Text = "Item 1" }); StatusStrip.AddChild(new StatusStripLabel { Text = "Item 2" }); _timeStripItem = new StatusStripLabel { Text = "Item 3", ItemLocation = ItemLocationEnum.Right }; StatusStrip.AddChild(_timeStripItem); StatusStrip.AddChild(new StatusStripLabel { Text = "Item 4", ItemLocation = ItemLocationEnum.Right }); StatusStrip.AddChild(new StatusStripButton { Text = "But 1", ItemLocation = ItemLocationEnum.Left }); StatusStrip.AddChild(new StatusStripButton { Text = "But 2", ItemLocation = ItemLocationEnum.Left }); _statusStripProgressBar = new StatusStripProgressBar { Text = "P: {0}", Width = 14, Minimum = 0, Value = 16, Maximum = 25 }; StatusStrip.AddChild(_statusStripProgressBar); Initializetable(); _timer.Elapsed += timer_Elapsed; _timer.Start(); _timer2.Elapsed += _timer2_Elapsed; _timer2.Start(); }