Exemplo n.º 1
0
            public HResult CreateProgress(out INiStatusBarProgress progress)
            {
                progress = null;

                try
                {
                    var label = new ToolStripStatusLabel
                    {
                        Visible = false
                    };
                    var progressBar = new ToolStripProgressBar
                    {
                        Visible = false
                    };

                    int index = _mainForm._statusStrip.Items.IndexOf(_mainForm._statusStripText);

                    _mainForm._statusStrip.Items.Insert(
                        index + 1,
                        label
                        );
                    _mainForm._statusStrip.Items.Insert(
                        index + 2,
                        progressBar
                        );

                    progress = new NiStatusBarProgress(label, progressBar);

                    return(HResult.OK);
                }
                catch (Exception ex)
                {
                    return(ErrorUtil.GetHResult(ex));
                }
            }
Exemplo n.º 2
0
            public HResult CreateProgress(out INiStatusBarProgress progress)
            {
                progress = null;

                try
                {
                    var label = new ToolStripStatusLabel
                    {
                        Visible = false
                    };
                    var progressBar = new ToolStripProgressBar
                    {
                        Visible = false
                    };

                    int index = _mainForm._statusStrip.Items.IndexOf(_mainForm._statusStripText);

                    _mainForm._statusStrip.Items.Insert(
                        index + 1,
                        label
                    );
                    _mainForm._statusStrip.Items.Insert(
                        index + 2,
                        progressBar
                    );

                    progress = new NiStatusBarProgress(label, progressBar);

                    return HResult.OK;
                }
                catch (Exception ex)
                {
                    return ErrorUtil.GetHResult(ex);
                }
            }