Beispiel #1
0
        public CSBoosterMonitor(CSBoosterMonitorProperties properties)
        {
            InitializeComponent();
            this.mainMenuBar.LinksPersistInfo.Clear();

            this.properties = properties;
        }
Beispiel #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                XmlSerializer serializer = new XmlSerializer(typeof(CSBoosterMonitorProperties));
                csboosterMonitorProperties = (CSBoosterMonitorProperties)serializer.Deserialize(new StreamReader(Application.StartupPath + @"\settings.config", false));
            }
            catch (Exception ex)
            {
                MessageBox.Show("Couldn't load settings: " + ex.Message, "Load error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            Application.Run(csboosterMonitorProperties.GetCSBoosterMonitor());
        }