/// <summary> /// 发布报价 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void rmiPostQuote_Click(object sender, EventArgs e) { if (m_publishForm != null && m_publishForm.DockState != DockState.Hidden) { this.radDock1.FloatWindow(m_publishForm); //this.radDock1.DockWindow(m_publishForm, DockPosition.Bottom); } else { m_publishForm = new PublishForm("供需发布"); m_publishForm.Initialize(); this.radDock1.DockWindow(m_publishForm, DockPosition.Bottom); this.radDock1.FloatWindow(m_publishForm); } }
/// <summary> /// 第一列供需发布按钮 /// </summary> protected override void SupplyAndDemandClick() { if (DataManager.Instance.IsLogin) { //PublishControl1.Initialize(); //this.panel1.Visible = true; publishForm = new PublishForm(); publishForm.Initialize(); publishForm.Show(); //this.panel1.Visible = true; } else { btns5.SetChoose(0); MessageBox.Show("请登录!"); } }
private PublishForm m_publishForm; //供需发布窗口 public MainForm() { InitializeComponent(); this.MaximizedBounds = Screen.PrimaryScreen.WorkingArea; this.radDock1.ShowDocumentCloseButton = true; this.radDock1.DocumentManager.DocumentCloseActivation = DocumentCloseActivation.FirstInZOrder; #region 滚动新闻栏 mScrollingText = new MScrollingText(); mScrollingText.Dock = DockStyle.Fill; mScrollingText.Cursor = Cursors.Hand; mScrollingText.Font = new Font("微软雅黑", 14F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0))); mScrollingText.ForeColor = Color.White; mScrollingText.Location = new Point(0, 0); mScrollingText.Name = "mScrollingText"; mScrollingText.ScrollText = "滚动新闻"; mScrollingText.Size = new Size(462, 65); mScrollingText.Text = "mScrollingText"; mScrollingText.TextScrollDistance = 2; mScrollingText.TextClicked += new Action <MScrollingItem>(MScrollingText_TextClicked); panel2.Controls.Add(mScrollingText); for (int i = 0; i < 30; i++) { MScrollingItem item = new MScrollingItem(); item.Text = "滚动新闻" + i; mScrollingText.Items.Add(item); } #endregion //CreatePanel("Tool Window", DockPosition.Right, new Size(this.Width / 2, this.Height / 2), Color.FromArgb(255, 192, 192)); //CreatePanel("Tool Window", DockPosition.Top, new Size(this.Width / 2, this.Height / 2), Color.FromArgb(192, 255, 192)); if (File.Exists("default.xml")) { radDock1.LoadFromXml("default.xml"); } else { PublishForm windows1 = new PublishForm("供需发布"); windows1.Initialize(); this.radDock1.DockWindow(windows1, DockPosition.Bottom); this.radDock1.AutoHideWindow(windows1); FormBrowser docWindow5 = new FormBrowser("数据中心"); this.radDock1.AddDocument(docWindow5); FormBrowser docWindow6 = new FormBrowser("资讯"); this.radDock1.AddDocument(docWindow6); FormKLine docWindow4 = new FormKLine("K线"); this.radDock1.AddDocument(docWindow4); FormBrowser docWindow2 = new FormBrowser("资金管理"); this.radDock1.AddDocument(docWindow2); FormBrowser docWindow3 = new FormBrowser("基础管理"); this.radDock1.AddDocument(docWindow3); MUseMainForm docWindow1 = new MUseMainForm("行情"); this.radDock1.AddDocument(docWindow1); } foreach (DocumentWindow v in this.radDock1.DockWindows.DocumentWindows) { if (v.Text == "行情") { table = v as MUseMainForm; if (table != null) { table.SelectTextChangeEvent += new Action <object, string>(Table_SelectTextChangeEvent); } } else if (v.Text == "资金管理") { fbMoney = v as FormBrowser; } else if (v.Text == "基础管理") { fbBase = v as FormBrowser; } else if (v.Text == "数据中心") { fbDataCenter = v as FormBrowser; } else if (v.Text == "资讯") { fbInformation = v as FormBrowser; } else if (v is FormKLine) { fl = v as FormKLine; } } foreach (ToolWindow v in this.radDock1.DockWindows.ToolWindows) { if (v.Text == "供需发布") { m_publishForm = v as PublishForm; } } ThemeResolutionService.ApplyThemeToControlTree(this, Program.vt1.ThemeName); DataManager.Instance.IsLoginingEvent += Instance_IsLoginingEvent; DataManager.Instance.IsLoginEvent += Instance_IsLoginEvent; DataManager.Instance.UpdataCommodityInfoEvent += Instance_UpdataCommodityInfoEvent; DataManager.Instance.UpdataAllContractEvent += Instance_UpdataAllContractEvent; DataManager.Instance.UpdataAllCommodityEvent += Instance_UpdataAllCommodityEvent; USeManager.Instance.MQTTService.UpdataMarketDataEvent += MQTTService_UpdataMarketDataEvent; //初始化数据 //DataManager.Instance.InitializationData(); //USeManager.Instance.Start(); if (fbDataCenter != null) { fbDataCenter.InitializeBrowser(); } if (fbInformation != null) { fbInformation.InitializeBrowser(); } }
private void Form1_Load(object sender, EventArgs e) { Logger.LogInfo("初始化界面开始!"); Initialize(); Logger.LogInfo("初始化界面结束!"); DataManager.Instance.IsLoginingEvent += Instance_IsLoginingEvent; DataManager.Instance.IsLoginEvent += Instance_IsLoginEvent; DataManager.Instance.UpdataCommodityInfoEvent += Instance_UpdataCommodityInfoEvent; DataManager.Instance.UpdataAllContractEvent += Instance_UpdataAllContractEvent; DataManager.Instance.UpdataAllCommodityEvent += Instance_UpdataAllCommodityEvent; //初始化数据 DataManager.Instance.InitializationData(); USeManager.Instance.Start(); USeManager.Instance.MQTTService.UpdataMarketDataEvent += MQTTService_UpdataMarketDataEvent; table.MouseRightUpEvent += Table_MouseRightUpEvent; table.MouseLeftUpEvent += Table_MouseLeftUpEvent; Logger.LogInfo("初始化供需发布!"); //PublishControl1 = new PublishControl(); //PublishControl1.Dock = DockStyle.Fill; //PublishControl1.Location = new Point(0, 0); //PublishControl1.Name = "PublishControl1"; //PublishControl1.Size = new Size(1487, 409); //PublishControl1.TabIndex = 0; //panel1.Controls.Add(PublishControl1); //PublishControl1.DisposeFormEvent += PublishControl_Dispose; #region Form publishForm = new PublishForm(); publishForm.Dock = DockStyle.Fill; publishForm.Location = new Point(0, 0); publishForm.Name = "PublishForm"; //publishForm.Size = new Size(1487, 409); publishForm.TabIndex = 0; //panel1.Controls.Add(publishForm); #endregion m_form = new DelistBrandForm(); m_form.StartPosition = FormStartPosition.Manual; m_form.OnDelistSuccessEvent += OnDelistSuccessChangedEvent; Logger.LogInfo("创建登录界面!"); LoginFm = new FormLogin();//登录2 LoginFm.TopMost = true; LoginFm.Show(); Logger.LogInfo("初始化内置浏览器!"); //初始化仓库页面 fh = new FormHouse(); //资金 this.panel3.Location = new Point(0, 40); this.panel3.Width = this.Width; this.panel3.Height = this.Height - 40 - 30; wk1 = new BsCtl(this.panel3, Helper.GetURL(HTTPServiceUrlCollection.History), "capital"); //基础管理 this.panel4.Location = new Point(0, 40); this.panel4.Width = this.Width; this.panel4.Height = this.Height - 40 - 30; wk2 = new BsCtl(this.panel4, Helper.GetURL(HTTPServiceUrlCollection.BasicManagement), "capital"); }