예제 #1
0
        private void frmTradeBook_Load(object sender, EventArgs e)
        {
            //if (Settings.Default.Window_LocationTBook != null)
            //{
            //    this.Location = Settings.Default.Window_LocationTBook;
            //}

            //// Set window size
            //if (Settings.Default.WindowS_izeTBook != null)
            //{
            //    this.Size = Settings.Default.WindowS_izeTBook;
            //}

            var AbbA = frmTradeBook.LoadFormLocationAndSize(this);

            this.Location = new Point(AbbA[0], AbbA[1]);
            this.Size     = new Size(AbbA[2], AbbA[3]);

            this.FormClosing += new FormClosingEventHandler(SaveFormLocationAndSize);


            load_data();
            Type         controlType = DGV.GetType();
            PropertyInfo pi          = controlType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);

            pi.SetValue(DGV, true, null);
            //  DGV.Columns["LOGTIME"].SortMode = DataGridViewColumnSortMode.NotSortable;
            profile_load();
        }
예제 #2
0
        private void Trade_Tracker_Load(object sender, EventArgs e)
        {
            //DataRow dr2 = Global.Instance.TradeTracker.NewRow();


            //dr2["PF_ID"] = "PF_ID";

            //dr2["B/S"] = "B/S";
            //dr2["QTY"] = "QTY";

            //dr2["ACTUALPRICE"] = Convert.ToString("ACTUALPRICE");

            //dr2["GIVENPRICEBUY"] = "GIVENPRICEBUY";
            //dr2["GIVENPRICESELL"] = "GIVENPRICESELL";

            //dr2["SYMBOL"] = "SYMBOL";
            //dr2["TIME"] = "TIME";
            //dr2["Unique_id"] = "Unique_id";
            //Global.Instance.TradeTracker.Rows.Add(dr2);
            //==========================


            //========================


            //   DGV.ScrollBars = ScrollBars.Vertical;


            //Global.Instance.TradeTracker.Clear();
            DataSet ds = new DataSet();

            if (File.Exists(Application.StartupPath + Path.DirectorySeparatorChar + System.DateTime.Now.Date.ToString("dddd, MMMM d, yyyy") + "tradetrack.xml"))
            {
                ds.ReadXml(Application.StartupPath + Path.DirectorySeparatorChar + System.DateTime.Now.Date.ToString("dddd, MMMM d, yyyy") + "tradetrack.xml");
                Global.Instance.TradeTracker = ds.Tables[0];
            }
            DataView dv = Global.Instance.TradeTracker.AsEnumerable().AsDataView();

            DGV.DataSource = dv;

            DataGridViewColumnSelector cs = new DataGridViewColumnSelector(DGV);

            cs.MaxHeight = 200;
            cs.Width     = 150;

            Type         controlType = DGV.GetType();
            PropertyInfo pi          = controlType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);

            pi.SetValue(DGV, true, null);



            //Trade_Tracker.Instance.DGV.Refresh();
        }
예제 #3
0
        public frmMeasureParams()
        {
            InitializeComponent();

            cmbxGenMode.SelectedIndex             = 0;
            cmbxMonitorChannel.SelectedIndex      = 0;
            cmbxCorrectionImpedance.SelectedIndex = 0;
            UpdateTemplateList();

            m_MinFreq = -1;
            m_MaxFreq = -1;

            System.Reflection.BindingFlags bFlags = System.Reflection.BindingFlags.Instance |
                                                    System.Reflection.BindingFlags.NonPublic;
            DGV.GetType().GetProperty("DoubleBuffered", bFlags).SetValue(DGV, true, null);
        }
        private void frmNetBook_Load(object sender, EventArgs e)
        {
            //if (Settings.Default.Window_LocationNBook != null)
            //{
            //    this.Location = Settings.Default.Window_LocationNBook;
            //}

            //// Set window size
            //if (Settings.Default.Window_SizeNBook != null)
            //{
            //    this.Size = Settings.Default.Window_SizeNBook;
            //}
            var AbbA = LoadFormLocationAndSize(this);

            this.Location = new Point(AbbA[0], AbbA[1]);
            this.Size     = new Size(AbbA[2], AbbA[3]);

            this.FormClosing += new FormClosingEventHandler(SaveFormLocationAndSize);
            DataTable netbooks            = new DataTable();
            DataGridViewColumnSelector cs = new DataGridViewColumnSelector(DGV);

            cs.MaxHeight   = 200;
            cs.Width       = 150;
            DGV.DataSource = Global.Instance.NetBookTable;

            netposion(1, 1, 1, 1, 1);
            this.DGV.Columns["SellAvg"].DefaultCellStyle.Format = "0.##";
            this.DGV.Columns["NetQty"].DefaultCellStyle.Format  = "0.##";
            // this.DGV.Columns["SellQty"].DefaultCellStyle.Format = "0.0##";
            this.DGV.Columns["BuyAvg"].DefaultCellStyle.Format   = "0.##";
            this.DGV.Columns["NetValue"].DefaultCellStyle.Format = "0.##";
            // this.DGV.Columns["BEP"].DefaultCellStyle.Format = "0.##";


            //DataGridViewColumnSelector cs = new DataGridViewColumnSelector(DGV);
            //cs.MaxHeight = 200;
            //cs.Width = 150;

            Type         controlType = DGV.GetType();
            PropertyInfo pi          = controlType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);

            pi.SetValue(DGV, true, null);
        }