Пример #1
0
        public FrmMain(QProcess cP)
        {
            InitializeComponent();
            int hFactor = GetCaptionHeight() - 20;

            hFactor = hFactor > 0 ? hFactor : 0;

            this.Height = 346 + hFactor;

            LoadData();

            switch (cP)
            {
            case QProcess.None:
                break;

            case QProcess.Split:

                MainTab.Visible = false;

                SpBtnFileBrowse.Visible = false;
                SpTxtFile.Width         = 478;
                SpTxtFile.BackColor     = SystemColors.Control;
                SpTxtFile.Text          = App.CurrentFile;
                SpTxtFile.ReadOnly      = true;

                SpPanel.Parent   = this;
                SpPanel.Location = new Point(12, 9);

                this.Size = new Size(510, 290 + hFactor);

                break;

            case QProcess.Join:
                MainTab.Visible = false;

                JnBtnFileBrowse.Visible = false;
                JnTxtFile.Width         = 478;
                JnTxtFile.BackColor     = SystemColors.Control;
                JnTxtFile.Text          = App.CurrentFile;
                JnTxtFile.ReadOnly      = true;

                JnPanel.Parent   = this;
                JnPanel.Location = new Point(12, 9);

                this.Size = new Size(510, 290 + hFactor);

                break;

            default:
                break;
            }

            mSize = this.Size;
        }
Пример #2
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            QProcess pType = QProcess.None;

            if (args.Length > 1)
            {
                App.Args      = args;
                App.Operation = args[0];

                for (int i = 1; i < args.Length; i++)
                {
                    if (args[i] != "")
                    {
                        App.CurrentFile += args[i];
                    }

                    if (i < args.Length - 1)
                    {
                        App.CurrentFile += " ";
                    }

                    MessageBox.Show("\"" + args[i] + "\"");
                }


                if (args[0] == "/split")
                {
                    pType = QProcess.Split;
                }
                else if (args[0] == "/join")
                {
                    pType = QProcess.Join;
                }
            }

            Application.Run(new FrmMain(pType));
        }