コード例 #1
0
ファイル: Form1.cs プロジェクト: NPsim/DTXQuantize
        private void LoadFileButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog Dialog = new OpenFileDialog();

            Dialog.ShowDialog();
            LoadFileTextBox.Text = Dialog.FileName;
            LoadFileTextBox.Focus();
            LoadFileTextBox.Select(LoadFileTextBox.Text.Length, 0);
            if (LoadFileTextBox.Text.Length > 0)
            {
                WriteConsoleLine("Loaded " + Dialog.FileName);
            }
        }
コード例 #2
0
        private void ChangeFromConnectToLoad()
        {
            this.Invoke(new MethodInvoker(() => ServerLabel.Text              = "Connected"));
            this.Invoke(new MethodInvoker(() => IP_TextBox.ReadOnly           = true));
            this.Invoke(new MethodInvoker(() => Port_TextBox.ReadOnly         = true));
            this.Invoke(new MethodInvoker(() => ConnectButton.Visible         = false));
            this.Invoke(new MethodInvoker(() => LoadSpreadsheetButton.Visible = true));
            this.Invoke(new MethodInvoker(() => LoadFileTextBox.Visible       = true));
            this.Invoke(new MethodInvoker(() => ListOfSpreadSheetsBox.Visible = true));
            this.Invoke(new MethodInvoker(() => IP_TextBox.TabStop            = false));
            this.Invoke(new MethodInvoker(() => Port_TextBox.TabStop          = false));
            this.Invoke(new MethodInvoker(() => LoadFileTextBox.Focus()));


            connected = true;
            Program.MainForm.connected = true;
        }