Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Wheels wheels = new Wheels();

            wheels.Show();
            Log.WriteLog("Opening Wheels");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Runs on app startup
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainMenu_Load(object sender, EventArgs e)
        {
            var settings = new IniFile("Settings.ini");

            saveFile       = settings.Read("SaveFile", "General");
            startUpWindow  = settings.Read("OnStartup", "General");
            logFile        = settings.Read("LogFile", "Logging");
            logFileMaxSize = settings.Read("MaxiumFileSize", "Logging");
            string enabled = settings.Read("EnableLogFile", "Logging");

            Log.WriteLog("===============Start New Log===============");

            if (enabled == "false")
            {
                MessageBox.Show("Log File Disabled", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            if (startUpWindow == "None")
            {
                Log.WriteLog("Starting up with defualt window");
            }
            else if (startUpWindow == "Levers")
            {
                Levers levers = new Levers();
                levers.Show();
                Log.WriteLog("Starting with Levers window");
            }
            else if (startUpWindow == "Wheels")
            {
                Wheels wheels = new Wheels();
                wheels.Show();
                Log.WriteLog("Opening Wheels");
            }
            else
            {
                MessageBox.Show("Unable to open window, unknown window", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log.WriteLog("Unable to open window, unknown window. Window specified" + startUpWindow);
            }
        }