コード例 #1
0
ファイル: frmImgProcess.cs プロジェクト: xuanximoming/PIC
        public frmImgProcess()
        {
            InitializeComponent();
            imgProcess = this;
            this.drawArea.Initialize();
            SaveImageToXml           = new SaveImageToXml();
            m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
            string configFile = Application.StartupPath + "\\Config\\ImgProDockPanel.config";

            if (File.Exists(configFile))
            {
                dockPanel.LoadFromXml(configFile, m_deserializeDockContent);
            }
            else
            {
                backImages           = new frmBackImages(this.p_Main);
                preferImages         = new frmPreferImages(this.p_Main);
                backImages.dbClick   = new frmBackImages.DbClick(BackPtbDbClick);
                preferImages.dbClick = new frmPreferImages.DbClick(PreferPtbDbClick);
                backImages.Show(this.dockPanel, BaseControls.Docking.DockState.DockRight);
                preferImages.Show(this.dockPanel, BaseControls.Docking.DockState.DockRight);
                if (GetConfig.IsAddLocMap)
                {
                    frmSLocMap = new frmSimpleLocMap(this.p_Main);
                    frmSLocMap.Show(this.dockPanel, BaseControls.Docking.DockState.DockRight);
                }
            }
        }
コード例 #2
0
ファイル: frmImgProcess.cs プロジェクト: xuanximoming/PIC
        private IDockContent GetContentFromPersistString(string persistString)
        {
            switch (persistString)
            {
            case "SIS.frmBackImages":
                backImages         = new frmBackImages(this.p_Main);
                backImages.dbClick = new frmBackImages.DbClick(BackPtbDbClick);
                return(backImages);

            case "SIS.frmPreferImages":
                preferImages         = new frmPreferImages(this.p_Main);
                preferImages.dbClick = new frmPreferImages.DbClick(PreferPtbDbClick);
                return(preferImages);

            case "SIS.frmSimpleLocMap":
                frmSLocMap = new frmSimpleLocMap(this.p_Main);
                return(frmSLocMap);

            default:
                return(null);
            }
        }