Пример #1
0
        public DockPanel()
        {
            m_focusManager = new FocusManagerImpl(this);
            m_extender = new DockPanelExtender(this);
            m_panes = new DockPaneCollection();
            m_floatWindows = new FloatWindowCollection();

            SuspendLayout();

            m_autoHideWindow = new AutoHideWindowControl(this);
            m_autoHideWindow.Visible = false;
            SetAutoHideWindowParent();

            m_dummyControl = new DummyControl();
            m_dummyControl.Bounds = new Rectangle(0, 0, 1, 1);
            Controls.Add(m_dummyControl);

            m_dockWindows = new DockWindowCollection(this);
            Controls.AddRange(new Control[]	{
				DockWindows[DockState.Document],
				DockWindows[DockState.DockLeft],
				DockWindows[DockState.DockRight],
				DockWindows[DockState.DockTop],
				DockWindows[DockState.DockBottom]
				});

            m_dummyContent = new DockContent();
            ResumeLayout();
        }
Пример #2
0
		public DockPanel()
		{
            m_focusManager = new FocusManagerImpl(this);
			m_extender = new DockPanelExtender(this);
			m_panes = new DockPaneCollection();
			m_floatWindows = new FloatWindowCollection();

			SetStyle(ControlStyles.ResizeRedraw |
				ControlStyles.UserPaint |
				ControlStyles.AllPaintingInWmPaint, true);

            SuspendLayout();
            Font = PluginCore.PluginBase.Settings.DefaultFont;

			m_autoHideWindow = new AutoHideWindowControl(this);
			m_autoHideWindow.Visible = false;
            SetAutoHideWindowParent();

			m_dummyControl = new DummyControl();
			m_dummyControl.Bounds = new Rectangle(0, 0, 1, 1);
			Controls.Add(m_dummyControl);

			m_dockWindows = new DockWindowCollection(this);
			Controls.AddRange(new Control[]	{
				DockWindows[DockState.Document],
				DockWindows[DockState.DockLeft],
				DockWindows[DockState.DockRight],
				DockWindows[DockState.DockTop],
				DockWindows[DockState.DockBottom]
				});

			m_dummyContent = new DockContent();
            ResumeLayout();
        }
Пример #3
0
 internal void LoadDockWindows()
 {
     m_dockWindows = new DockWindowCollection(this);
     foreach (var dockWindow in DockWindows)
     {
         Controls.Add(dockWindow);
     }
 }
Пример #4
0
        public void StateStateSaved(RadDock dock)
        {
            DockWindowCollection documentManager = dock.DockWindows;

            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.CreateElement("WORKSPACE");
            XmlNode nodeAtivos = xmlDocument.CreateNode(XmlNodeType.Element, "ATIVOS", null);

            if (!Directory.Exists(ListWorkspace._path + _archiveName.Split('.')[0]))
            {
                Directory.CreateDirectory(ListWorkspace._path + _archiveName.Split('.')[0]);
            }

            foreach (DockWindow document in documentManager.Where(document =>
                                                                  (!document.Text.Equals(Program.LanguageDefault.DictionaryPlena["webBrowser"])) &&
                                                                  (!document.Text.Equals(Program.LanguageDefault.DictionaryPlena["tradeDiary"]))))
            {
                if ((document.Controls.Count == 0) || (!document.AccessibleName.Equals("CtlPainelChart")))
                {
                    continue;
                }

                if (File.Exists(ListWorkspace._path + _archiveName.Split('.')[0] + "\\" + "ATIVOS_" + _archiveName))
                {
                    File.Delete(ListWorkspace._path + _archiveName.Split('.')[0] + "\\" + "ATIVOS_" + _archiveName);
                }

                XmlNode nodeAtivo = xmlDocument.CreateNode(XmlNodeType.Element, "ATIVO", null);

                XmlNode nodePropriedades = xmlDocument.CreateNode(XmlNodeType.Element, "PROPRIEDADES", null);

                XmlElement nodeNome = xmlDocument.CreateElement("NOME");
                nodeNome.InnerText = document.Text;

                XmlElement nodeWindowNome = xmlDocument.CreateElement("NOME_TOOLWINDOW");
                nodeWindowNome.InnerText = document.Name;

                XmlElement nodeScale = xmlDocument.CreateElement("VIEW_SCALE_SEMI_LOG");
                nodeScale.InnerText = ((CtlPainelChart)document.Controls[0]).StockChartX1.ScaleType == ScaleType.stLinearScale ? "0" : "1";

                XmlElement nodeXGrid = xmlDocument.CreateElement("SHOW_XGRID");
                nodeXGrid.InnerText = ((CtlPainelChart)document.Controls[0]).StockChartX1.XGrid ? "1" : "0";

                XmlElement nodeYGrid = xmlDocument.CreateElement("SHOW_YGRID");
                nodeYGrid.InnerText = ((CtlPainelChart)document.Controls[0]).StockChartX1.YGrid ? "1" : "0";

                XmlElement nodeSeparators = xmlDocument.CreateElement("SHOW_SEPARATORS");
                nodeSeparators.InnerText = ((CtlPainelChart)document.Controls[0]).StockChartX1.HorizontalSeparators ? "1" : "0";

                XmlElement nodeDarvasBoxes = xmlDocument.CreateElement("SHOW_DARVAS_BOXES");
                nodeDarvasBoxes.InnerText = ((CtlPainelChart)document.Controls[0]).StockChartX1.DarvasBoxes ? "1" : "0";

                XmlElement nodeFirstVisibleRecord = xmlDocument.CreateElement("FIRST_VISIBLE_RECORD");
                nodeFirstVisibleRecord.InnerText = ((CtlPainelChart)document.Controls[0]).StockChartX1.FirstVisibleRecord.ToString();

                XmlElement nodeLastVisibleRecord = xmlDocument.CreateElement("LAST_VISIBLE_RECORD");
                nodeLastVisibleRecord.InnerText = ((CtlPainelChart)document.Controls[0]).StockChartX1.LastVisibleRecord.ToString();

                XmlElement nodeColor = xmlDocument.CreateElement("COLOR");
                nodeColor.InnerText = ((CtlPainelChart)document.Controls[0]).m_SchemeColor;

                XmlElement nodeVisible = xmlDocument.CreateElement("VISIBLE");
                nodeVisible.InnerText = document.Controls[0].Visible ? "1" : "0";

                XmlElement nodeSimbolo = xmlDocument.CreateElement("SIMBOLO");
                nodeSimbolo.InnerText = ((Chart.CtlPainelChart)document.Controls[0]).MSymbol;

                XmlElement nodePeriodicidade = xmlDocument.CreateElement("PERIODICIDADE");
                nodePeriodicidade.InnerText = ((Chart.CtlPainelChart)document.Controls[0]).m_Periodicity.ToString();

                XmlElement nodeIntervalo = xmlDocument.CreateElement("INTERVALO");
                nodeIntervalo.InnerText = ((Chart.CtlPainelChart)document.Controls[0]).m_BarSize.ToString();

                nodePropriedades.AppendChild(nodeScale);
                nodePropriedades.AppendChild(nodeXGrid);
                nodePropriedades.AppendChild(nodeYGrid);
                nodePropriedades.AppendChild(nodeSeparators);
                nodePropriedades.AppendChild(nodeDarvasBoxes);
                nodePropriedades.AppendChild(nodeFirstVisibleRecord);
                nodePropriedades.AppendChild(nodeLastVisibleRecord);
                nodePropriedades.AppendChild(nodeColor);

                nodeAtivo.AppendChild(nodeNome);
                nodeAtivo.AppendChild(nodeWindowNome);
                nodeAtivo.AppendChild(nodeSimbolo);
                nodeAtivo.AppendChild(nodePeriodicidade);
                nodeAtivo.AppendChild(nodeIntervalo);
                nodeAtivo.AppendChild(nodeVisible);
                nodeAtivo.AppendChild(nodePropriedades);

                nodeAtivos.AppendChild(nodeAtivo);
                ((CtlPainelChart)document.Controls[0]).StockChartX1.SaveGeneralTemplate(ListWorkspace._path + _archiveName.Split('.')[0] + "\\" + document.Name + ".sct");
            }

            if (nodeAtivos.ChildNodes.Count <= 0)
            {
                return;
            }

            xmlDocument.AppendChild(nodeAtivos);
            xmlDocument.Save(ListWorkspace._path + _archiveName.Split('.')[0] + "\\" + "ATIVOS_" + _archiveName);
            VersionChecker.VersionChecker.InsertVersion(ListWorkspace._path + _archiveName.Split('.')[0] + "\\" + "ATIVOS_" + _archiveName, VersionChecker.VersionChecker.Version);
        }
Пример #5
0
        public DockPanel()
        {
            this._mFocusManager = new FocusManagerImpl(this);
            this._mExtender = new DockPanelExtender(this);
            this._mPanes = new DockPaneCollection();
            this._mFloatWindows = new FloatWindowCollection();

            SuspendLayout();

            this._mAutoHideWindow = new AutoHideWindowControl(this)
            {
                Visible = false
            };
            this.SetAutoHideWindowParent();

            this._mDummyControl = new DummyControl
            {
                Bounds = new Rectangle(0, 0, 1, 1)
            };
            Controls.Add(this._mDummyControl);

            this._mDockWindows = new DockWindowCollection(this);
            Controls.AddRange(new Control[]	{
                this.DockWindows[DockState.Document],
                this.DockWindows[DockState.DockLeft],
                this.DockWindows[DockState.DockRight],
                this.DockWindows[DockState.DockTop],
                this.DockWindows[DockState.DockBottom]
                });

            this._mDummyContent = new DockContent();
            ResumeLayout();
        }