コード例 #1
0
        public TireDataViewerProperty(MultiTireDataViewer viewer)
        {
            InitializeComponent();
            Viewer = viewer;
            Reload();
            foreach (var s in Viewer.GetLegents())
            {
                try
                {
                    var raw = new SeriesEditor(Viewer, s, DataSourceList);
                    if (raw.Initialized)
                    {
                        raw.Dock = DockStyle.Top;

                        DataSourceList.Controls.Add(raw);
                        raw.Click += SeriesEditor_Click;
                        DataSourceList.Controls.SetChildIndex(raw, 0);
                    }
                }
                catch (Exception e)
                {
                    Log.Output(e.Message);
                }
            }
        }
コード例 #2
0
        public MFGraphDialog(MultiTireDataViewer viewer, string ID)
        {
            Viewer = viewer;
            InitializeComponent();
            Editor          = new SeriesEditor(Viewer, ID);
            Editor.Location = new Point(12, 38);
            this.Controls.Add(Editor);

            var args = Viewer.GetArguments(ID)[0];

            SATB.Text = args.SA.ToString();
            SRTB.Text = args.SR.ToString();
            FZTB.Text = args.FZ.ToString();
            IATB.Text = args.IA.ToString();
            PTB.Text  = args.P.ToString();
            TTB.Text  = args.T.ToString();
            foreach (Table t in Enum.GetValues(typeof(Table)))
            {
                if (t == Table.None)
                {
                    continue;
                }
                if (t == Table.StaticTable)
                {
                    continue;
                }
                TableCB.Items.Add(t);
            }
            TableCB.SelectedItem = Table.CorneringTable;
            InitSourceList();
            init = false;
        }
コード例 #3
0
        private void AddRaw(SeriesEditor raw)
        {
            raw.Dock = DockStyle.Top;
            DataSourceList.Controls.Add(raw);
            if (DataSourceList.Controls.Count - 2 < ColorList.Count)
            {
                raw.SetColor(ColorList[DataSourceList.Controls.Count - 2]);
            }
            raw.Click += SeriesEditor_Click;

            DataSourceList.Controls.SetChildIndex(raw, 0);
        }
コード例 #4
0
        private void CopyButton_Click(object sender, EventArgs e)
        {
            var controls = new Control[DataSourceList.Controls.Count];

            DataSourceList.Controls.CopyTo(controls, 0);
            foreach (var raw in controls)
            {
                var se = raw as SeriesEditor;
                if (se != null && se.Selected && se.Initialized && se.IsMagicFormula)
                {
                    var newraw = new SeriesEditor(se, getNewSurfix());
                    AddRaw(newraw);
                    newraw.Replot();
                }
            }
        }
コード例 #5
0
        private void AddButton_Click(object sender, EventArgs e)
        {
            if (ProjectManager.ProjectNode == null)
            {
                MessageBox.Show("プロジェクトが読み込まれていません");
                return;
            }

            int i = getNewSurfix();



            var raw = new SeriesEditor(Viewer, i, DataSourceList);

            AddRaw(raw);
        }
コード例 #6
0
        public SeriesEditor(SeriesEditor other, int surf)
            : this(other.Viewer, surf, other.Owner)
        {
            init = true;
            string[] stArrayData = other.ID.Split('_');

            ID = suffix.ToString("000") + "_" + stArrayData[1];
            InitSourceList();
            Reload(other.ID);
            if (Args == null)
            {
                Args = new MagicFormulaArguments(0, 0, 1000, 0, 75, 50);
            }
            ShowCB.Checked = Viewer.GetEnable(other.ID);
            init           = false;
        }