예제 #1
0
 /// <summary>
 /// Runs the specified gulu.
 /// </summary>
 /// <param name="_gulu">The gulu that is going to run.</param>
 public static void Run(GuluBase _gulu)
 {
     if (_gulu != null)
     {
         Session.CurrentSession.SetGulu(_gulu);
         System.Threading.Thread.Sleep(1);
         Api.SendMessage(Session.CurrentSession.MDIParent.Handle.ToInt32(),
             Convert.ToInt32(MessageHelper.Messages.RunGulu), 0, 0);
     }
 }
예제 #2
0
 /// <summary>
 /// Runs the specified gulu.
 /// </summary>
 /// <param name="_gulu">The gulu that is going to run.</param>
 public static void Run(GuluBase _gulu)
 {
     if (_gulu != null)
     {
         Session.CurrentSession.SetGulu(_gulu);
         System.Threading.Thread.Sleep(1);
         Api.SendMessage(Session.CurrentSession.MDIParent.Handle.ToInt32(),
                         Convert.ToInt32(MessageHelper.Messages.RunGulu), 0, 0);
     }
 }
예제 #3
0
 /* Sunny Chen Added 2008/07/01 <-- */
 public GuluWorkerParameter(GuluBase _gulu, IList<ListViewItem> _items
     /* Sunny Chen Added 2008/07/01 --> */
     , ConfigReader _configReader
     /* Sunny Chen Added 2008/07/01 <-- */
     )
 {
     gulu__ = _gulu;
     items__ = _items;
     /* Sunny Chen Added 2008/07/01 --> */
     configReader__ = _configReader;
     /* Sunny Chen Added 2008/07/01 <-- */
 }
예제 #4
0
        /* Sunny Chen Added 2008/07/01 <-- */

        public GuluWorkerParameter(GuluBase _gulu, IList<ListViewItem> _items
            /* Sunny Chen Added 2008/07/01 --> */
            , ConfigReader _configReader
            /* Sunny Chen Added 2008/07/01 <-- */
            )
        {
            gulu__ = _gulu;
            items__ = _items;
            /* Sunny Chen Added 2008/07/01 --> */
            configReader__ = _configReader;
            /* Sunny Chen Added 2008/07/01 <-- */
        }
예제 #5
0
파일: frmMain.cs 프로젝트: daxnet/guluwin
        private void RunGulu(GuluBase _gulu)
        {
            if (guluWorkerRunning__)
            {
                MessageBox.Show("Running...");
                return;
            }
            frmFileList fileListForm = null;

            foreach (frmDummy child in this.MdiChildren)
            {
                if (child is frmFileList)
                {
                    fileListForm = (child as frmFileList);
                    break;
                }
            }

            if (fileListForm != null)
            {
                IList<ListViewItem> selectedItems = fileListForm.SelectedItems;

                if (selectedItems != null && _gulu != null)
                {
                    Output.Clear();

                    Output.Add(string.Format(SunnyChen.Gulu.Win.Properties.Resources.TEXT_INIT_GULU, _gulu.ToString()));

                    if (_gulu.Init())
                    {
                        if (dockManager.ControlPanes["mainTab"].Closed)
                        {
                            dockManager.ControlPanes["mainTab"].Closed = false;
                            dockManager.ControlPanes["mainTab"].Activate();
                        }

                        GuluWorkerParameter parameter = new GuluWorkerParameter(_gulu, selectedItems
                            /* Sunny Chen Added 2008/07/01 --> */
                            , globalConfigReader__
                            /* Sunny Chen Added 2008/07/01 <-- */
                            );
                        ParameterizedThreadStart threadStart = new ParameterizedThreadStart(worker__.WorkingThread);

                        workerThread__ = new Thread(threadStart);
                        workerThread__.Priority = ThreadPriority.BelowNormal;

                        guluWorkerThreads__.Add(workerThread__);
                        guluWorkerRunning__ = true;
                        workerThread__.Start(parameter);

                        GetTool("mnuStop").SharedProps.Enabled = true;

                        taskManager.Enabled = false;
                        fileTreeView.Enabled = false;
                    }
                    else
                        Output.Add(SunnyChen.Gulu.Win.Properties.Resources.TEXT_GULU_INIT_FAILED);
                }
                else
                    MessageBox.Show(SunnyChen.Gulu.Win.Properties.Resources.TEXT_INFO_NOITEM,
                        SunnyChen.Gulu.Win.Properties.Resources.TEXT_INFORMATION,
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Information);
            }
            else
                MessageBox.Show(SunnyChen.Gulu.Win.Properties.Resources.TEXT_INFO_FILELIST_NOT_OPEN,
                        SunnyChen.Gulu.Win.Properties.Resources.TEXT_INFORMATION,
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Information);
        }
예제 #6
0
 public GuluWorkerFinishedEventArgs(GuluBase _gulu, bool _interrupted)
     : base()
 {
     gulu__ = _gulu;
     interrupted__ = _interrupted;
 }
예제 #7
0
파일: Session.cs 프로젝트: daxnet/guluwin
 /// <summary>
 /// Sets the Gulu that is going to run.
 /// </summary>
 /// <param name="_gulu">The gulu for running.</param>
 /// <remarks>
 /// Calls this method just before a gulu is going to be run. DO NOT call it within your own program context.
 /// </remarks>
 public void SetGulu(GuluBase _gulu)
 {
     gulu__ = _gulu;
 }
예제 #8
0
파일: Session.cs 프로젝트: daxnet/guluwin
 /// <summary>
 /// Sets the Gulu that is going to run.
 /// </summary>
 /// <param name="_gulu">The gulu for running.</param>
 /// <remarks>
 /// Calls this method just before a gulu is going to be run. DO NOT call it within your own program context.
 /// </remarks>
 public void SetGulu(GuluBase _gulu)
 {
     gulu__ = _gulu;
 }
예제 #9
0
 public GuluWorkerFinishedEventArgs(GuluBase _gulu, bool _interrupted)
     : base()
 {
     gulu__        = _gulu;
     interrupted__ = _interrupted;
 }