Beispiel #1
0
        public MainForm()
        {
            try
            {
                InitializeComponent();

                //System.Windows.Resources.StreamResourceInfo sri = System.Windows.Application.GetResourceStream(
                //    new Uri("/BitsUiWpf;BitsUi.ControlsWPF.AppResources", UriKind.RelativeOrAbsolute));
                //var resources = (System.Windows.ResourceDictionary)BamlReader.Load(sri.Stream);

                mf = this;
                FormsManagerProxy.MainForm = this;
                this.Show();

                Message("Initializing...");

                InitializeConfig();
                StartNbCheck();
                StartSvrCheck();
                StartClock();
            }
            catch (Exception ex)
            {
                log.Error(ex);
                string msg = String.Format("BITS Console experienced an error when starting.   Please contact the Development Group. \n\n{0}", ex.Message);

                MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        public ControlContainer(ElementHost _uc, string _name, MainForm _mainForm)
        {
            InitializeComponent();

            this.Text = _name;
            this.Name = _name;
            this.MdiParent = _mainForm;

            _uc.Dock = DockStyle.Fill;
            this.Controls.Add(_uc);
        }