Exemplo n.º 1
0
 public MainWindow()
 {
     InitializeComponent();
     service = Service.getInstance();
     AddHotKeys();
     DefaultConnectionFromFile();
 }
Exemplo n.º 2
0
 public WizardPage2(String initString)
 {
     InitializeComponent();
     this.initString = initString;
     this.service = Service.getInstance();
     AddHotKeys();
 }
Exemplo n.º 3
0
 public WizardPage3(String initString, WizardPage2 wiz2)
 {
     this.service = Service.getInstance();
     InitializeComponent();
     mezok[0] = initString;
     this.initString = initString;
     this.wiz2 = wiz2;
     AddHotKeys();
     FillCmbbxs();
 }
Exemplo n.º 4
0
        private void DefaultConnectionFromFile()
        {
            if (File.Exists("adatb-kapcs.adb"))
            {

                ConnectionArrayList conns = new ConnectionArrayList();
                //Open the file written above and read values from it.
                Stream stream = File.Open("adatb-kapcs.adb", FileMode.Open);
                BinaryFormatter bformatter = new BinaryFormatter();

                conns = (ConnectionArrayList)bformatter.Deserialize(stream);
                stream.Close();

                foreach (Connection con in conns.Conns)
                {
                    if (con.IsDefault) {
                        this.service = Service.getInstance();
                        service.ConnectionString = "server=" +
                           con.Url + ";user="******";database=tkis;port=3306;password="******";Charset=utf8;"
                           ;
                        CmbbxFillMySQL();
                    }
                }

            }
        }
Exemplo n.º 5
0
 public static Service getInstance()
 {
     if (service == null)
         service = new Service();
     return service;
 }
Exemplo n.º 6
0
        private void send_Click(object sender, RoutedEventArgs e)
        {
            if (cmbBxConnectionSelector.SelectedItem != null)
            {
                foreach (Connection con in this.connections.Conns) {
                    con.IsDefault = false;
                }

                ((Connection)this.cmbBxConnectionSelector.SelectedItem).IsDefault = true;
                this.service = Service.getInstance();
                service.ConnectionString = "server=" +
                    ((Connection)this.cmbBxConnectionSelector.SelectedItem).Url + ";user="******";database=tkis;port=3306;password="******";Charset=utf8;"
                    ;
                SaveToFile();
                this.Close();
            }
            else
                MessageBox.Show("Először válasszon egy csatlakozási lehetőséget a legördülő menüből!", "Nincs kapcsolat kiválasztva", MessageBoxButton.OK, MessageBoxImage.Information);
        }