示例#1
0
        //------------------------------------------------------------------------
        public void mnuFileNewLtr_Click(object sender, EventArgs e)
        {
            frmSource src = new frmSource(ProjectFile.FileType.LETTER);

            src.Show(dockPanel);
            src.icsEditor.Focus();
        }
示例#2
0
        //------------------------------------------------------------------------
        private void frmMain_Load(object sender, EventArgs e)
        {
            stripToolbar.Renderer = new ToolStripProfessionalRenderer(new SkinColorTable());
            stripMenu.Renderer    = new ToolStripProfessionalRenderer(new SkinColorTable());

            string position;

            Errors.Show(dockPanel, DockState.DockBottomAutoHide);
            position         = Config.GetString("Errors_State");
            Errors.DockState = (DockState)Enum.Parse(typeof(DockState), position);
            try
            {
                if (position.Contains("Left"))
                {
                    dockPanel.DockLeftPortion = (double)Config.GetInt("Errors_Size");
                }
                else if (position.Contains("Right"))
                {
                    dockPanel.DockRightPortion = (double)Config.GetInt("Errors_Size");
                }
                else if (position.Contains("Top"))
                {
                    dockPanel.DockTopPortion = (double)Config.GetInt("Errors_Size");
                }
                else if (position.Contains("Bottom"))
                {
                    dockPanel.DockBottomPortion = (double)Config.GetInt("Errors_Size");
                }
            }
            catch (Exception) { }

            Explorer.Show(dockPanel, DockState.DockRightAutoHide);
            position           = Config.GetString("Explorer_State");
            Explorer.DockState = (DockState)Enum.Parse(typeof(DockState), position);
            try
            {
                if (position.Contains("Left"))
                {
                    dockPanel.DockLeftPortion = (double)Config.GetInt("Explorer_Size");
                }
                else if (position.Contains("Right"))
                {
                    dockPanel.DockRightPortion = (double)Config.GetInt("Explorer_Size");
                }
                else if (position.Contains("Top"))
                {
                    dockPanel.DockTopPortion = (double)Config.GetInt("Explorer_Size");
                }
                else if (position.Contains("Bottom"))
                {
                    dockPanel.DockBottomPortion = (double)Config.GetInt("Explorer_Size");
                }
            }
            catch (Exception) { }

            string[] args = Environment.GetCommandLineArgs();
            if (args.Length > 1)
            {
                for (int i = 1; i < args.Length; i++)
                {
                    frmSource passedIn = new frmSource(args[i]);
                    passedIn.Show(dockPanel);
                }
            }
        }