예제 #1
0
        internal static void DtPadStart(Form1 form, String[] commandLine)
        {
            List <String> args       = new List <String>();
            bool          noteModeOn = false;

            if (commandLine.Length == 2 && commandLine[1] == ConstantUtil.cmdLineJLNew)
            {
                OpenNewTab(form);
            }
            else if (commandLine.Length == 2 && commandLine[1] == ConstantUtil.cmdLineJLNewAndPaste)
            {
                OpenNewTabAndPaste(form);
            }
            else if (commandLine.Length == 2 && commandLine[1] == ConstantUtil.cmdLineJLOpenFile)
            {
                OpenFile(form);
            }
            else if (commandLine.Length == 2 && commandLine[1] == ConstantUtil.cmdLineJLOpenSession)
            {
                OpenSession(form);
            }
            else if (commandLine.Length == 2 && commandLine[1] == ConstantUtil.cmdLineJLSearchInFiles)
            {
                SearchInFiles(form);
            }
            else if (commandLine.Length == 2 && commandLine[1] == ConstantUtil.cmdLineJLCheckNewVersion)
            {
                CheckNewVersion(form);
            }
            else
            {
                for (int i = 1; i < commandLine.Length; i++)
                {
                    if (commandLine[i] == ConstantUtil.cmdLineNoteModeOn)
                    {
                        noteModeOn = true;
                        continue;
                    }
                    args.Add(commandLine[i]);
                }

                if (args.Count > 0)
                {
                    form.WindowState = form.PreviousWindowState;
                    form.TabIdentity = FileManager.OpenFile(form, form.TabIdentity, args.ToArray());
                }
            }
            if (!form.Visible)
            {
                TrayManager.RestoreFormFromTray(form, form.PreviousWindowState);
            }

            if (noteModeOn && form.WindowMode == CustomForm.WindowModeEnum.Normal)
            {
                WindowModeManager.ToggleNoteMode(form);
            }
        }
예제 #2
0
        internal static void OpenNewTab(Form1 form)
        {
            TrayManager.RestoreFormFromTray(form, form.PreviousWindowState);

            if (TabManager.IsCurrentTabInUse(form))
            {
                form.TabIdentity = TabManager.AddNewPage(form, form.TabIdentity);
            }
        }
예제 #3
0
 internal static void OpenFile(Form1 form)
 {
     TrayManager.RestoreFormFromTray(form, form.PreviousWindowState);
     form.TabIdentity = FileManager.OpenFile(form, form.TabIdentity);
 }