예제 #1
0
        protected override async void OnLoad(EventArgs e)
        {
            //if (Settings.Default.UpdateSettings)
            //{
            //    Settings.Default.Upgrade();
            //    Settings.Default.UpdateSettings = false;
            //    Settings.Default.Save();
            //}

            SetTitle("Connecting...");
            OmssaParameterLine.Changed += (sender, e2) => RefreshParameterLines();
            RefreshParameterLines();

            checkedListBox1.DataSource    = Databases;
            checkedListBox1.DisplayMember = "Name";

            listBox1.DataSource    = ParameterLines;
            listBox1.DisplayMember = "Name";

            dataGridView1.AutoGenerateColumns   = false;
            dataGridView1.AllowUserToAddRows    = false;
            dataGridView1.AllowUserToDeleteRows = true;

            DataGridViewTextBoxColumn dtaName = new DataGridViewTextBoxColumn();

            dtaName.HeaderText       = "DTA Name";
            dtaName.ReadOnly         = true;
            dtaName.DataPropertyName = "Name";
            dtaName.AutoSizeMode     = DataGridViewAutoSizeColumnMode.AllCells;
            dtaName.Frozen           = true;
            dataGridView1.Columns.Add(dtaName);

            DataGridViewTextBoxColumn argumentLine = new DataGridViewTextBoxColumn();

            argumentLine.HeaderText       = "Parameters";
            argumentLine.DataPropertyName = "ParameterLine";
            argumentLine.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            dataGridView1.Columns.Add(argumentLine);

            dataGridView1.DataSource = DtaFiles;

            string name     = Settings.Default.UserName;
            string host     = Settings.Default.Host;
            string password = Settings.Default.Password;

            bool result = await ConnectAsync(name, host, password);

            if (!result)
            {
                // Show the server connection form if auto login doesn't work
                ServerConnectionForm form = new ServerConnectionForm(this);
                form.ShowDialog();
            }

            base.OnLoad(e);
        }
예제 #2
0
        protected override async void OnLoad(EventArgs e)
        {
            //if (Settings.Default.UpdateSettings)
            //{
            //    Settings.Default.Upgrade();
            //    Settings.Default.UpdateSettings = false;
            //    Settings.Default.Save();
            //}

            SetTitle("Connecting...");
            OmssaParameterLine.Changed += (sender, e2) => RefreshParameterLines();
            RefreshParameterLines();

            checkedListBox1.DataSource = Databases;
            checkedListBox1.DisplayMember = "Name";

            listBox1.DataSource = ParameterLines;
            listBox1.DisplayMember = "Name";

            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.AllowUserToAddRows = false;
            dataGridView1.AllowUserToDeleteRows = true;

            DataGridViewTextBoxColumn dtaName = new DataGridViewTextBoxColumn();
            dtaName.HeaderText = "DTA Name";
            dtaName.ReadOnly = true;
            dtaName.DataPropertyName = "Name";
            dtaName.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
            dtaName.Frozen = true;
            dataGridView1.Columns.Add(dtaName);

            DataGridViewTextBoxColumn argumentLine = new DataGridViewTextBoxColumn();
            argumentLine.HeaderText = "Parameters";
            argumentLine.DataPropertyName = "ParameterLine";
            argumentLine.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            dataGridView1.Columns.Add(argumentLine);

            dataGridView1.DataSource = DtaFiles;

            string name = Settings.Default.UserName;
            string host = Settings.Default.Host;
            string password = Settings.Default.Password;

            bool result = await ConnectAsync(name, host, password);

            if (!result)
            {
                // Show the server connection form if auto login doesn't work
                ServerConnectionForm form = new ServerConnectionForm(this);
                form.ShowDialog();
            }

            base.OnLoad(e);
        }
예제 #3
0
 private void connectToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ServerConnectionForm form = new ServerConnectionForm(this);
     form.ShowDialog();
 }
예제 #4
0
        private void connectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ServerConnectionForm form = new ServerConnectionForm(this);

            form.ShowDialog();
        }