Ejemplo n.º 1
0
        /// <summary>
        /// initialization of the whole log
        /// </summary>
        public void Init()
        {
            Cursor    oldCursor = Cursor;
            DataTable Data;

            try
            {
                Cursor = Cursors.WaitCursor;

                this.DataSource = new IBESettings();
                Program.SplashScreen.InfoAppendLast("<OK>");


                // loading languages to combobox
                Data = new DataTable();
                Program.DBCon.Execute("select * from tbLanguage", Data);
                cmbLanguage.DataSource    = Data;
                cmbLanguage.DisplayMember = "language";
                cmbLanguage.ValueMember   = "language";

                //prepare visited filter
                Tuple <Int32, String> newEntry;
                newEntry = new Tuple <Int32, String>(0, "show all");
                cmbVisitedFilter.Items.Add(newEntry);
                newEntry = new Tuple <Int32, String>(1, "only visited systems");
                cmbVisitedFilter.Items.Add(newEntry);
                newEntry = new Tuple <Int32, String>(2, "only visited stations");
                cmbVisitedFilter.Items.Add(newEntry);
                cmbVisitedFilter.DisplayMember = "Item2";
                cmbVisitedFilter.ValueMember   = "Item1";

                // loading all settings
                m_GUIInterface = new DBGuiInterface(DB_GROUPNAME, new DBConnector(Program.DBCon.ConfigData, true));
                m_GUIInterface.loadAllSettings(this);

                m_GUIInterface.DataSavedEvent += m_GUIInterface_DataSavedEvent;

                txtSQLConnectionPort.Text = Program.IniFile.GetValue <UInt16>("DB_Server", "Port", "3306").ToString();

                Cursor = oldCursor;
            }
            catch (Exception ex)
            {
                Cursor = oldCursor;
                throw new Exception("Error during initialization the commanders log tab", ex);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// the data object informs the gui about changed data
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void m_DataSource_DataChanged(object sender, IBESettings.DataChangedEventArgs e)
 {
     try
     {
         
     }
     catch (Exception ex)
     {
         CErr.processError(ex, "Error in m_DataSource_DataChanged");
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// initialization of the whole log
        /// </summary>
        public void Init()
        {
            Cursor oldCursor = Cursor;
            DataTable Data;

            try
            {
                Cursor = Cursors.WaitCursor;

                this.DataSource            = new IBESettings();
                Program.SplashScreen.InfoAppendLast("<OK>");


                // loading languages to combobox
                Data = new DataTable();
                Program.DBCon.Execute("select * from tbLanguage", Data);
                cmbLanguage.DataSource      = Data;
                cmbLanguage.DisplayMember   = "language";
                cmbLanguage.ValueMember     = "language";

                //prepare visited filter
                Tuple<Int32, String> newEntry;
                newEntry = new Tuple<Int32, String>(0,"show all");
                cmbVisitedFilter.Items.Add(newEntry);
                newEntry = new Tuple<Int32, String>(1,"only visited systems");
                cmbVisitedFilter.Items.Add(newEntry);
                newEntry = new Tuple<Int32, String>(2,"only visited stations");
                cmbVisitedFilter.Items.Add(newEntry);
                cmbVisitedFilter.DisplayMember   = "Item2";
                cmbVisitedFilter.ValueMember     = "Item1";

                // loading all settings
                m_GUIInterface = new DBGuiInterface(DB_GROUPNAME, new DBConnector(Program.DBCon.ConfigData, true));
                m_GUIInterface.loadAllSettings(this);

                m_GUIInterface.DataSavedEvent += m_GUIInterface_DataSavedEvent;

                txtSQLConnectionPort.Text = Program.IniFile.GetValue<UInt16>("DB_Server", "Port", "3306").ToString();

                Cursor = oldCursor;
            }
            catch (Exception ex)
            {
                Cursor = oldCursor;
                throw new Exception("Error during initialization the commanders log tab", ex);
            }
        }